-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
90 lines (73 loc) · 1.73 KB
/
docker-compose.yaml
File metadata and controls
90 lines (73 loc) · 1.73 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
services:
# リバースプロキシ
nginx:
# イメージ
image: nginx:latest
# ポート
ports:
- "8633:8443"
tty: true
# ディレクトリ共有
volumes:
# 設定ファイル
- ./nginx/configs:/etc/nginx/conf.d/
# 静的ファイル
- ./nginx/statics:/var/www/nginx/statics/:ro
# SSL証明書
- ./nginx/keys:/etc/nginx/ssl:ro
# ロギングディレクトリ
- ./nginx/logs:/var/log/nginx:rw
# 自動再起動
restart: always
depends_on:
- frontend
- app
# フロントエンドのコンテナ
frontend:
# ホスト名設定
hostname: frontend
# イメージ
build:
context: ./frontend
dockerfile: Dockerfile
target: development-dependencies-env
# ディレクトリ共有
volumes:
- ./frontend:/app
restart: always
# app コンテナ
app:
# ホスト名指定
hostname: app
# ビルド対象のdockerfileをしてい
build:
context: ./app
dockerfile: dockerfile
target: Develop
# コードを共有
volumes:
- ./app/src:/app/src
# 仮想端末を有効化
tty: true
# 自動起動を有効化
restart: always
mysql-db:
hostname: mysql-db
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: meecha
MYSQL_PASSWORD: meecha_pass
MYSQL_DATABASE: meecha
TZ: Asia/Tokyo
volumes:
- ./database/db-data:/var/lib/mysql
mysql-test:
hostname: mysql-db-test
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: meecha
MYSQL_PASSWORD: meecha_pass
MYSQL_DATABASE: meecha
TZ: Asia/Tokyo