-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (67 loc) · 1.38 KB
/
docker-compose.yml
File metadata and controls
75 lines (67 loc) · 1.38 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '3.8'
services:
db:
image: postgres:13-alpine
container_name: database
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_USER=$DB_USER
- POSTGRES_PASSWORD=$DB_PASS
- POSTGRES_DB=$DB_NAME
restart: always
env_file:
- .env
ports:
- "5432:5432"
networks:
- app
volumes:
- ./data/db_data:/var/lib/postgresql/data/
web:
build:
context: web
dockerfile: Dockerfile
container_name: web
restart: always
command: bash -c "alembic revision --autogenerate && alembic upgrade head && uvicorn api:app --host 0.0.0.0 --port 8000"
env_file:
- .env
depends_on:
- db
networks:
- app
client:
build:
context: client
dockerfile: Dockerfile
container_name: client
restart: always
command: bash -c "python3 -m client_simulator"
env_file:
- .env
depends_on:
- web
networks:
- app
volumes:
- ./data/client_logs:/app/logs
worker:
build:
context: worker
dockerfile: Dockerfile
container_name: worker
restart: always
command: bash -c "python3 -m background_processing"
deploy:
replicas: 1
env_file:
- .env
depends_on:
- client
networks:
- app
volumes:
- ./data/background_log:/app/logs
networks:
app:
driver: bridge