114 lines
2.6 KiB
YAML
114 lines
2.6 KiB
YAML
version: "3.7"
|
|
|
|
networks:
|
|
frontend:
|
|
external: true
|
|
backend:
|
|
|
|
volumes:
|
|
pgdata:
|
|
opdata:
|
|
|
|
x-op-restart-policy: &restart_policy
|
|
restart: unless-stopped
|
|
x-op-image: &image
|
|
image: openproject/community:${TAG:-11}
|
|
x-op-app: &app
|
|
<<: *image
|
|
<<: *restart_policy
|
|
environment:
|
|
RAILS_CACHE_STORE: "memcache"
|
|
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
|
|
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
|
DATABASE_URL: "postgres://postgres:p4ssw0rd@db/openproject?pool=20&encoding=unicode&reconnect=true"
|
|
RAILS_MIN_THREADS: 4
|
|
RAILS_MAX_THREADS: 16
|
|
USE_PUMA: "true"
|
|
# set to true to enable the email receiving feature. See ./docker/cron for more options
|
|
IMAP_ENABLED: "${IMAP_ENABLED:-false}"
|
|
volumes:
|
|
- "opdata:/var/openproject/assets"
|
|
|
|
services:
|
|
db:
|
|
image: postgres:10
|
|
<<: *restart_policy
|
|
stop_grace_period: "3s"
|
|
volumes:
|
|
- "pgdata:/var/lib/postgresql/data"
|
|
environment:
|
|
POSTGRES_PASSWORD: p4ssw0rd
|
|
POSTGRES_DB: openproject
|
|
networks:
|
|
- backend
|
|
|
|
cache:
|
|
image: memcached
|
|
<<: *restart_policy
|
|
networks:
|
|
- backend
|
|
|
|
proxy:
|
|
<<: *image
|
|
<<: *restart_policy
|
|
command: "./docker/prod/proxy"
|
|
#ports:
|
|
# - "${PORT:-8080}:80"
|
|
environment:
|
|
APP_HOST: web
|
|
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
|
depends_on:
|
|
- web
|
|
networks:
|
|
- frontend
|
|
labels:
|
|
traefik.enable: "true"
|
|
traefik.docker.network: "frontend"
|
|
|
|
traefik.http.routers.openproject-http.rule: "Host(`${DOMAIN}`)"
|
|
traefik.http.routers.openproject-http.entrypoints: "entrypoints-http"
|
|
traefik.http.routers.openproject-http.middlewares: "redirect"
|
|
traefik.http.middlewares.redirect.redirectscheme.scheme: "https"
|
|
|
|
traefik.http.routers.openproject-https.rule: "Host(`${DOMAIN}`)"
|
|
traefik.http.routers.openproject-https.entrypoints: "entrypoints-https"
|
|
traefik.http.routers.openproject-https.tls.certresolver: "myresolver"
|
|
|
|
web:
|
|
<<: *app
|
|
command: "./docker/prod/web"
|
|
networks:
|
|
- frontend
|
|
- backend
|
|
depends_on:
|
|
- db
|
|
- cache
|
|
- seeder
|
|
|
|
worker:
|
|
<<: *app
|
|
command: "./docker/prod/worker"
|
|
networks:
|
|
- backend
|
|
depends_on:
|
|
- db
|
|
- cache
|
|
- seeder
|
|
|
|
cron:
|
|
<<: *app
|
|
command: "./docker/prod/cron"
|
|
networks:
|
|
- backend
|
|
depends_on:
|
|
- db
|
|
- cache
|
|
- seeder
|
|
|
|
seeder:
|
|
<<: *app
|
|
command: "./docker/prod/seeder"
|
|
restart: on-failure
|
|
networks:
|
|
- backend
|