-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (57 loc) · 1.23 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
version: "2"
services:
mysql:
image: mysql/mysql-server:8.0.26
container_name: AGRecordToolMySQL
env_file: ./mysql/mysql.env
#環境変数設定。タイムゾーンを日本時間に設定。
environment:
- TZ=Asia/Tokyo
ports:
- "3306:3306"
volumes:
#mysqlのデフォルト設定ファイルを上書き。:roでコンテナ側からは読み取り専用設定。
- ./mysql/conf:/etc/mysql:ro
- ./mysql/db:/var/lib/mysql
restart: always
mem_limit: 512m
networks:
- backend
backendapp:
# dockerimageのファイルを指定
build: .
container_name: AGRecordToolBackend
environment:
- TZ=Asia/Tokyo
tty: true
ports:
- "4000:4000"
volumes:
- ./src/backend:/app
working_dir: /app
restart: always
mem_limit: 512m
networks:
- backend
depends_on:
- mysql
frontendapp:
image: node:14.18.0
container_name: AGRecordToolFrontend
tty: true
ports:
- "8000:8000"
volumes:
- ./src/frontend:/app
working_dir: /app
mem_limit: 512m
restart: always
networks:
- backend
depends_on:
- backendapp
- mysql
networks:
backend:
volumes:
mysqldata: