@@ -36,8 +36,6 @@ services:
3636 POSTGRES_USER : apollo
3737 POSTGRES_PASSWORD : apollo
3838 POSTGRES_DB : apollo
39- ports :
40- - " 5432:5432"
4139 volumes :
4240 - pgdata:/var/lib/postgresql/data
4341 healthcheck :
@@ -59,17 +57,13 @@ services:
5957 SERVER_RESET_QUERY : DISCARD ALL
6058 AUTH_TYPE : scram-sha-256
6159 ADMIN_USERS : postgres,apollo
62- ports :
63- - " 6432:6432"
6460 depends_on :
6561 postgres :
6662 condition : service_healthy
6763
6864 redis-queue :
6965 image : redis:7-alpine
7066 command : ["redis-server", "--maxmemory-policy", "noeviction"]
71- ports :
72- - " 6379:6379"
7367 healthcheck :
7468 test : ["CMD", "redis-cli", "ping"]
7569 interval : 5s
@@ -79,8 +73,6 @@ services:
7973 redis-locks :
8074 image : redis:7-alpine
8175 command : ["redis-server", "--maxmemory-policy", "noeviction"]
82- ports :
83- - " 6380:6379"
8476 healthcheck :
8577 test : ["CMD", "redis-cli", "ping"]
8678 interval : 5s
@@ -91,7 +83,9 @@ services:
9183 # unreachable, but it doesn't care what's actually on the other end.
9284 statsd :
9385 image : alpine:3.19
94- command : ["sh", "-c", "apk add --no-cache socat >/dev/null && exec socat -u udp-recv:8125 stdout"]
86+ entrypoint : /statsd.sh
87+ volumes :
88+ - ./docker/statsd.sh:/statsd.sh:ro
9589 expose :
9690 - " 8125/udp"
9791
@@ -103,18 +97,10 @@ services:
10397 image : postgres:14-alpine
10498 environment :
10599 PGPASSWORD : apollo
106- entrypoint : ["sh", "-c"]
107- command :
108- - |
109- set -e
110- if psql -h postgres -U apollo -d apollo -tAc "SELECT to_regclass('public.accounts')" | grep -q accounts; then
111- echo "schema already loaded, skipping"
112- else
113- psql -h postgres -U apollo -d apollo -v ON_ERROR_STOP=1 -f /schema.sql
114- echo "schema loaded"
115- fi
100+ entrypoint : /migrate.sh
116101 volumes :
117102 - ./docs/schema.sql:/schema.sql:ro
103+ - ./docker/migrate.sh:/migrate.sh:ro
118104 depends_on :
119105 postgres :
120106 condition : service_healthy
0 commit comments