-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
98 lines (94 loc) · 2.38 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
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
version: "3.7"
services:
caddy:
image: tuneitme/caddy
restart: on-failure
ports:
- "80:80"
- "443:443"
networks:
- caddy
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./caddydata:/data
- ./caddyconfig:/config
- ./caddylogs:/var/log/caddy
- ./wordpress:/var/www/html
wordpress:
image: wordpress:php8.0-fpm-alpine
restart: on-failure
depends_on:
- db
volumes:
- ./wordpress:/var/www/html
secrets:
- wordpress_db_host
- wordpress_db_user
- wordpress_db_name
- mysql_db_password
- wordpress_table_prefix
environment:
- WORDPRESS_DB_HOST_FILE=/run/secrets/wordpress_db_host
- WORDPRESS_DB_USER_FILE=/run/secrets/wordpress_db_user
- WORDPRESS_DB_NAME_FILE=/run/secrets/wordpress_db_name
- WORDPRESS_DB_PASSWORD_FILE=/run/secrets/mysql_db_password
- WORDPRESS_TABLE_PREFIX_FILE=/run/secrets/wordpress_table_prefix
networks:
- caddy
ports:
- "9000:9000"
adminer:
image: adminer
restart: on-failure
depends_on:
- db
ports:
- "8080:8080"
environment:
- PMA_HOST=db:3306
networks:
- caddy
db:
image: mariadb:latest
restart: on-failure
volumes:
- ./db:/var/lib/mysql
secrets:
- mysql_user
- mysql_database
- mysql_db_password
- mysql_root_password
environment:
- MYSQL_USER_FILE=/run/secrets/mysql_user
- MYSQL_DATABASE_FILE=/run/secrets/mysql_database
- MYSQL_PASSWORD_FILE=/run/secrets/mysql_db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql_root_password
command: ["mysqld", "--wait_timeout=28800", "--interactive_timeout=28800", "--max_allowed_packet=256M", "--transaction-isolation=READ-COMMITTED", "--binlog-format=ROW"]
networks:
- caddy
secrets:
wordpress_db_host:
file: ./wordpress_db_host.txt
wordpress_db_user:
file: ./wordpress_db_user.txt
wordpress_db_name:
file: ./wordpress_db_name.txt
mysql_user:
file: ./mysql_user.txt
mysql_db_password:
file: ./mysql_db_password.txt
wordpress_table_prefix:
file: ./wordpress_table_prefix.txt
mysql_database:
file: ./mysql_database.txt
mysql_root_password:
file: ./mysql_root_password.txt
volumes:
wordpress:
db:
caddydata:
caddyconfig:
caddylogs:
networks:
caddy:
external: true