-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
65 lines (61 loc) · 1.4 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
healthcheck:
test: pg_isready -d db_prod
interval: 10s
timeout: 3s
retries: 3
volumes:
- db_data:/var/lib/postgresql/data
- ./.docker/data:/data
ports:
- 5432:5432
localstack:
image: localstack/localstack:3.2
environment:
- SERVICES=sns
- AWS_DEFAULT_REGION=eu-east-1
migrate:
depends_on:
postgres:
condition: service_healthy
build:
context: .
command:
/app/migrate.sh
volumes:
- ./schema/metrics:/app/schema/metrics
- ./schema/sql:/app/schema/sql
- ./src:/app/src
- ./.docker/app.cfg:/app/app.cfg
- ./.docker/migrate.sh:/app/migrate.sh
app:
depends_on:
postgres:
condition: service_healthy
localstack:
condition: service_healthy
migrate:
condition: service_completed_successfully
healthcheck:
test: curl http://localhost:8000
interval: 10s
timeout: 3s
retries: 3
build:
context: .
ports:
- 8000:8000
volumes:
- ./schema/metrics:/app/schema/metrics
- ./schema/sql:/app/schema/sql
- ./src:/app/src
- ./.docker/app.cfg:/app/app.cfg
- ./.docker/migrate.sh:/app/migrate.sh
- ./.docker/client-secrets.json:/app/client-secrets.json
volumes:
db_data: