-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
63 lines (60 loc) · 1.35 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: '3.7'
services:
db:
image: mysql:5.7
volumes:
- db-data:/var/lib/mysql
- ./database/init/init.sql:/data/application/init.sql
- ./database/init/new_config.cnf:/etc/mysql/conf.d/custom.cnf
restart: always
expose:
- '3306'
ports:
- 3306:3306
command: --init-file /data/application/init.sql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_P}
MYSQL_DATABASE: ${MYSQL_DB_NAME}
MYSQL_USER: ${MYSQL_USER_1}
MYSQL_PASSWORD: ${MYSQL_PASSWORD_1}
flask:
build: ./flask
volumes:
- ./flask:/code
depends_on:
- db
ports:
- 5000:5000
- 8000:8000
expose:
- '5000'
command: python app.py
restart: always
environment:
MYSQL_USER: ${MYSQL_USER_1}
MYSQL_PASSWORD: ${MYSQL_PASSWORD_1}
MYSQL_DB_NAME: ${MYSQL_DB_NAME}
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
ADMIN_PASS: ${ADMIN_PASS}
frontend:
build: ./frontend
volumes:
- ./frontend/my-app:/app
- node-modules:/app/node_modules
ports:
- 3000:3000
depends_on:
- flask
scraper:
build: ./scraper
volumes:
- ./scraper:/code
depends_on:
- db
environment:
MYSQL_USER: ${MYSQL_USER_1}
MYSQL_PASSWORD: ${MYSQL_PASSWORD_1}
MYSQL_DB_NAME: ${MYSQL_DB_NAME}
volumes:
db-data:
node-modules: