-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
131 lines (123 loc) · 4.37 KB
/
docker-compose.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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: "3.8"
services:
wordpress_en:
container_name: pingcap_website_en_env_php_apache
image: wordpress:php8.1-apache
restart: always
ports:
- ${WEBSITE_EN_PORT}:80
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: pingcap
WORDPRESS_DB_PASSWORD: pingcap
WORDPRESS_DB_NAME: pingcap_website_en
volumes:
- ${WEBSITE_EN_SRC}/pingcap:/var/www/html/wp-content/themes/pingcap
- ${WEBSITE_EN_SRC}/pingcap/.htaccess:/var/www/html/.htaccess
- ${WEBSITE_EN_SRC}/wp-content/plugins:/var/www/html/wp-content/plugins
- ${WEBSITE_EN_SRC}/wp-content/uploads:/var/www/html/wp-content/uploads
wordpress_cn:
container_name: pingcap_website_cn_env_php_apache
image: wordpress:php8.1-apache
restart: always
ports:
- ${WEBSITE_CN_PORT}:80
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: pingcap
WORDPRESS_DB_PASSWORD: pingcap
WORDPRESS_DB_NAME: pingcap_website_cn
volumes:
- ${WEBSITE_CN_SRC}/pingcap-cn:/var/www/html/wp-content/themes/pingcap-cn
- ${WEBSITE_CN_SRC}/pingcap-cn/.htaccess:/var/www/html/.htaccess
- ${WEBSITE_CN_SRC}/wp-content/plugins:/var/www/html/wp-content/plugins
- ${WEBSITE_CN_SRC}/wp-content/uploads:/var/www/html/wp-content/uploads
wordpress_jp:
container_name: pingcap_website_jp_env_php_apache
image: wordpress:php8.1-apache
restart: always
ports:
- ${WEBSITE_JP_PORT}:80
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: pingcap
WORDPRESS_DB_PASSWORD: pingcap
WORDPRESS_DB_NAME: pingcap_website_jp
# WORDPRESS_DB_HOST: ${TIDB_HOST}:${TIDB_PORT}
# WORDPRESS_DB_NAME: ${TIDB_DB_NAME}
# WORDPRESS_DB_PASSWORD: ${TIDB_PASSWORD}
# WORDPRESS_DB_USER: ${TIDB_USER}
# WORDPRESS_DB_COLLATE: utf8mb4_bin
# WORDPRESS_CONFIG_EXTRA: |
# define('MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL);
# define('MYSQL_SSL_CA', '/etc/ssl/certs/ca-certificates.crt');
volumes:
- ${WEBSITE_JP_SRC}/pingcap-jp:/var/www/html/wp-content/themes/pingcap-jp
- ${WEBSITE_JP_SRC}/pingcap-jp/.htaccess:/var/www/html/.htaccess
- ${WEBSITE_JP_SRC}/wp-content/plugins:/var/www/html/wp-content/plugins
- ${WEBSITE_JP_SRC}/wp-content/uploads:/var/www/html/wp-content/uploads
jp_serverless:
container_name: pingcap_website_jp_serveless
image: wordpress:php7.4-apache
restart: always
ports:
- ${WEBSITE_JP_SERVERLESS_PORT}:80
environment:
WORDPRESS_DEBUG: 1
WORDPRESS_DB_HOST: ${TIDB_HOST}:${TIDB_PORT}
WORDPRESS_DB_NAME: ${TIDB_DB_NAME}
WORDPRESS_DB_PASSWORD: ${TIDB_PASSWORD}
WORDPRESS_DB_USER: ${TIDB_USER}
WORDPRESS_DB_COLLATE: utf8mb4_bin
WORDPRESS_CONFIG_EXTRA: |
define('MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL);
define('MYSQL_SSL_CA', '/etc/ssl/certs/ca-certificates.crt');
volumes:
- ${WEBSITE_JP_SRC}/pingcap-jp:/var/www/html/wp-content/themes/pingcap-jp
- ${WEBSITE_JP_SRC}/pingcap-jp/.htaccess:/var/www/html/.htaccess
- ${WEBSITE_JP_SRC}/wp-content/plugins:/var/www/html/wp-content/plugins
- ${WEBSITE_JP_SRC}/wp-content/uploads:/var/www/html/wp-content/uploads
jp_old:
container_name: pingcap_website_jp_old_env_php_apache
image: wordpress:php7.3-apache
restart: always
ports:
- ${WEBSITE_JP_OLD_PORT}:80
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: pingcap
WORDPRESS_DB_PASSWORD: pingcap
WORDPRESS_DB_NAME: pingcap_website_jp_old
volumes:
- ${WEBSITE_JP_OLD_SRC}/wp-content:/var/www/html/wp-content
mysql:
container_name: pingcap_website_mysql
image: mysql:5.7
restart: always
ports:
- ${WEBSITE_MYSQL_PORT}:3306
environment:
MYSQL_DATABASE: pingcap_website_en
MYSQL_USER: pingcap
MYSQL_PASSWORD: pingcap
MYSQL_ROOT_PASSWORD: pingcap
volumes:
- ./mysql/init:/docker-entrypoint-initdb.d
- ./mysql/data:/var/lib/mysql
redis:
image: redis:latest
container_name: redis
ports:
- 6379:6379
nginx:
container_name: nginx
image: nginx:latest
restart: always
ports:
- ${NGINX_PORT}:80
- 443:443
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/ssl:/etc/nginx/ssl
- ./nginx/.htpasswd:/etc/nginx/.htpasswd