-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
153 lines (141 loc) · 4.32 KB
/
docker-compose.yml
File metadata and controls
153 lines (141 loc) · 4.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
networks:
frontend:
backend:
volumes:
pgdata:
opdata:
x-op-restart-policy: &restart_policy
restart: unless-stopped
x-op-image: &image
image: openproject/openproject:${TAG:-17-slim}
x-op-app: &app
<<: [*image, *restart_policy]
environment:
OPENPROJECT_HTTPS: "${OPENPROJECT_HTTPS:-true}"
OPENPROJECT_HOST__NAME: "${OPENPROJECT_HOST__NAME:-localhost:8080}"
OPENPROJECT_ADDITIONAL__HOST__NAMES: "${OPENPROJECT_ADDITIONAL__HOST__NAMES:-web}" # to allow access from hocuspocus directly
OPENPROJECT_HSTS: "${OPENPROJECT_HSTS:-true}"
OPENPROJECT_RAILS__CACHE__STORE: "memcache"
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
OPENPROJECT_COLLABORATIVE__EDITING__HOCUSPOCUS__URL: "${COLLABORATIVE_SERVER_URL:-wss://${OPENPROJECT_HOST__NAME}/hocuspocus}"
OPENPROJECT_COLLABORATIVE__EDITING__HOCUSPOCUS__SECRET: "${COLLABORATIVE_SERVER_SECRET:-OVERRIDE_ME_PLEASE}"
OPENPROJECT_SEED__ADMIN__USER__PASSWORD: "${OPENPROJECT_SEED__ADMIN__USER__PASSWORD:-admin}"
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}"
SECRET_KEY_BASE: "${SECRET_KEY_BASE:-OVERWRITE_ME}"
OPENPROJECT_MAIL__FROM: "${OPENPROJECT_MAIL__FROM:-openproject@example.net}"
EMAIL_DELIVERY_METHOD: "${EMAIL_DELIVERY_METHOD:-smtp}"
SMTP_ADDRESS: "${SMTP_ADDRESS:-emailserver.com}"
SMTP_PORT: "${SMTP_PORT:-587}"
SMTP_DOMAIN: "${SMTP_DOMAIN:-epfl.ch}"
SMTP_AUTHENTICATION: "${SMTP_AUTHENTICATION:-plain}"
SMTP_USER_NAME: "${SMTP_USER_NAME:-username}"
SMTP_PASSWORD: "${SMTP_PASSWORD:-password}"
SMTP_ENABLE_STARTTLS_AUTO: "${SMTP_ENABLE_STARTTLS_AUTO:-true}"
volumes:
- ./enterprise.rb:/app/app/models/enterprise_token.rb:ro
- "${OPDATA:-opdata}:/var/openproject/assets"
services:
assets-init:
image: alpine:3.19
user: "0:0"
volumes:
- "${OPDATA:-opdata}:/var/openproject/assets"
command: >
sh -lc "mkdir -p /var/openproject/assets/files &&
chown -R 1000:1000 /var/openproject/assets"
db:
image: postgres:17
<<: *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
proxy:
build:
context: ./proxy
args:
APP_HOST: web
image: openproject/proxy
<<: *restart_policy
ports:
- "8080:80"
depends_on:
- web
networks:
- frontend
web:
<<: *app
command: "./docker/prod/web"
hostname: "${OPENPROJECT_HOST__NAME:-localhost:8080}"
networks:
- frontend
- backend
depends_on:
- db
- cache
- seeder
- assets-init
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:
- 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
hocuspocus:
image: openproject/hocuspocus:17.1.0
environment:
SECRET: ${COLLABORATIVE_SERVER_SECRET:-OVERRIDE_ME_PLEASE}
OPENPROJECT_URL: "${OPENPROJECT_URL:-http://web:8080}"
OPENPROJECT_HTTPS: "${OPENPROJECT_HTTPS:-true}"
networks:
- backend
- frontend
<<: *restart_policy