-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
82 lines (78 loc) · 1.67 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
services:
arp_fetcher:
build: ./fetcher
image: arp_fetcher:v0.1.0
container_name: arp_fetcher
environment:
PG_DB: ${PG_DB}
PG_USER: ${PG_USER}
PG_PASSWORD: ${PG_PASSWORD}
PYTHONPATH: .
depends_on:
- db
restart: unless-stopped
networks:
- arp_bridge
logging:
driver: "json-file"
options:
max-size: "2m"
max-file: "3"
visualizer:
build: ./visualizer
image: arp_visualizer:v0.1.0
container_name: arp_visualizer
environment:
PG_DB: ${PG_DB}
PG_USER: ${PG_USER}
PG_PASSWORD: ${PG_PASSWORD}
PYTHONPATH: .
depends_on:
- db
- arp_fetcher
ports:
- "8000:8000"
networks:
- arp_bridge
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health"]
interval: 20s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
db:
image: postgres:17
container_name: postgres_db
environment:
POSTGRES_DB: ${PG_DB}
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PASSWORD}
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- arp_bridge
logging:
driver: "json-file"
options:
max-size: "2m"
max-file: "3"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PG_USER} -d ${PG_DB} -h localhost"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
restart: unless-stopped
volumes:
db_data:
networks:
arp_bridge:
driver: bridge