forked from webtech-superheroes/webtech-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (55 loc) · 1.27 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
version: '3'
services:
nginx:
image: nginx:1.16.1-alpine
ports:
- "127.0.10.1:8080:80"
volumes:
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf
environment:
- VIRTUAL_HOST=hub-dev.webtech-superheroes.net
expose:
- "8080"
restart: unless-stopped
depends_on:
- frontend
- backend
backend:
build:
context: ./backend
dockerfile: Dockerfile-dev
volumes:
- ./backend:/app
- backend-node-modules:/app/node_modules
working_dir: /app
command: npx nodemon -L server.js
depends_on:
- db
ports:
- "127.0.10.1:3001:3001"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile-dev
ports:
- "127.0.10.1:3000:3000"
volumes:
- ./frontend:/app
- frontend-node-modules:/app/node_modules
working_dir: /app
command: npm start
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
volumes:
- ./mysql/conf.d:/etc/mysql/conf.d
- ./data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=pass
- MYSQL_USER=hub
- MYSQL_PASSWORD=pass
- MYSQL_DATABASE=hub
volumes:
frontend-node-modules:
backend-node-modules: