-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
78 lines (71 loc) · 1.59 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
70
71
72
73
74
75
76
77
78
version: "2"
networks:
gradi:
driver: bridge
# volumes:
# mysql_data:
services:
mongo:
container_name: gradi-mongo
image: mongo:4.2
ports:
- "27017:27017"
networks:
- gradi
volumes:
- ./data/mongo/data:/data/db
- ./data/mongo/backups:/data/backups
- ./data/mongo/mongobackups:/data/mongobackups
mysql:
image: mysql:5.7
container_name: gradi-mysql
ports:
- "13306:3306"
networks:
- gradi
environment:
- MYSQL_ROOT_PASSWORD=gradi
- MYSQL_DATABASE=gradi
- MYSQL_USER=gradi
- MYSQL_PASSWORD=gradi
volumes:
- ./data/mysql/data:/var/lib/mysql
- ./data/mysql/init:/docker-entrypoint-initdb.d/:ro
# - ./data/mysql/init:/docker-entrypoint-initdb.d
api:
restart: always
build:
context: ./api
working_dir: /code
container_name: phoenix
command: bash -c 'mix deps.get && mix phx.server'
networks:
- gradi
ports:
- 4000:4000
volumes:
- ./api/:/code
depends_on:
- mongo
- mysql
front:
build:
context: ./front
working_dir: /var/www/app/front
container_name: gradi-front
command: bash -c 'npm i && npm start'
volumes:
- ./:/var/www/app
- ./node_modules:/var/www/app/node_modules
ports:
- 80:8080
crawler:
image: node:12
working_dir: /var/www/app
container_name: gradi-crawler
command: bash -c 'yarn && yarn start'
networks:
- gradi
volumes:
- ./data/crawler/:/var/www/app
- ./data/crawler/node_modules:/var/www/app/node_modules