-
-
Notifications
You must be signed in to change notification settings - Fork 119
02 Setup Docker
For the docker setup you need at least the docker-compose.yml and also the web folder with the perlite.conf. Docker-compose will use the latest prebuild perlite (includes the php-fpm engine) and nginx image from docker hub.
Adjust the NOTES_PATH=Demo
and the volume in the docker-compose.yml to you vault folder name and then run
docker-compose up -d
Mount you local folder /home/user/myNotes
to your container and set the root folder, keep in mind that the NOTES_PATH variable should be the same as the mounted volume folder (only the folder name and not the path!). See also issue 154
environment:
- NOTES_PATH=Notes
- HIDE_FOLDERS=docs,private,trash
volumes:
- /home/user/myNotes:/var/www/perlite/Notes:ro
if you don't specify any NOTES_PATH, Perlite will take /var/www/perlite/Demo
as starting point.
if you want to update, run
docker-compose pull
- also follow the required Obsidian Settings
- and Graph Setup
If you have any problems to get the latest correct docker image (for example you already pulled the latest tag sometime ago) run this command to delete any older image:
docker container rm perlite
docker image rm sec77/perlite:latest
docker-compose pull
docker-compose up --force-recreate --build -d
You can adjust your nginx and php settings via the Dockerfiles in the folder web. If you want to build your own perlite image you can also find a docker file in the perlite folder, don't forget to change the docker-compose files to build a own perlite image
perlite:
build:
context: ./perlite
there is also a build environment available, this will map the perlite/ folder to the container, so you can edit the php files without rebuilding the containers
docker-compose --file docker-compose-build.yml up -d
there is also a dev docker image with the latest changes of perlite
docker-compose --file docker-compose-dev.yml up -d