-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
99 lines (92 loc) · 2.46 KB
/
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: '3.7'
services:
celery:
build: backend/
restart: on-failure
command: poetry run python -m celery -A celery_app:celery_app worker -l INFO
depends_on:
- rabbitmq
environment:
- POETRY_DB_HOST=${DB_HOST}
- POETRY_DB_USER=${DB_USER}
- POETRY_DB_PASS=${DB_PASS}
- POETRY_DB_NAME=${DB_NAME}
- POETRY_DB_PORT=${DB_PORT}
- POETRY_MONGO_HOST=${MONGO_HOST}
- POETRY_MONGO_USER=${MONGO_USER}
- POETRY_MONGO_PASS=${MONGO_PASS}
- POETRY_MONGO_PORT=${MONGO_PORT}
- POETRY_RABBITMQ_USER=${RABBITMQ_USER}
- POETRY_RABBITMQ_PASS=${RABBITMQ_PASS}
- POETRY_RABBITMQ_PORT=${RABBITMQ_PORT}
- POETRY_TIMEZONE=${TIMEZONE}
networks:
- app_network
api:
build: backend/
restart: on-failure
command: poetry run python -m uvicorn --host 0.0.0.0 --port 8000 api_app:api_app
depends_on:
- rabbitmq
- celery
- postgres
- mongo
environment:
- POETRY_DB_HOST=${DB_HOST}
- POETRY_DB_USER=${DB_USER}
- POETRY_DB_PASS=${DB_PASS}
- POETRY_DB_NAME=${DB_NAME}
- POETRY_DB_PORT=${DB_PORT}
- POETRY_MONGO_HOST=${MONGO_HOST}
- POETRY_MONGO_USER=${MONGO_USER}
- POETRY_MONGO_PASS=${MONGO_PASS}
- POETRY_MONGO_PORT=${MONGO_PORT}
- POETRY_RABBITMQ_USER=${RABBITMQ_USER}
- POETRY_RABBITMQ_PASS=${RABBITMQ_PASS}
- POETRY_RABBITMQ_PORT=${RABBITMQ_PORT}
- POETRY_TIMEZONE=${TIMEZONE}
networks:
- app_network
ports:
- ${API_PORT}:${API_PORT}
rabbitmq:
image: rabbitmq:latest
restart: on-failure
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASS}
ports:
- ${RABBITMQ_PORT}:${RABBITMQ_PORT}
networks:
- app_network
postgres:
image: postgres:latest
restart: on-failure
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
- POSTGRES_DB=${DB_NAME}
ports:
- ${DB_PORT}:${DB_PORT}
networks:
- app_network
volumes:
- postgres_data:/var/lib/postgresql/data
mongo:
image: mongo:latest
restart: on-failure
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASS}
ports:
- ${MONGO_PORT}:${MONGO_PORT}
networks:
- app_network
volumes:
- mongo_data:/data/db
networks:
app_network:
driver: bridge
volumes:
postgres_data:
mongo_data: