-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
62 lines (58 loc) · 1.6 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
61
62
version: '3'
services:
https-portal:
build: ./https-portal
ports:
- 80:80
- 443:443
restart: always
environment:
# ローカルで実験するとき
DOMAINS: 'localhost -> http://wordpress'
STAGE: local # 自己発行なんちゃって証明書
# 本番環境のとき
# DOMAINS: 'your-domain.name -> http://wordpress'
# STAGE: production # Let's Encryptから証明書を自動取得!
volumes:
- ./https-portal/cert:/var/lib/https-portal
mysql:
build: ./mysql
volumes:
- mysql-volume:/var/lib/mysql
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: mysql_root_password
MYSQL_DATABASE: wordpress_db_name
MYSQL_USER: wordpress_user
MYSQL_PASSWORD: wordpres_user_password
phpmyadmin:
build: ./phpmyadmin
environment:
- PMA_ARBITRARY=1
- PMA_HOST=mysql
- PMA_USER=root
- PMA_PASSWORD=mysql_root_password
restart: always
links:
- mysql
ports:
- 8081:80 # phpMyAdminのポート番号は8081
wordpress:
build: ./wordpress
depends_on:
- mysql
restart: always
environment:
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_USER: wordpress_user
WORDPRESS_DB_PASSWORD: wordpres_user_password
WORDPRESS_DB_NAME: wordpress_db_name
volumes:
- wordpress-volume:/var/www/html
ports:
- 8080:80 # WordPressのポート番号は8080
volumes:
mysql-volume: # MySQLのデータを格納する
wordpress-volume: # WordPressのデータを格納する