-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (67 loc) · 1.5 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
version: '3.8'
services:
dev:
container_name: shira-api-dev
image: shira-api-dev:1.0.0
build:
context: .
target: development
dockerfile: ./Dockerfile.development
command: yarn start:debug
ports:
- 3000:3000
- 9229:9229
networks:
- nestjs-network
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
restart: unless-stopped
prod:
container_name: shira-api-prod
image: shira-api-prod:1.0.0
environment:
JWT_SECRET: ${JWT_SECRET}
build:
context: .
target: production
dockerfile: ./Dockerfile.production
command: yarn start:prod
ports:
- 3000:3000
networks:
- nestjs-network
restart: unless-stopped
staging:
container_name: shira-api-staging
image: shira-api-staging:1.0.0
environment:
JWT_SECRET: ${JWT_SECRET}
build:
context: .
target: production
dockerfile: ./Dockerfile.production
command: yarn start:prod
ports:
- 3001:3000
networks:
- nestjs-network
restart: unless-stopped
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: "${MYSQL_DATABASE}"
MYSQL_USER: "${MYSQL_USER}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
expose:
- '3306'
volumes:
- db-data:/var/lib/mysql
networks:
- nestjs-network
networks:
nestjs-network:
volumes:
db-data: