-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (49 loc) · 1.01 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
version: "3.9"
services:
app:
build:
dockerfile: devops/build/Dockerfile
context: "."
image: alpaca00/dtapi
env_file: .env
ports:
- "5000:5000"
deploy:
resources:
limits:
memory: 1424M
cpus: '1.00'
command: uvicorn wsgi:app --host 0.0.0.0 --port 5000
postgres:
image: postgres:15-alpine
restart: always
env_file: .env
ports:
- "5432:5432"
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 5s
volumes:
- postgres_data:/var/lib/postgresql/data
bot:
build:
dockerfile: devops/build/Dockerfile
context: "."
image: alpaca00/dtbot
env_file: .env
ports:
- "8081:8081"
deploy:
resources:
limits:
memory: 1424M
cpus: '1.00'
depends_on:
- app
- postgres
command: sh -c "sleep 10 && python dt/telegram/main.py"
volumes:
postgres_data: