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:
|
networks:
|
||||||
database:
|
|
||||||
external: true
|
|
||||||
frontend:
|
frontend:
|
||||||
backend:
|
backend:
|
||||||
traefik:
|
|
||||||
external: true
|
|
||||||
volumes:
|
volumes:
|
||||||
|
pgdata:
|
||||||
opdata:
|
opdata:
|
||||||
|
|
||||||
x-op-restart-policy: &restart_policy
|
x-op-restart-policy: &restart_policy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
x-op-image: &image
|
x-op-image: &image
|
||||||
image: openproject/openproject:${OPENPROJECT_TAG:-15-slim}
|
image: openproject/openproject:${TAG:-15-slim}
|
||||||
x-op-app: &app
|
x-op-app: &app
|
||||||
<<: [*image, *restart_policy]
|
<<: [*image, *restart_policy]
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -21,21 +19,32 @@ x-op-app: &app
|
||||||
RAILS_CACHE_STORE: "memcache"
|
RAILS_CACHE_STORE: "memcache"
|
||||||
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
|
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
|
||||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
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"
|
DATABASE_URL: "${DATABASE_URL:-postgres://postgres:p4ssw0rd@db/openproject?pool=20&encoding=unicode&reconnect=true}"
|
||||||
RAILS_MIN_THREADS: ${OPENPROJECT_RAILS_MIN_THREADS:-4}
|
RAILS_MIN_THREADS: ${RAILS_MIN_THREADS:-4}
|
||||||
RAILS_MAX_THREADS: ${OPENPROJECT_RAILS_MAX_THREADS:-16}
|
RAILS_MAX_THREADS: ${RAILS_MAX_THREADS:-16}
|
||||||
# set to true to enable the email receiving feature. See ./docker/cron for more options
|
# 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:
|
volumes:
|
||||||
- "${OPENPROJECT_OPDATA:-opdata}:/var/openproject/assets"
|
- "${OPDATA:-opdata}:/var/openproject/assets"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
cache:
|
db:
|
||||||
image: memcached
|
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:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
- database
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
build:
|
build:
|
||||||
|
|
@ -43,30 +52,22 @@ services:
|
||||||
args:
|
args:
|
||||||
APP_HOST: web
|
APP_HOST: web
|
||||||
image: openproject/proxy
|
image: openproject/proxy
|
||||||
|
<<: *restart_policy
|
||||||
|
ports:
|
||||||
|
- "${PORT:-8080}:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
- web
|
- 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:
|
networks:
|
||||||
- traefik
|
|
||||||
- frontend
|
- frontend
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
<<: *app
|
<<: *app
|
||||||
command: "./docker/prod/web"
|
command: "./docker/prod/web"
|
||||||
networks:
|
networks:
|
||||||
- database
|
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- db
|
||||||
- cache
|
- cache
|
||||||
- seeder
|
- seeder
|
||||||
labels:
|
labels:
|
||||||
|
|
@ -92,8 +93,8 @@ services:
|
||||||
command: "./docker/prod/worker"
|
command: "./docker/prod/worker"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
- database
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- db
|
||||||
- cache
|
- cache
|
||||||
- seeder
|
- seeder
|
||||||
|
|
||||||
|
|
@ -102,8 +103,8 @@ services:
|
||||||
command: "./docker/prod/cron"
|
command: "./docker/prod/cron"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
- database
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- db
|
||||||
- cache
|
- cache
|
||||||
- seeder
|
- seeder
|
||||||
|
|
||||||
|
|
@ -113,5 +114,3 @@ services:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
- database
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue