-
Notifications
You must be signed in to change notification settings - Fork 56
/
docker-compose.yml
217 lines (204 loc) · 5.82 KB
/
docker-compose.yml
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
services:
frontend:
image: node:22.12.0
container_name: 'ecamp3-frontend'
ports:
- '9229:9229' # jest debug
stdin_open: true
tty: true
user: ${USER_ID:-1000}
volumes:
- ./.prettierrc:/.prettierrc:delegated
- ./frontend:/app:delegated
- ./common:/common:delegated
- ./pdf:/pdf:delegated
- ./.cache/npm:/home/node/.npm/_cacache:delegated
- ./.cache/npm/sentry-cli:/home/node/.npm/sentry-cli:delegated
environment:
- NODE_ENV=development
- NPM_CONFIG_UPDATE_NOTIFIER=false
- NPM_CONFIG_CACHE=/home/node/.npm
- CI=${CI}
working_dir: /app
command: ./docker-setup.sh
depends_on:
- pdf
api:
image: ecamp/ecamp3-dev-api
build:
context: ./api
target: frankenphp_prod
cache_from:
- ecamp/ecamp3-dev-api
container_name: 'ecamp3-api'
depends_on:
- database
- docker-host
volumes:
- ./api/config/jwt:/app/config/jwt:rw,delegated
ports:
- target: 2019
published: 2019
protocol: tcp
environment:
DATA_MIGRATIONS_DIR: dev-data
DATABASE_URL: "postgresql://ecamp3:ecamp3@database:5432/ecamp3dev?serverVersion=15&charset=utf8"
LOG_LEVEL: debug
ADDITIONAL_TRUSTED_HOSTS: '.*'
SERVER_NAME: ":3001"
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
extra_hosts:
- 'host.docker.internal:host-gateway'
http-cache:
image: varnish:7.6.1
container_name: 'ecamp3-http-cache'
depends_on:
- api
volumes:
- ./api/docker/varnish/vcl/:/etc/varnish/:ro
command: -a :8081,HTTP -p http_max_hdr=96
environment:
- COOKIE_PREFIX=localhost_
- SEND_XKEY_HEADERS_DOWNSTREAM=${SEND_XKEY_HEADERS_DOWNSTREAM:-true}
- VARNISH_HTTP_PORT=8080
pdf:
image: node:22.12.0
container_name: 'ecamp3-pdf'
stdin_open: true
tty: true
user: ${USER_ID:-1000}
volumes:
- ./.prettierrc:/.prettierrc
- ./pdf:/app:delegated
- ./common:/common:delegated
- ./.cache/npm:/home/node/.npm
working_dir: /app
command: ./docker-setup.sh
environment:
- NODE_ENV=development
- NPM_CONFIG_UPDATE_NOTIFIER=false
- NPM_CONFIG_CACHE=/home/node/.npm
- CI=${CI}
print:
image: node:22.12.0
container_name: 'ecamp3-print'
user: ${USER_ID:-1000}
volumes:
- ./.prettierrc:/.prettierrc
- ./print:/app:delegated
- ./common:/common:delegated
- ./.cache/npm:/home/node/.npm/_cacache:delegated
- ./.cache/npm/sentry-cli:/home/node/.npm/sentry-cli:delegated
environment:
- NUXT_HOST=0.0.0.0
- NUXT_PORT=3003
- NITRO_PORT=3003
- NPM_CONFIG_UPDATE_NOTIFIER=false
- NPM_CONFIG_CACHE=/home/node/.npm
- CI=${CI}
env_file:
- ./print/print.env
working_dir: /app
command: ./docker-setup.sh
database:
image: postgres:15-alpine
container_name: 'ecamp3-database'
environment:
- POSTGRES_DB=ecamp3dev
- POSTGRES_PASSWORD=ecamp3
- POSTGRES_USER=ecamp3
volumes:
- db-data-postgres:/var/lib/postgresql/data:rw
- ./create-ecamp3-test-database.sh:/docker-entrypoint-initdb.d/create-ecamp3-test-database.sh
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./api/docker/db/data:/var/lib/postgresql/data:rw
ports:
- target: 5432
published: 5432
protocol: tcp
deploy:
resources:
limits:
memory: ${DB_MEMORY_LIMIT:-128G}
cpus: ${DB_CPU_LIMIT:-8}
pg-admin:
image: dpage/pgadmin4
container_name: 'ecamp3-pg-admin'
depends_on:
- database
environment:
- PGADMIN_DEFAULT_EMAIL=admin@ecamp3.ch
- PGADMIN_DEFAULT_PASSWORD=admin
- PGADMIN_CONFIG_ENABLE_SERVER_PASS_EXEC_CMD=True
volumes:
- ./pgadmin-servers.json:/pgadmin4/servers.json
mail:
image: maildev/maildev
container_name: 'ecamp3-mail'
environment:
- MAILDEV_BASE_PATHNAME=/mail
docker-host:
image: qoomon/docker-host
container_name: 'ecamp3-docker-host-forwarder'
cap_add: ['NET_ADMIN', 'NET_RAW']
restart: on-failure
browserless:
image: browserless/chrome:1.61.1-puppeteer-21.9.0
container_name: 'ecamp3-browserless'
ports:
- '3010:3000'
environment:
- MAX_CONCURRENT_SESSIONS=1
- CONNECTION_TIMEOUT=40000
- MAX_QUEUE_LENGTH=10
- PREBOOT_CHROME=true
- KEEP_ALIVE=true
- ENABLE_DEBUGGER=false
- DISABLED_FEATURES=["downloadEndpoint","functionEndpoint","pdfEndpoint","screencastEndpoint","scrapeEndpoint","statsEndpoint","workspaces"]
- FUNCTION_ENABLE_INCOGNITO_MODE=true
e2e:
image: cypress/included:13.16.1@sha256:af5ec80651fdccf65fc928832a49c08933db187fb8cea5cac15cc412801c45cb
profiles: ['e2e']
container_name: 'ecamp3-e2e'
environment:
- DISPLAY
volumes:
- ./.prettierrc:/.prettierrc
- ./e2e:/e2e:delegated
- /tmp/.X11-unix:/tmp/.X11-unix:rw
network_mode: host
working_dir: /e2e
reverse-proxy:
image: nginx:1.27
container_name: 'ecamp3-reverse-proxy'
volumes:
- ./reverse-proxy-nginx.conf:/etc/nginx/nginx.conf
depends_on:
- frontend
- api
ports:
- target: 3000
published: 3000
protocol: tcp
- target: 3004
published: 3004
protocol: tcp
translation:
image: node:22.12.0
profiles: ['translation']
container_name: 'ecamp3-translation'
volumes:
- ./translation:/translation:delegated
- ./common:/common:delegated
- ./frontend:/frontend:delegated
- ./print:/print:delegated
working_dir: /translation
command: tail -F anything
volumes:
db-data-postgres: null
caddy_data:
caddy_config: