-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
143 lines (94 loc) · 3.51 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
version: "3"
services:
#ecommerce-service block
ecommerce-app:
build: ${ECOMMERCE_SERVICE_PATH}/Docker/app/.
container_name: ${ECOMMERCE_SERVICE_NAME}
env_file:
- ${ECOMMERCE_SERVICE_PATH}/Docker/app/.env
- .env
environment:
- SQL_ALCHEMY_HOST=${ECOMMERCE_MYSQL_NAME}
- SQL_ALCHEMY_DATABASE=${ECOMMERCE_MYSQL_DATABASE}
- REDIS_HOST=${ECOMMERCE_REDIS_HOST}
- FIRESTORE_EMULATOR_HOST=${ECOMMERCE_FIRESTORE_NAME}:8080
- FIRESTORE_PROJECT_ID=${ECOMMERCE_FIRESTORE_NAME}
- JWT_SECRET_KEY=${ECOMMERCE_JWT_SECRET_KEY}
- ECOMMERCE_DELIVERY_USER=${ECOMMERCE_DELIVERY_USER}
- ECOMMERCE_DELIVERY_PASS=${ECOMMERCE_DELIVERY_PASS}
command: ["gunicorn", "-b", "0.0.0.0:8000", "src.main:app", "--reload", "-t 60"]
volumes:
- ${ECOMMERCE_SERVICE_PATH}/src:/app/src
- ${ECOMMERCE_SERVICE_PATH}/tests:/app/tests
- ${ECOMMERCE_SERVICE_PATH}/Docker/database/firestore-account:/app/firestore-account
ports:
- ${ECOMMERCE_APP_PORT}:8000
depends_on:
- ecommerce-mysql
- ecommerce-redis
- ecommerce-firestore
ecommerce-mysql:
build: ${ECOMMERCE_SERVICE_PATH}/Docker/database/.
restart: always
container_name: ${ECOMMERCE_MYSQL_NAME}
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=${ECOMMERCE_MYSQL_DATABASE}
ports:
- ${ECOMMERCE_MYSQL_PORT}:3306
command:
- --default-authentication-plugin=mysql_native_password
ecommerce-redis:
container_name: ${ECOMMERCE_REDIS_HOST}
image: redis:alpine
ecommerce-firestore:
container_name: ${ECOMMERCE_FIRESTORE_NAME}
image: mtlynch/firestore-emulator
environment:
FIRESTORE_PROJECT_ID: ${ECOMMERCE_FIRESTORE_NAME}
#delivery-service block
delivery-app:
build: ${DELIVERY_SERVICE_PATH}/Docker/app/.
container_name: ${DELIVERY_SERVICE_NAME}
env_file:
- ${DELIVERY_SERVICE_PATH}/Docker/app/.env
- .env
environment:
- SQL_ALCHEMY_HOST=${DELIVERY_MYSQL_NAME}
- SQL_ALCHEMY_DATABASE=${DELIVERY_MYSQL_DATABASE}
- REDIS_HOST=${DELIVERY_REDIS_HOST}
- FIRESTORE_EMULATOR_HOST=${DELIVERY_FIRESTORE_NAME}:8080
- FIRESTORE_PROJECT_ID=${DELIVERY_FIRESTORE_NAME}
- JWT_SECRET_KEY=${DELIVERY_JWT_SECRET_KEY}
- ECOMMERCE_DELIVERY_USER=${ECOMMERCE_DELIVERY_USER}
- ECOMMERCE_DELIVERY_PASS=${ECOMMERCE_DELIVERY_PASS}
command: ["gunicorn", "-b", "0.0.0.0:8000", "src.main:app", "--reload", "-t 60"]
volumes:
- ${DELIVERY_SERVICE_PATH}/src:/app/src
- ${DELIVERY_SERVICE_PATH}/tests:/app/tests
- ${DELIVERY_SERVICE_PATH}/Docker/database/firestore-account:/app/firestore-account
ports:
- ${DELIVERY_APP_PORT}:8000
depends_on:
- delivery-mysql
- delivery-redis
- delivery-firestore
delivery-mysql:
build: ${DELIVERY_SERVICE_PATH}/Docker/database/.
restart: always
container_name: ${DELIVERY_MYSQL_NAME}
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=${DELIVERY_MYSQL_DATABASE}
ports:
- ${DELIVERY_MYSQL_PORT}:3306
command:
- --default-authentication-plugin=mysql_native_password
delivery-redis:
container_name: ${DELIVERY_REDIS_HOST}
image: redis:alpine
delivery-firestore:
container_name: ${DELIVERY_FIRESTORE_NAME}
image: mtlynch/firestore-emulator
environment:
FIRESTORE_PROJECT_ID: ${DELIVERY_FIRESTORE_NAME}