generated from ampersandcorp/nestjs-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.local.yaml
51 lines (48 loc) · 1.01 KB
/
docker-compose.local.yaml
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:
server:
build:
dockerfile: Dockerfile.local
context: ./
container_name: api
restart: unless-stopped
depends_on:
- mongodb
- mysql
ports:
- '80:80'
volumes:
- ./src:/app/src
command:
- "npm"
- "run"
- "start:local:dev"
mongodb:
container_name: api_mongo
image: mongo:4.2.1
ports:
- "27017:27017"
restart: on-failure
volumes:
- ./data/db:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: api
MONGO_INITDB_ROOT_PASSWORD: apipass
MONGO_INITDB_DATABASE: api
mysql:
container_name: api_mysql
image: mysql:8.0
ports:
- "3306:3306"
restart: on-failure
volumes:
- ./data/mysql:/var/lib/mysql
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: api
MYSQL_USER: api
MYSQL_PASSWORD: apipass
TZ: Asia/Seoul