Skip to content

02 Setup Docker

sec77 edited this page Jan 28, 2023 · 8 revisions

Setup

Adjust the NOTES_PATH=Demo in the docker-compose.yml to you vault folder name.

run docker composer

docker-compose up -d

docker-compose will use the latest prebuild perlite image from docker hub (includes the php-fpm engine) and build your own nginx images called perlite_web.

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

Nginx Config

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, dont forget to change the docker-compose files to build a own perlite image

 perlite:
    build:
        context: ./perlite

development

there is also a development 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-dev.yml up -d

Settings

in the docker-compose.yml

  • define the starting point (root path/folder) of you notes via the environment variable NOTES_PATH
  • define the exluded folders via the environment variable HIDE_FOLDERS
  • define the path from your host to the container via the VOLUME
  • define if you want to use "simple" or markdown line breaks via LINE_BREAKS

for example use this to mount you local folder /home/user/myNotes to your container and set the root folder

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.

Clone this wiki locally