Update .env.tpl

This commit is contained in:
Patrick Jentsch
2024-08-01 12:00:34 +02:00
parent e51dcafa6f
commit 13e4d461c7
3 changed files with 86 additions and 80 deletions

View File

@ -1,62 +1,56 @@
# The docker-compose.yml file is not meant to be modified itself.
# Instead use the following files for configurations:
# - .env: Environment variables for the docker-compose.yml file.
# - db.env: Environment variables for the database service.
# - nopaque.env: Environment variables for the nopaque service.
# - docker-compose.override.yml: Override the docker-compose.yml file.
# - Don't change too much here, it's meant for configurations like exposing
# ports for development or adding labels for e.g. traefik.
# This file is not meant to be modified, use the following files instead:
# - `.env`: Environment variables available within Docker Compose config files.
# - `db.env`: Environment variables for the database service.
# - `nopaque.env`: Environment variables for the nopaque service.
# - `docker-compose.override.yml`: Override the docker-compose.yml file.
# - The `docker-compose` directory includes examples for this.
networks:
default:
name: "${DOCKER_DEFAULT_NETWORK_NAME:-nopaque}"
nopaque:
attachable: true
driver: "overlay"
name: "${NOPAQUE_DOCKER_NETWORK_NAME}"
services:
db:
env_file: db.env
image: postgres:11
restart: unless-stopped
env_file: "db.env"
image: "postgres:11"
networks:
- "nopaque"
restart: "unless-stopped"
volumes:
- type: bind
source: "${DOCKER_DB_SERVICE_DATA_VOLUME_SOURCE_PATH:-./volumes/db/data}"
target: "/var/lib/postgresql/data"
- "./volumes/db/data:/var/lib/postgresql/data"
mq:
image: redis:6
restart: unless-stopped
image: "redis:6"
networks:
- "nopaque"
restart: "unless-stopped"
volumes:
- type: bind
source: "${DOCKER_MQ_SERVICE_DATA_VOLUME_SOURCE_PATH:-./volumes/mq/data}"
target: "/data"
- "./volumes/mq/data:/data"
nopaque:
build: .
depends_on:
- db
- mq
- "db"
- "mq"
env_file:
- nopaque.env
- "nopaque.env"
environment:
# This section overrides the values set in the nopaque.env file. Do not
# override the environment variables in a docker-compose.override.yml
# file unless you really know what you are doing.
- NOPAQUE_UID=${HOST_UID}
- NOPAQUE_GID=${HOST_GID}
- DOCKER_GID=${HOST_DOCKER_GID}
- NOPAQUE_DATA_PATH=${DOCKER_NOPAQUE_SERVICE_DATA_VOLUME_SOURCE_PATH}
- NOPAQUE_DOCKER_NETWORK_NAME=${DOCKER_DEFAULT_NETWORK_NAME:-nopaque}
- NOPAQUE_LOGS_PATH=/home/nopaque/logs
image: nopaque:latest
restart: unless-stopped
# DANGER: Don't change the following environment variables within a
# Docker Compose config file, use the `.env` file instead.
HOST_UID: "${HOST_UID}"
HOST_GID: "${HOST_GID}"
HOST_DOCKER_GID: "${HOST_DOCKER_GID}"
NOPAQUE_DATA_PATH: "${HOST_NOPAQUE_DATA_PATH}"
NOPAQUE_DOCKER_NETWORK_NAME: "${NOPAQUE_DOCKER_NETWORK_NAME}"
image: "nopaque:latest"
networks:
- "nopaque"
restart: "unless-stopped"
volumes:
- type: bind
source: "/var/run/docker.sock"
target: "/var/run/docker.sock"
# TODO: Make this less quirky. The target path should be variable.
# In order to achieve this, a cifs volume needs to be configured.
- type: bind
source: "${DOCKER_NOPAQUE_SERVICE_DATA_VOLUME_SOURCE_PATH}"
target: "${DOCKER_NOPAQUE_SERVICE_DATA_VOLUME_SOURCE_PATH}"
- type: bind
source: "${DOCKER_NOPAQUE_SERVICE_LOGS_VOLUME_SOURCE_PATH:-./volumes/nopaque/logs}"
target: "/home/nopaque/logs"
- "/var/run/docker.sock:/var/run/docker.sock"
- "./volumes/nopaque/logs:/var/log/nopaque"
# DANGER: Don't change the following mount within a Docker Compose
# config file, use the `.env` file instead.
- "${HOST_NOPAQUE_DATA_PATH}:${HOST_NOPAQUE_DATA_PATH}"