diff --git a/README.md b/README.md index 11de2dc..be5e98b 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,12 @@ Vaults are simply storage containers for your files, and Many Notes lets you cho ## Installation -There are three methods to install Many Notes: +Choose your preferred method to install Many Notes: -- Docker with volumes, if you prefer a simpler installation (read below) -- Docker with bind mounts, if you prefer easy access to the shared paths from the host [(read here)](docs/installation/docker-bind-mounts.md) -- Non-Docker installation, if you prefer a more manual approach [(read here)](docs/installation/non-docker.md) +- Docker with volumes, for a simpler installation (read below) +- Docker with bind mounts, for easy access to shared paths from the host ([read here](docs/installation/docker-bind-mounts.md)) +- Docker with a different database, if you prefer not to use SQLite ([read here](docs/installation/docker-different-database.md)) +- Bare metal installation, if you prefer not to use Docker ([read here](docs/installation/non-docker.md)) ### Docker with volumes diff --git a/docs/installation/docker-different-database.md b/docs/installation/docker-different-database.md new file mode 100644 index 0000000..338aadf --- /dev/null +++ b/docs/installation/docker-different-database.md @@ -0,0 +1,53 @@ +# Installation guide (Docker with a different database) + +**Read the [upgrading guide](../../UPGRADING.md) if you are upgrading from a previous version.** + +Many Notes uses SQLite by default but supports other databases like MariaDB, MySQL, and PostgreSQL. This guide will use MariaDB, but you can easily adapt it to one of the other databases. + +## Instructions + +Create a `compose.yaml` file with: + +```yaml +services: + php: + image: brufdev/many-notes:latest + restart: unless-stopped + environment: + - DB_CONNECTION=mariadb + - DB_HOST=many-notes-mariadb-1 + - DB_PORT=3306 + - DB_DATABASE=manynotes + - DB_USERNAME=user + - DB_PASSWORD=USER_PASSWORD # change password + volumes: + - storage-logs:/var/www/html/storage/logs + - storage-private:/var/www/html/storage/app/private + - storage-public:/var/www/html/storage/app/public + - storage-sessions:/var/www/html/storage/framework/sessions + ports: + - 80:8080 + mariadb: + image: mariadb:11 + restart: unless-stopped + environment: + - MARIADB_ROOT_PASSWORD=ROOT_PASSWORD # change password + - MARIADB_DATABASE=manynotes + - MARIADB_USER=user + - MARIADB_PASSWORD=USER_PASSWORD # change password + volumes: + - database:/var/lib/mysql + +volumes: + database: + storage-logs: + storage-private: + storage-public: + storage-sessions: +``` + +Make sure to change the passwords. Feel free to change anything else if you know what you're doing, and read the [customization section](../../README.md#customization) before continuing. Then run: + +```shell +docker compose up -d +```