-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
40 lines (40 loc) · 971 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"
services:
api:
container_name: typeorm-example-api
volumes:
- ./api:/webapp
working_dir: /webapp
image: node:12.16.1-alpine3.9
command: sh -c "sh ./wait.sh && yarn && yarn migrate && yarn dev"
ports:
- "13000:3000"
tty: true
stdin_open: true
environment:
- APP_PORT=3000
- DB_USER=user
- DB_PASS=pass
- DB_HOST=db
- DB_PORT=3306
- DB_NAME=example
- TZ=Asia/Tokyo
depends_on:
- db
db:
image: mysql:5.7
container_name: typeorm-example-db
tty: true
stdin_open: true
ports:
- 3306:3306
volumes:
- ./db/data/mysql:/var/lib/mysql
- ./db/my.cnf:/etc/mysql/conf.d/my.cnf
environment:
- TZ=Asia/Tokyo
- MYSQL_USER=user
- MYSQL_PASSWORD=pass
- MYSQL_ROOT_PASSWORD=root_pass
- MYSQL_DATABASE=example
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci