-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (53 loc) · 1.37 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
version: '3.7'
services:
mysql:
image: mysql:8.0
restart: on-failure
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--socket=/tmp/mysql.sock']
env_file:
- .env
environment:
- MYSQL_ROOT_HOST="0.0.0.0"
ports:
- "5306:3306"
volumes:
- ./.data/mysql:/var/lib/mysql
container_name: student_dashboard_mysql
web:
build:
context: .
dockerfile: Dockerfile
args:
TZ: ${TZ}
command: bash -c "./start.sh"
volumes:
- .:/code
# Use the container's node_modules and static folder (don't override)
- /code/node_modules/
- /code/static/
- ${HOME}/mylasecrets:/secrets
ports:
- "5001:5000"
- "3000:3000"
- "3001:3001"
depends_on:
- mysql
- webpack_watcher
env_file:
- .env
environment:
- GUNICORN_RELOAD=True
# port in use when the application is running on localhost
- LOCALHOST_PORT=5001
container_name: student_dashboard
webpack_watcher:
build:
context: .
dockerfile: Dockerfile
target: node-webpack
command: sh -c "tar zxvf node_modules/all_symlinks.tgz && npm run watch"
volumes:
- .:/usr/src/app
# use the container's node_modules folder (don't override)
- /usr/src/app/node_modules/
container_name: webpack_watcher