forked from ecamp/ecamp3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
211 lines (200 loc) · 6.13 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
services:
frontend:
image: node:22.9.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_dev
cache_from:
- ecamp/ecamp3-dev-api
container_name: 'ecamp3-api'
depends_on:
- database
- docker-host
ports:
- target: 3000
published: 3000
protocol: tcp
- target: 2019
published: 2019
protocol: tcp
volumes:
- ./api:/app:rw,delegated
- caddy_data:/data
- caddy_config:/config
- ./api/docker/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ./api/docker/php/conf.d/api-platform.dev.ini:/usr/local/etc/php/conf.d/api-platform.ini:delegated
- ./api/docker/php/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint:delegated
- ./.cache/composer:/tmp/composer/cache:delegated
environment:
DATA_MIGRATIONS_DIR: dev-data
# See https://docs.docker.com/docker-for-mac/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host
# See https://github.com/docker/for-linux/issues/264
# The `remote_host` below may optionally be replaced with `remote_connect_back`
# XDEBUG_MODE required for step debugging
XDEBUG_MODE: ${XDEBUG_MODE:-off}
# default port for Xdebug 3 is 9003
# idekey=VSCODE if you are debugging with VSCode
XDEBUG_CONFIG: ${XDEBUG_CONFIG}
# This should correspond to the server declared in PHPStorm `Preferences | Languages & Frameworks | PHP | Servers`
# Then PHPStorm will use the corresponding path mappings
PHP_IDE_CONFIG: serverName=localhost
ADDITIONAL_TRUSTED_HOSTS: '.*'
PERFORMANCE_TEST_DEBUG_OUTPUT: ${PERFORMANCE_TEST_DEBUG_OUTPUT:-}
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
user: ${USER_ID:-1000}
extra_hosts:
- 'host.docker.internal:host-gateway'
http-cache:
image: varnish:7.5.0
container_name: 'ecamp3-http-cache'
depends_on:
- api
volumes:
- ./api/docker/varnish/vcl/:/etc/varnish/:ro
ports:
- target: 8080
published: 3004
protocol: tcp
command: -a :8081,HTTP -p http_max_hdr=96
environment:
- COOKIE_PREFIX=localhost_
- VARNISH_HTTP_PORT=8080
pdf:
image: node:22.9.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.9.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}
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.17.0
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
translation:
image: node:22.9.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: