This repository was archived by the owner on Aug 20, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcompose.override.yaml
More file actions
202 lines (200 loc) · 8.56 KB
/
Copy pathcompose.override.yaml
File metadata and controls
202 lines (200 loc) · 8.56 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
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
# The scheduler worker, as in compose.yaml, but on the development image and the mounted source so a change to
# a command or a schedule takes effect on restart rather than on rebuild. `depends_on` is restated in full because a
# merge replaces it, and here it also has to wait for the database it talks to directly.
x-worker-dev: &worker_dev
image: abc.docker-registry.gewis.nl/db/gewisdb/web:development
build:
dockerfile: Dockerfile
context: .
target: gewisdb_web_development
volumes:
- ./:/app:rw
- /app/var/
depends_on:
postgresql:
condition: service_started
web:
condition: service_healthy
services:
postgresql:
build: docker/postgresql
env_file:
- .env
# Not committed, and not every checkout has one, so compose is told it may be missing.
- path: .env.local
required: false
volumes:
- postgresql:/var/lib/postgresql/data:rw
networks:
- network
ports:
- "5432:5432"
restart: unless-stopped
pgadmin:
build:
dockerfile: docker/pgadmin/Dockerfile
context: .
env_file:
- .env
# Not committed, and not every checkout has one, so compose is told it may be missing.
- path: .env.local
required: false
depends_on:
- postgresql
networks:
- network
ports:
- "8080:80"
restart: unless-stopped
# Mailpit, as GEWISWEB uses: it catches everything the application sends and shows it on :8025. It stands in for
# the postfix relay of the production stack, which is why it answers to the same name the web service depends on.
postfix:
image: axllent/mailpit
hostname: mailpit
environment:
- MP_SMTP_BIND_ADDR=0.0.0.0:1025
ports:
- "8025:8025"
mailman-core:
image: maxking/mailman-core:0.5
hostname: mailman-core
volumes:
- mailman-core:/opt/mailman/
depends_on:
- postgresql
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgresql/${POSTGRES_MAILMAN_DATABASE}
- DATABASE_TYPE=postgres
- DATABASE_CLASS=mailman.database.postgresql.PostgreSQLDatabase
- HYPERKITTY_API_KEY=somerandomapikeythatiobviouslydidnotcreatemyself
- MAILMAN_DOMAIN=${SERVER_HOSTNAME}
- SMTP_HOST=postfix
- SMTP_PORT=1025
- SMTP_SECURE_MODE=smtp
ports:
- "8020:8001"
networks:
- network
mailman-web:
image: maxking/mailman-web:0.5
hostname: mailman-web
depends_on:
- postgresql
volumes:
- mailman-web:/opt/mailman-web-data/
- mailman-static:/opt/mailman-web-data/static/
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgresql/${POSTGRES_MAILMAN_DATABASE}
- DATABASE_TYPE=postgres
- DJANGO_ALLOWED_HOSTS=127.0.0.1,localhost,mailmanw
- HYPERKITTY_API_KEY=somerandomapikeythatiobviouslydidnotcreatemyself
- SECRET_KEY=anotherandomkeythatiobviouslydidnotcreatemyself
- SERVE_FROM_DOMAIN=localhost
- UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static
- MAILMAN_ADMIN_USER=${DEMO_CREDENTIALS_USERNAME}
- MAILMAN_ADMIN_EMAIL=${DEMO_CREDENTIALS_USERNAME}@${SERVER_HOSTNAME}
- DJANGO_SUPERUSER_USERNAME=${DEMO_CREDENTIALS_USERNAME}
- DJANGO_SUPERUSER_EMAIL=${DEMO_CREDENTIALS_USERNAME}@${SERVER_HOSTNAME}
- DJANGO_SUPERUSER_PASSWORD=${DEMO_CREDENTIALS_PASSWORD}
- SMTP_HOST=postfix
- SMTP_PORT=1025
ports:
- "8021:8000"
networks:
- network
listmonk:
image: listmonk/listmonk:latest
restart: unless-stopped
ports:
- "8022:9000"
depends_on:
- postgresql
command: [sh, -c, "./listmonk --install --idempotent --yes --config '' && ./listmonk --upgrade --yes --config '' && ./listmonk --config ''"]
# --config (file) param is set to empty so that listmonk only uses the env vars (below) for config.
# --install --idempotent ensures that DB installation happens only once on an empty DB, on the first ever start.
# --upgrade automatically runs any DB migrations when a new image is pulled.
hostname: listmonk
networks:
- network
environment:
LISTMONK_app__address: 0.0.0.0:9000
LISTMONK_db__user: ${POSTGRES_USER}
LISTMONK_db__password: ${POSTGRES_PASSWORD}
LISTMONK_db__database: ${POSTGRES_LISTMONK_DATABASE}
LISTMONK_db__host: postgresql
LISTMONK_db__port: 5432
LISTMONK_db__ssl_mode: disable
LISTMONK_db__max_open: 25
LISTMONK_db__max_idle: 25
LISTMONK_db__max_lifetime: 300s
TZ: ${TZ}
LISTMONK_ADMIN_USER: ${DEMO_CREDENTIALS_USERNAME}
LISTMONK_ADMIN_PASSWORD: ${DEMO_CREDENTIALS_PASSWORD}
volumes:
- listmonk-uploads:/listmonk/uploads:rw
stripe:
image: stripe/stripe-cli:latest
command: listen --forward-to web:9725/member/subscribe/checkout/webhook --skip-update -e charge.refund.updated,checkout.session.expired,checkout.session.completed,checkout.session.async_payment_succeeded,checkout.session.async_payment_failed
environment:
- STRIPE_API_KEY=${STRIPE_SECRET_KEY:-}
- STRIPE_DEVICE_NAME="GEWISDB on ${HOST:-}${NAME:-}"
- STRIPE_CLI_TELEMETRY_OPTOUT=1
depends_on:
- web
networks:
- network
scheduler:
<<: *worker_dev
web:
image: abc.docker-registry.gewis.nl/db/gewisdb/web:development
build:
dockerfile: Dockerfile
context: .
target: gewisdb_web_development
environment:
# Caddy answers on the three public hosts plus the plain name the other containers use.
- SERVER_NAME=:9725
# Hot reload, the way GEWISWEB has it, which is two halves. `watch` restarts the workers when a
# watched file changes — without it the kernel stays in memory and a code change does nothing until the
# container is restarted. `hot_reload` then tells the browser to reload itself, which it does over the
# Mercure hub in the Caddyfile; `anonymous` is what lets the page subscribe without a token, and `ui`
# serves the hub's own debug page.
#
# The directories are named rather than watching /app whole. Symfony rewrites `var/cache` as it serves,
# so watching everything means the workers restart on their own cache writes, in a loop that never
# settles. `var/sass` and `var/typescript` are where the two asset watchers put what they compile, and
# they are watched so a change to a stylesheet or a controller still reloads the page.
- |
FRANKENPHP_WORKER_CONFIG=watch ./src
watch ./config
watch ./templates
watch ./translations
watch ./assets
watch ./var/sass
watch ./var/typescript
- FRANKENPHP_SITE_CONFIG=hot_reload
- |
MERCURE_EXTRA_DIRECTIVES=ui
anonymous
- MERCURE_PUBLISHER_JWT_KEY=${MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!}
- MERCURE_SUBSCRIBER_JWT_KEY=${MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!}
- XDEBUG_MODE=${XDEBUG_MODE:-off}
volumes:
# The whole project is mounted so a change is picked up without a rebuild.
# `var/` stays inside the container so its cache does not fight the one the host tooling writes.
- ./:/app:rw
- /app/var/
# Mounted read-only so a change to either takes effect without rebuilding the image, as GEWISWEB does.
- ./docker/web/frankenphp/Caddyfile:/etc/frankenphp/Caddyfile:ro
- ./docker/web/frankenphp/conf.d/20-gewisdb.dev.ini:/usr/local/etc/php/app.conf.d/20-gewisdb.dev.ini:ro
ports:
- "9725:9725"
depends_on:
- mailman-core
- postgresql
volumes:
postgresql:
mailman-web:
mailman-core:
mailman-static:
listmonk-uploads: