-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·69 lines (64 loc) · 1.43 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
60
61
62
63
64
65
66
67
68
69
# Here, it is a docker compose config file, that includes frontend,
# backend, and mysql services along with their environment variables.
version: '3'
services:
backend:
container_name: mental-wellbeing-api
build:
context: ./backend
dockerfile: Dockerfile
volumes:
- ./backend:/backend
links:
- db:mysql
depends_on:
- db
stdin_open: true
tty: true
environment:
PORT: 5000
SECRET_KEY: 'you-will-never-guess'
DEBUG: 0
FLASK_DEBUG: 0
FLASK_APP: 'manage'
DB_USERNAME: sapbuffalo
DB_PASSWORD: sap
DB_HOST: mysql
DATABASE_NAME: sp_db
MYSQL_ROOT_PASSWORD: root123
db:
container_name: mysql-db
platform: linux/x86_64
image: mysql:5.7.41
restart: always
ports:
- "3306:3306"
expose:
- '3306'
volumes:
- my-db:/var/lib/mysql
- ./db-init:/docker-entrypoint-initdb.d
environment:
MYSQL_USER: sapbuffalo
MYSQL_PASSWORD: sap
MYSQL_ROOT_PASSWORD: root123
MYSQL_DATABASE: sp_db
frontend:
container_name: mental-wellbeing-fe
build:
context: ./frontend
dockerfile: Dockerfile
depends_on:
- backend
proxy:
container_name: mental-wellbeing-nginx
build:
context: ./nginx
dockerfile: Dockerfile
restart: always
ports:
- "80:80"
depends_on:
- frontend
volumes:
my-db: