back to origin
This commit is contained in:
parent
8aa912ce5a
commit
d1e811e164
2 changed files with 29 additions and 30 deletions
|
|
@ -1,17 +1,15 @@
|
|||
networks:
|
||||
database:
|
||||
external: true
|
||||
frontend:
|
||||
backend:
|
||||
traefik:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
opdata:
|
||||
|
||||
x-op-restart-policy: &restart_policy
|
||||
restart: unless-stopped
|
||||
x-op-image: &image
|
||||
image: openproject/openproject:${OPENPROJECT_TAG:-15-slim}
|
||||
image: openproject/openproject:${TAG:-15-slim}
|
||||
x-op-app: &app
|
||||
<<: [*image, *restart_policy]
|
||||
environment:
|
||||
|
|
@ -21,21 +19,32 @@ x-op-app: &app
|
|||
RAILS_CACHE_STORE: "memcache"
|
||||
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
|
||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
||||
DATABASE_URL: "postgres://${OPENPROJECT_DB_USER:-openproject}:${OPENPROJECT_DB_PASSWORD:-openproject}@postgres/openproject?pool=20&encoding=unicode&reconnect=true"
|
||||
RAILS_MIN_THREADS: ${OPENPROJECT_RAILS_MIN_THREADS:-4}
|
||||
RAILS_MAX_THREADS: ${OPENPROJECT_RAILS_MAX_THREADS:-16}
|
||||
DATABASE_URL: "${DATABASE_URL:-postgres://postgres:p4ssw0rd@db/openproject?pool=20&encoding=unicode&reconnect=true}"
|
||||
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: "${OPENPROJECT_IMAP_ENABLED:-false}"
|
||||
IMAP_ENABLED: "${IMAP_ENABLED:-false}"
|
||||
volumes:
|
||||
- "${OPENPROJECT_OPDATA:-opdata}:/var/openproject/assets"
|
||||
- "${OPDATA:-opdata}:/var/openproject/assets"
|
||||
|
||||
services:
|
||||
cache:
|
||||
image: memcached
|
||||
db:
|
||||
image: postgres:13
|
||||
<<: *restart_policy
|
||||
stop_grace_period: "3s"
|
||||
volumes:
|
||||
- "${PGDATA:-pgdata}:/var/lib/postgresql/data"
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-p4ssw0rd}
|
||||
POSTGRES_DB: openproject
|
||||
networks:
|
||||
- backend
|
||||
|
||||
cache:
|
||||
image: memcached
|
||||
<<: *restart_policy
|
||||
networks:
|
||||
- backend
|
||||
- database
|
||||
restart: unless-stopped
|
||||
|
||||
proxy:
|
||||
build:
|
||||
|
|
@ -43,30 +52,22 @@ services:
|
|||
args:
|
||||
APP_HOST: web
|
||||
image: openproject/proxy
|
||||
<<: *restart_policy
|
||||
ports:
|
||||
- "${PORT:-8080}:80"
|
||||
depends_on:
|
||||
- web
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=traefik
|
||||
- traefik.http.routers.openproject.entrypoints=web,websecure
|
||||
- traefik.http.routers.openproject.middlewares=https-redirect
|
||||
- traefik.http.routers.openproject.tls=true
|
||||
- traefik.http.routers.openproject.tls.certresolver=le
|
||||
- traefik.http.routers.openproject.rule=Host(`${OPENPROJECT_DOMAIN}`)
|
||||
- traefik.http.services.openproject.loadbalancer.server.port=80
|
||||
networks:
|
||||
- traefik
|
||||
- frontend
|
||||
restart: unless-stopped
|
||||
|
||||
web:
|
||||
<<: *app
|
||||
command: "./docker/prod/web"
|
||||
networks:
|
||||
- database
|
||||
- frontend
|
||||
- backend
|
||||
depends_on:
|
||||
- db
|
||||
- cache
|
||||
- seeder
|
||||
labels:
|
||||
|
|
@ -92,8 +93,8 @@ services:
|
|||
command: "./docker/prod/worker"
|
||||
networks:
|
||||
- backend
|
||||
- database
|
||||
depends_on:
|
||||
- db
|
||||
- cache
|
||||
- seeder
|
||||
|
||||
|
|
@ -102,8 +103,8 @@ services:
|
|||
command: "./docker/prod/cron"
|
||||
networks:
|
||||
- backend
|
||||
- database
|
||||
depends_on:
|
||||
- db
|
||||
- cache
|
||||
- seeder
|
||||
|
||||
|
|
@ -113,5 +114,3 @@ services:
|
|||
restart: on-failure
|
||||
networks:
|
||||
- backend
|
||||
- database
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue