-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
100 lines (96 loc) · 2.75 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
version: "3.7"
services:
wordpress:
image: ${REPOSITORY}${TENANT}:${TAG}
domainname: ${DOMAIN}.${ENV}
hostname: wordpress
build:
context: .
secrets:
- composer_auth
networks:
internal:
aliases:
- ${DOMAIN}.${ENV}
- wordpress.${DOMAIN}.${ENV}
external:
aliases:
- ${DOMAIN}.${ENV}
- wordpress.${DOMAIN}.${ENV}
volumes:
- ./persist.d:/bitnami/wordpress:rw
ports:
- ${HOST_PORT}:8080
environment:
WORDPRESS_USERNAME: ${TENANT}
WORDPRESS_PASSWORD: developer
WORDPRESS_EMAIL: admin@${DOMAIN}.${ENV}
WORDPRESS_FIRST_NAME: ${TENANT}
WORDPRESS_LAST_NAME: Administrator
WORDPRESS_BLOG_NAME: ${TENANT}'s Blog
WORDPRESS_DATABASE_HOST: database.${DOMAIN}.${ENV}
WORDPRESS_DATABASE_PORT_NUMBER: 3306
WORDPRESS_DATABASE_NAME: ${TENANT}
WORDPRESS_DATABASE_USER: ${TENANT}
WORDPRESS_DATABASE_PASSWORD: developer
WORDPRESS_DATA_TO_PERSIST: wp-config.php wp-content/uploads
WORDPRESS_ENABLE_REVERSE_PROXY: yes
WORDPRESS_ENABLE_MULTISITE: no
WORDPRESS_MULTISITE_HOST:
WORDPRESS_MULTISITE_NETWORK_TYPE: subdomain
WORDPRESS_EXTRA_WP_CONFIG_CONTENT: >
define('DISALLOW_FILE_EDIT', true);
define('DISALLOW_FILE_MODS', true);
mariadb:
image: mariadb:10.6
domainname: ${DOMAIN}.${ENV}
hostname: database
command: [
"mysqld",
"--default-authentication-plugin=mysql_native_password",
"--bind-address=0.0.0.0",
"--innodb-flush-method=fsync",
"--server-id=1338",
"--binlog-format=row",
"--datadir=/var/lib/mysql",
"--log-bin=/var/lib/mysql/master",
"--binlog-format=row",
"--binlog-ignore-db=maxwell",
"--log-error=/dev/stderr",
"--log_bin_trust_function_creators=ON",
"--event-scheduler=ON",
"--performance-schema=ON",
"--default-storage-engine=InnoDB",
"--sql-mode=NO_ENGINE_SUBSTITUTION",
"--max-connections=512",
"--wait-timeout=1200",
"--innodb-flush-log-at-trx-commit=1",
"--innodb-autoinc-lock-mode=2",
"--plugin-load-add=ha_blackhole",
"--expire-logs-days=0"
]
volumes:
- mariadb-data:/var/lib/mysql
- ./initdb.d:/docker-entrypoint-initdb.d
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=${TENANT}
- MYSQL_USER=${TENANT}
- MYSQL_PASSWORD=developer
networks:
internal:
aliases:
- database.${DOMAIN}.${ENV}
external:
aliases:
- database.${DOMAIN}.${ENV}
secrets:
composer_auth:
file: ./auth.json
volumes:
mariadb-data:
networks:
internal:
name: ${DOMAIN}-${ENV}-internal
external:
name: ${DOMAIN}-${ENV}