-
Notifications
You must be signed in to change notification settings - Fork 28
/
docker-compose.yml
54 lines (54 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
version: "3"
services:
mysql:
image: mysql:5.7
ports:
- "33061:3306"
command: --init-file /data/application/init.sql
volumes:
- ./database/init.sql:/data/application/init.sql
environment:
MYSQL_ROOT_USER: root
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: restobar
MYSQL_USER: mysql
MYSQL_PASSWORD: secret
nginx:
restart: always
depends_on:
- backend
- frontend
build:
dockerfile: Dockerfile.dev
context: ./nginx
ports:
- "3000:80"
backend:
depends_on:
- mysql
build:
dockerfile: Dockerfile.dev
context: backend
volumes:
- /app/node_modules
- ./backend:/app
ports:
- "5000:5000"
environment:
- DB_USER=mysql
- DB_HOST=mysql
- DB_NAME=restobar
- DB_PASSWORD=secret
- DB_DIALECT=mysql
- DB_PORT=3306
- NODE_ENV=development
- PORT=5000
- JWT_SECRET=abc123
frontend:
stdin_open: true
build:
dockerfile: Dockerfile.dev
context: ./frontend
volumes:
- /app/node_modules
- ./frontend:/app