mirror of
https://github.com/brufdev/many-notes.git
synced 2026-05-07 10:19:26 -05:00
1.6 KiB
1.6 KiB
Installation guide (Docker with bind mounts)
Read the upgrading guide if you are upgrading from a previous version.
Many Notes must have the necessary permissions to access the shared paths. Since this image runs with an unprivileged user, the host user IDs must be added during the build phase.
Instructions
First, create a new directory called many-notes with the following structure:
many-notes/
├── database/
├── storage-logs/
├── storage-private/
├── storage-public/
└── storage-sessions/
Next, create a Dockerfile file with:
FROM brufdev/many-notes:latest
USER root
ARG UID
ARG GID
RUN docker-php-serversideup-set-id www-data $UID:$GID && \
docker-php-serversideup-set-file-permissions --owner $UID:$GID --service nginx
USER www-data
Finally, create a compose.yaml file with:
services:
php:
build:
context: .
args:
UID: USER_ID # change id
GID: GROUP_ID # change id
restart: unless-stopped
volumes:
- ./database:/var/www/html/database/sqlite
- ./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
Make sure to update the IDs to match the host user IDs. Feel free to change anything else if you know what you're doing, and read the customization section before continuing. Then run:
docker compose up -d