-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
40 lines (37 loc) · 934 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
version: "3.7"
services:
dev:
container_name: nestjs-starter_dev
env_file:
- .env.local
- .env.developement.local
build:
context: .
dockerfile: Dockerfile
target: development
volumes:
- ./:/apps/nestjs-starter
- /apps/nestjs-starter/node_modules
environment:
MYSQL_HOST: ${DATABASE_HOST}
MYSQL_USER: ${DATABASE_USER}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_DB: ${DATABASE_NAME}
depends_on:
- mysql
ports:
- ${SERVER_PORT}:3000
extra_hosts:
- ${SERVER_HOST}:127.0.0.1
command: npm run start
mysql:
container_name: nestjs-starter-mysql
image: mysql:8.0
volumes:
- nestjs-starter-mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_DATABASE: ${DATABASE_NAME}
MYSQL_PORT: ${DATABASE_PORT}
volumes:
nestjs-starter-mysql: