forked from CornellNLP/4300-Template-Spring-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
37 lines (37 loc) · 1.12 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:
- ${TEAM_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=${MYSQL_ONLINE_USER}
- MYSQL_PASSWORD=${MYSQL_ONLINE_PASSWORD}
- MYSQL_DATABASE=${MYSQL_ONLINE_DATABASE}
- MYSQL_ROOT_PASSWORD=${MYSQL_ONLINE_ROOT_PASSWORD}
volumes:
- flask_volume:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- flask_network
volumes:
flask_volume:
networks:
flask_network: