2023-12-24 18:48:38 +01:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
frontend:
|
|
|
|
backend:
|
|
|
|
|
|
|
|
volumes:
|
2023-12-31 11:14:18 +01:00
|
|
|
database:
|
|
|
|
data:
|
2023-12-24 18:48:38 +01:00
|
|
|
|
|
|
|
x-op-restart-policy: &restart_policy
|
|
|
|
restart: unless-stopped
|
|
|
|
x-op-image: &image
|
|
|
|
image: openproject/community:${TAG:-13}
|
|
|
|
x-op-app: &app
|
|
|
|
<<: [*image, *restart_policy]
|
|
|
|
environment:
|
2023-12-31 11:14:18 +01:00
|
|
|
OPENPROJECT_HTTPS: "${OPENPROJECT_HTTPS}"
|
|
|
|
OPENPROJECT_HOST__NAME: "${OPENPROJECT_HOST__NAME}"
|
2023-12-24 18:48:38 +01:00
|
|
|
OPENPROJECT_HSTS: "${OPENPROJECT_HSTS:-true}"
|
|
|
|
RAILS_CACHE_STORE: "memcache"
|
|
|
|
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
|
|
|
|
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
2023-12-30 15:22:18 +01:00
|
|
|
DATABASE_URL: "${DATABASE_URL}"
|
2023-12-24 18:48:38 +01:00
|
|
|
RAILS_MIN_THREADS: ${RAILS_MIN_THREADS:-4}
|
|
|
|
RAILS_MAX_THREADS: ${RAILS_MAX_THREADS:-16}
|
|
|
|
# set to true to enable the email receiving feature. See ./docker/cron for more options
|
|
|
|
IMAP_ENABLED: "${IMAP_ENABLED:-false}"
|
|
|
|
volumes:
|
2023-12-31 11:14:18 +01:00
|
|
|
- "data:/var/openproject/assets"
|
|
|
|
- "database:/var/openproject/pgdata"
|
2023-12-24 18:48:38 +01:00
|
|
|
|
|
|
|
services:
|
2023-12-31 11:14:18 +01:00
|
|
|
|
|
|
|
{% if not ( enable_central_database | lower | bool ) %}
|
|
|
|
{% include 'templates/docker-postgres-service.yml.j2' %}
|
|
|
|
{% endif %}
|
2023-12-24 18:48:38 +01:00
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
|
|
|
|
cache:
|
|
|
|
image: memcached
|
|
|
|
<<: *restart_policy
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
|
|
|
|
proxy:
|
|
|
|
<<: [*image, *restart_policy]
|
|
|
|
command: "./docker/prod/proxy"
|
|
|
|
ports:
|
2023-12-31 11:14:18 +01:00
|
|
|
- "${PORT}:80"
|
2023-12-24 18:48:38 +01:00
|
|
|
environment:
|
|
|
|
APP_HOST: web
|
|
|
|
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
|
|
|
depends_on:
|
|
|
|
- web
|
|
|
|
networks:
|
|
|
|
- frontend
|
2023-12-24 21:42:32 +01:00
|
|
|
volumes:
|
2023-12-31 11:14:18 +01:00
|
|
|
- "data:/var/openproject/assets"
|
|
|
|
- "database:/var/openproject/pgdata"
|
2023-12-24 21:42:32 +01:00
|
|
|
|
2023-12-24 18:48:38 +01:00
|
|
|
web:
|
|
|
|
<<: *app
|
|
|
|
command: "./docker/prod/web"
|
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
|
|
|
depends_on:
|
2023-12-31 11:14:18 +01:00
|
|
|
{% if not ( enable_central_database | lower | bool ) %}
|
2023-12-30 15:22:18 +01:00
|
|
|
- database
|
2023-12-31 11:14:18 +01:00
|
|
|
{% endif %}
|
2023-12-24 18:48:38 +01:00
|
|
|
- cache
|
|
|
|
- seeder
|
|
|
|
labels:
|
|
|
|
- autoheal=true
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}/health_checks/default"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 3s
|
|
|
|
retries: 3
|
|
|
|
start_period: 30s
|
|
|
|
|
|
|
|
autoheal:
|
|
|
|
image: willfarrell/autoheal:1.2.0
|
|
|
|
volumes:
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
|
|
|
environment:
|
|
|
|
AUTOHEAL_CONTAINER_LABEL: autoheal
|
|
|
|
AUTOHEAL_START_PERIOD: 600
|
|
|
|
AUTOHEAL_INTERVAL: 30
|
|
|
|
|
|
|
|
worker:
|
|
|
|
<<: *app
|
|
|
|
command: "./docker/prod/worker"
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
depends_on:
|
2023-12-31 11:14:18 +01:00
|
|
|
{% if not ( enable_central_database | lower | bool ) %}
|
2023-12-30 15:22:18 +01:00
|
|
|
- database
|
2023-12-31 11:14:18 +01:00
|
|
|
{% endif %}
|
2023-12-24 18:48:38 +01:00
|
|
|
- cache
|
|
|
|
- seeder
|
|
|
|
|
|
|
|
cron:
|
|
|
|
<<: *app
|
|
|
|
command: "./docker/prod/cron"
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
depends_on:
|
2023-12-31 11:14:18 +01:00
|
|
|
{% if not ( enable_central_database | lower | bool ) %}
|
2023-12-30 15:22:18 +01:00
|
|
|
- database
|
2023-12-31 11:14:18 +01:00
|
|
|
{% endif %}
|
2023-12-24 18:48:38 +01:00
|
|
|
- cache
|
|
|
|
- seeder
|
|
|
|
|
|
|
|
seeder:
|
|
|
|
<<: *app
|
|
|
|
command: "./docker/prod/seeder"
|
|
|
|
restart: on-failure
|
|
|
|
networks:
|
|
|
|
- backend
|