-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.development.yml
More file actions
55 lines (52 loc) · 1.27 KB
/
docker-compose.development.yml
File metadata and controls
55 lines (52 loc) · 1.27 KB
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
version: '3.8'
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: tguard
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
volumes:
- ./data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
bot:
build: .
depends_on:
postgres:
condition: service_healthy
environment:
- PYTHONPATH=/app
volumes:
- ./config.toml:/app/config.toml
command: python -m src.bot.main
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "python -c \"import sys; sys.exit(0)\"" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
api:
build: .
depends_on:
postgres:
condition: service_healthy
ports:
- "17985:8000"
environment:
- PYTHONPATH=/app
volumes:
- ./config.toml:/app/config.toml
command: python -m src.api.main
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=5)\"" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s