-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
68 lines (62 loc) · 1.22 KB
/
docker-compose.yml
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
version: "3.7"
services:
api:
container_name: "GAME_API"
build:
context: .
target: prod
ports:
- "80:8000"
env_file:
- .env.prod
environment:
- ENV=prod
networks:
- backend
depends_on:
- postgres
volumes:
- game-logs:/app/logs
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "10"
labels: "app=high_logging"
env: "ENV,DEBUG"
tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
postgres:
container_name: "postgres"
image: postgres
hostname: db
ports:
- "5432:5432"
env_file:
- .env.prod
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
networks:
- backend
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck_service:
build: ./healthcheck_service
container_name: health_checker
env_file:
- .env.prod
environment:
DB_HOST: "postgres"
API_URL_KPI: "http://api:8000/api/v1/kpi"
depends_on:
- postgres
networks:
- backend
- api
networks:
backend:
driver: "bridge"
volumes:
postgres-data:
game-logs: