-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
58 lines (54 loc) · 1.34 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
services:
app:
build:
context: .
dockerfile: "Dockerfile"
restart: always
env_file:
- .flaskenv
depends_on:
mysql:
condition: service_healthy
# FLASK_RUN_PORT SHOULD BE 5000 FOR COMPOSE DEPLOYMENT
nginx:
image: nginx:latest
container_name: nginx
ports:
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./nginx/ssl:/etc/nginx/ssl
depends_on:
- app
mysql:
image: mysql:latest
restart: always
env_file:
- .flaskenv
volumes:
#- db_data:/var/lib/mysql
- ./initdb:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_PASSWORD}"
MYSQL_DATABASE: "${MYSQL_DATABASE}"
MYSQL_USER: "${MYSQL_USERNAME}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
#ports:
# - "${MYSQL_PORT}:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"]
interval: 5s
timeout: 3s
retries: 10
start_period: 0s
redis:
image: "redis/redis-stack:latest"
restart: always
env_file:
- .flaskenv
environment:
REDIS_ARGS: "--requirepass ${REDIS_PASSWORD} --user ${REDIS_USERNAME} on >${REDIS_PASSWORD} ~* allcommands --user default off nopass nocommands"
#ports:
# - "${REDIS_PORT}:6379"
#volumes:
# db_data: