diff --git a/docs/standalone.rst b/docs/standalone.rst index fa8f22b2..6b56a037 100644 --- a/docs/standalone.rst +++ b/docs/standalone.rst @@ -67,11 +67,9 @@ Configuration for Production Use 1. Update the `Caddyfile` to replace the `localhost` URL with your desired production URL. -2. Modify the `docker-compose` file to adjust the paths. By default, files are stored in `/tmp`. +2. For custom configurations, bindmount a `local_settings.py` into `/opt/django-helpdesk/standalone/config/local_settings.py`. -3. For custom configurations, bindmount a `local_settings.py` into `/opt/django-helpdesk/standalone/config/local_settings.py`. - -4. To customize the logo in the top-left corner of the helpdesk: +3. To customize the logo in the top-left corner of the helpdesk: .. code-block:: html diff --git a/standalone/docker-compose.yml b/standalone/docker-compose.yml index 2c2d2e4a..d797cc7c 100644 --- a/standalone/docker-compose.yml +++ b/standalone/docker-compose.yml @@ -1,28 +1,36 @@ version: '2' + +# Define named volumes +volumes: + caddy_data: + caddy_config: + helpdesk_data: + postgres_data: + services: - caddy: - image: caddy:2 - restart: unless-stopped - volumes: - - /tmp/data/caddy/data:/data - - /tmp/data/caddy/config:/config - - ./Caddyfile:/etc/caddy/Caddyfile:r - ports: - - "80:80" - - "443:443" + caddy: + image: caddy:2 + restart: unless-stopped + volumes: + - caddy_data:/data + - caddy_config:/config + - ./Caddyfile:/etc/caddy/Caddyfile:ro + ports: + - "80:80" + - "443:443" - django-helpdesk: - image: djangohelpdesk/standalone - user: root - volumes: - - /tmp/django-helpdesk-data:/data/ - - ./custom_navigation_header.html:/opt/django-helpdesk/helpdesk/templates/helpdesk/custom_navigation_header.html:r - env_file: docker.env - depends_on: - - postgres + django-helpdesk: + image: djangohelpdesk/standalone + user: root + volumes: + - helpdesk_data:/data + - ./custom_navigation_header.html:/opt/django-helpdesk/helpdesk/templates/helpdesk/custom_navigation_header.html:ro + env_file: docker.env + depends_on: + - postgres - postgres: - image: postgres:12-bullseye - volumes: - - ./db:/var/lib/postgresql/data - env_file: docker.env + postgres: + image: postgres:12-bullseye + volumes: + - postgres_data:/var/lib/postgresql/data + env_file: docker.env