mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-07-01 18:30:34 +00:00
Restructure startup procedure
This commit is contained in:
@ -1,8 +1,17 @@
|
||||
version: "3.5"
|
||||
|
||||
# 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.
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: "${DOCKER_NETWORK_NAME:-nopaque_default}"
|
||||
name: "${DOCKER_DEFAULT_NETWORK_NAME}"
|
||||
|
||||
services:
|
||||
db:
|
||||
@ -10,28 +19,46 @@ services:
|
||||
image: postgres:11
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- "${HOST_DATA_DIR:-./data}/db:/var/lib/postgresql/data"
|
||||
- type: bind
|
||||
source: "${DOCKER_DB_SERVICE_DATA_VOLUME_SOURCE_PATH}"
|
||||
target: "/var/lib/postgresql/data"
|
||||
|
||||
mq:
|
||||
image: redis:6
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- "${HOST_DATA_DIR:-./data}/mq:/data"
|
||||
- type: bind
|
||||
source: "${DOCKER_MQ_SERVICE_DATA_VOLUME_SOURCE_PATH}"
|
||||
target: "/data"
|
||||
|
||||
nopaque:
|
||||
build:
|
||||
args:
|
||||
DOCKER_GID: ${HOST_DOCKER_GID}
|
||||
GID: ${HOST_GID}
|
||||
UID: ${HOST_UID}
|
||||
context: .
|
||||
build: .
|
||||
depends_on:
|
||||
- db
|
||||
- mq
|
||||
env_file: .env
|
||||
env_file:
|
||||
- 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_LOGS_PATH=/home/nopaque/logs
|
||||
image: nopaque:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
- "${NOPAQUE_DATA_DIR:-/mnt/nopaque}:${NOPAQUE_DATA_DIR:-/mnt/nopaque}"
|
||||
- "${HOST_LOG_DIR-./logs}:${NOPAQUE_LOG_DIR:-/home/nopaque/logs}"
|
||||
- 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}"
|
||||
target: "/home/nopaque/logs"
|
||||
|
Reference in New Issue
Block a user