-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
57 lines (52 loc) · 1021 Bytes
/
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
services:
# sql server
mysql:
image: mysql
restart: unless-stopped
volumes:
- ./SQL Database/init.sql:/docker-entrypoint-initdb.d/0.sql
ports:
- 3306:3306
expose:
- 3306
environment:
MYSQL_DATABASE: restaurant
MYSQL_USER: admin
MYSQL_ROOT_PASSWORD: root
MYSQL_PASSWORD : admin
networks:
- restaurantnet
# backend application
backend:
image: backend
build:
context: Backend
dockerfile: ./Dockerfile
environment:
NODE_ENV: stagging
ports:
- 3000:3000
expose:
- 3000
depends_on:
- mysql
networks:
- restaurantnet
# frontend application
frontend:
image: frontend
build:
context: Frontend
dockerfile: ./Dockerfile
environment:
NODE_ENV: staging
ports:
- 8080:8080
expose:
- 8080
networks:
- restaurantnet
# network bridge for communication between 3 containers
networks:
restaurantnet:
driver: bridge