Dockge
This commit is contained in:
11
opt/stacks/open-project/.env
Normal file
11
opt/stacks/open-project/.env
Normal file
@ -0,0 +1,11 @@
|
||||
TAG=14-slim
|
||||
OPENPROJECT_HTTPS=false
|
||||
OPENPROJECT_HOST__NAME=open-project.affirm.duckdns.org
|
||||
PORT=192.168.31.12:8080
|
||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT=
|
||||
IMAP_ENABLED=false
|
||||
DATABASE_URL=postgres://postgres:p4ssw0rd@db/openproject?pool=20&encoding=unicode&reconnect=true
|
||||
RAILS_MIN_THREADS=4
|
||||
RAILS_MAX_THREADS=16
|
||||
PGDATA="/var/lib/postgresql/data"
|
||||
OPDATA="/var/openproject/assets"
|
||||
112
opt/stacks/open-project/compose.yaml
Normal file
112
opt/stacks/open-project/compose.yaml
Normal file
@ -0,0 +1,112 @@
|
||||
networks:
|
||||
frontend: null
|
||||
backend: null
|
||||
volumes:
|
||||
pgdata: null
|
||||
opdata: null
|
||||
x-op-restart-policy: &a2
|
||||
restart: unless-stopped
|
||||
x-op-image: &a1
|
||||
image: openproject/openproject:${TAG:-15-slim}
|
||||
x-op-app: &a3
|
||||
<<:
|
||||
- *a1
|
||||
- *a2
|
||||
environment:
|
||||
OPENPROJECT_HTTPS: ${OPENPROJECT_HTTPS:-true}
|
||||
OPENPROJECT_HOST__NAME: ${OPENPROJECT_HOST__NAME:-localhost:8080}
|
||||
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:-}
|
||||
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: ${IMAP_ENABLED:-false}
|
||||
volumes:
|
||||
- ${OPDATA:-opdata}:/var/openproject/assets
|
||||
services:
|
||||
db:
|
||||
image: postgres:13
|
||||
<<: *a2
|
||||
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
|
||||
<<: *a2
|
||||
networks:
|
||||
- backend
|
||||
proxy:
|
||||
build:
|
||||
context: ./proxy
|
||||
args:
|
||||
APP_HOST: web
|
||||
image: openproject/proxy
|
||||
<<: *a2
|
||||
ports:
|
||||
- ${PORT:-8080}:80
|
||||
depends_on:
|
||||
- web
|
||||
networks:
|
||||
- frontend
|
||||
web:
|
||||
<<: *a3
|
||||
command: ./docker/prod/web
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
depends_on:
|
||||
- db
|
||||
- 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:
|
||||
<<: *a3
|
||||
command: ./docker/prod/worker
|
||||
networks:
|
||||
- backend
|
||||
depends_on:
|
||||
- db
|
||||
- cache
|
||||
- seeder
|
||||
cron:
|
||||
<<: *a3
|
||||
command: ./docker/prod/cron
|
||||
networks:
|
||||
- backend
|
||||
depends_on:
|
||||
- db
|
||||
- cache
|
||||
- seeder
|
||||
seeder:
|
||||
<<: *a3
|
||||
command: ./docker/prod/seeder
|
||||
restart: on-failure
|
||||
networks:
|
||||
- backend
|
||||
Reference in New Issue
Block a user