-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
41 lines (41 loc) · 1.2 KB
/
docker-compose.yaml
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
version: '3.8'
services:
backend_flask_app:
container_name: ${TEAM_NAME}_backend_app
ports:
- 0.0.0.0:${APP_PORT}:5000
restart: always
build:
context: ./backend
dockerfile: Dockerfile
args:
DB_NAME: TEAM_1
depends_on:
- db
environment:
- FLASK_APP=app.py
- FLASK_RUN_HOST=0.0.0.0
- FLASK_DEBUG=0
networks:
flask_network:
aliases:
- flask-network
command: gunicorn --bind 0.0.0.0:5000 --workers 4 "app:app"
db:
container_name: ${TEAM_NAME}_db
image: mariadb:10.5.8
restart: always
environment:
- MYSQL_USER=admin
- MYSQL_PASSWORD=admin
- MYSQL_DATABASE=kardashiandb
- MYSQL_ROOT_PASSWORD=admin
volumes:
- flask_volume:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- flask_network
volumes:
flask_volume:
networks:
flask_network: