-
Notifications
You must be signed in to change notification settings - Fork 85
/
docker-compose.yaml
37 lines (37 loc) · 1.06 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
version: '3.8'
services:
backend_flask_app:
container_name: ${TEAM_NAME}_backend_app
restart: always
build:
context: ./backend
dockerfile: Dockerfile
ports:
- 0.0.0.0:${APP_PORT}:5000
depends_on:
- db
environment:
- DB_NAME=${TEAM_NAME}_db
networks:
flask_network:
aliases:
- flask-network
command: flask run --host=0.0.0.0 --port=5000
db:
container_name: ${TEAM_NAME}_db
image: mysql:latest
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: