-
Notifications
You must be signed in to change notification settings - Fork 93
/
docker-compose.yaml
45 lines (44 loc) · 1012 Bytes
/
docker-compose.yaml
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
services:
db:
image: postgres:16.4-alpine
environment:
PGPASSWORD: $PGPASSWORD
PGUSER: $PGUSER
POSTGRES_USER: $PGUSER
POSTGRES_PASSWORD: $PGPASSWORD
# PGDATA: /var/lib/postgresql/data/pgdata
restart: always
networks:
- backend_network
# volumes:
# - pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PGUSER}"]
interval: 1s
timeout: 5s
retries: 10
paper_trail:
image: $REGISTRY/$REPO_OWNER/$DOCKER_TAG
build:
context: .
dockerfile: Dockerfile
cache_from:
- $REGISTRY/$REPO_OWNER/$DOCKER_TAG
environment:
PGUSER: $PGUSER
PGPASSWORD: $PGPASSWORD
PGPORT: 5432
PGHOST: db
MIX_ENV: $MIX_ENV
tty: true
depends_on:
db:
condition: service_healthy
networks:
- backend_network
command: ["/bin/sh", "./setup-database.sh"]
# volumes:
# pgdata:
networks:
backend_network:
driver: bridge