-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (56 loc) · 1.3 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
version: '3.7'
services:
redis-db:
container_name: redis-db
build:
context: ./redis
dockerfile: Dockerfile
ports:
- 6375:6379
volumes:
- redis-data:/data/redis
flask-base-db:
mysql5_7:
image: mysql:5.7
restart: always
volumes:
- ./mysql5_7:/docker-entrypoint-initdb.d/:ro
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_USER: ${DB_NAME}
MYSQL_DATABASE: 'employees'
MYSQL_HOST: 'mysql5_7'
ports:
- "32000:3306"
flask-base-service:
container_name: flask-base-service
build:
context: ../flask-base-api
dockerfile: Dockerfile
target: prod # set the dockerfile target as debug
volumes:
- '../flask-base-api:/usr/src/app'
ports:
- 5001:5000 # expose ports - HOST:CONTAINER
environment:
- APP_SETTINGS=project.config.DevelopmentConfig
- FLASK_DEBUG=1
- FLASK_ENV="docker"
- FLASK_APP=project/__init__.py
- SECRET_KEY=${SECRET_KEY}
- FCM_SERVER_KEY=${FCM_SERVER_KEY}
depends_on:
- flask-base-db
links:
- flask-base-db
- redis-db
nginx:
container_name: nginx
build: ./nginx/
restart: always
ports:
- 80:80
depends_on:
- flask-base-service
links:
- flask-base-service