Skip to content

Commit be3208c

Browse files
authored
Fix Docker Compose to match staging/prod environments (#4828)
1 parent b56f39c commit be3208c

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

docker-compose.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: labrinth
22
services:
33
postgres_db:
4-
image: postgres:alpine
4+
# staging/prod Labrinth are currently using this version of Postgres
5+
image: postgres:15-alpine
56
container_name: labrinth-postgres
67
volumes:
78
- db-data:/var/lib/postgresql/data
@@ -12,7 +13,7 @@ services:
1213
POSTGRES_PASSWORD: labrinth
1314
POSTGRES_HOST_AUTH_METHOD: trust
1415
healthcheck:
15-
test: ['CMD', 'pg_isready']
16+
test: ['CMD', 'pg_isready', '-U', 'labrinth']
1617
interval: 3s
1718
timeout: 5s
1819
retries: 3
@@ -114,6 +115,30 @@ services:
114115
watch:
115116
- path: ./apps/labrinth
116117
action: rebuild
118+
delphi:
119+
profiles:
120+
- with-delphi
121+
image: ghcr.io/modrinth/delphi:feature-schema-rework
122+
container_name: labrinth-delphi
123+
ports:
124+
- '127.0.0.1:59999:59999'
125+
environment:
126+
LABRINTH_ENDPOINT: http://host.docker.internal:8000/_internal/delphi/ingest
127+
LABRINTH_ADMIN_KEY: feedbeef
128+
healthcheck:
129+
test:
130+
['CMD', 'wget', '-q', '-O/dev/null', 'http://localhost:59999/health']
131+
interval: 3s
132+
timeout: 5s
133+
retries: 3
134+
volumes:
135+
# Labrinth deposits version files here;
136+
# Delphi reads them from here
137+
- /tmp/modrinth:/tmp/modrinth:ro
138+
extra_hosts:
139+
# Delphi must send a message on a webhook to our backend,
140+
# so it must have access to our local network
141+
- 'host.docker.internal:host-gateway'
117142
volumes:
118143
meilisearch-data:
119144
db-data:

0 commit comments

Comments
 (0)