-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (46 loc) · 922 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
version: '3.8'
services:
backend:
container_name: nestjs-backend
build:
context: ./back
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./back:/usr/src/app
- /usr/src/app/node_modules
environment:
- NODE_ENV=production
- DATABASE_HOST=db
- DATABASE_USER=root
- DATABASE_PASSWORD=example
- DATABASE_NAME=myapp
depends_on:
- db
frontend:
container_name: vue-frontend
build:
context: ./front
dockerfile: Dockerfile
ports:
- "80:80"
volumes:
- ./front:/app
- /app/node_modules
db:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: myapp
MYSQL_USER: user
MYSQL_PASSWORD: example
ports:
- "3306:3306"
volumes:
- db-data:/var/lib/mysql
volumes:
db-data:
networks:
default:
driver: bridge