-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (103 loc) · 2.23 KB
/
docker-compose.yml
File metadata and controls
111 lines (103 loc) · 2.23 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
services:
redis:
container_name: redis
image: redis:latest
ports:
- "6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5
postgres:
container_name: postgres
image: postgres:latest
env_file:
- .env
ports:
- "5432:5432"
volumes:
- ./pg_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U user -d db53" ]
interval: 5s
timeout: 5s
retries: 5
grpc_app:
container_name: grpc
build:
context: ./grpc_app
env_file:
- .env
volumes:
- ./shared:/app/shared
celery_app:
container_name: celery
build:
context: ./celery_app
env_file:
- .env
volumes:
- ./shared:/app/shared
depends_on:
postgres:
condition: service_healthy
grpc_app:
condition: service_started
fastapi:
container_name: fastapi
build:
context: ./fastapi_app
env_file:
- .env
ports:
- "8000:80"
volumes:
- ./shared:/app/shared
- ./shared:/app/db/shared
command: uvicorn run:app --host 0.0.0.0 --port 8000
depends_on:
postgres:
condition: service_healthy
grpc_app:
condition: service_started
bot:
container_name: bot
build:
context: ./bot_app
env_file:
- .env
volumes:
- ./shared:/app/shared
depends_on:
redis:
condition: service_healthy
fastapi:
condition: service_started
# nginx:
# container_name: nginx
# image: nginx:latest
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
# - ./django_app/staticfiles:/django/staticfiles
# - ./django_app/mediafiles:/django/mediafiles
# depends_on:
# fastapi:
# condition: service_started
# bot:
# condition: service_started
# django:
# condition: service_started
# django:
# container_name: django
# build:
# context: ./django_app
# env_file:
# - .env
# command: gunicorn django_app.wsgi:application --bind 0.0.0.0:8000
# depends_on:
# postgres:
# condition: service_healthy