-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
128 lines (119 loc) · 3.43 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
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
version: '3'
services:
db:
image: mysql:8.0
container_name: db
restart: unless-stopped
env_file: .env
environment:
- MYSQL_DATABASE=wordpress
- MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
- MYSQL_USER=$MYSQL_USER
- MYSQL_PASSWORD=$MYSQL_PASSWORD
volumes:
- ./dbdata:/var/lib/mysql
# TODO add backup folder ./dbdata/backupdb:/var/lib/mysql/backupdb
command: '--default-authentication-plugin=mysql_native_password'
networks:
- app-network
wordpress:
depends_on:
- db
# - redis
image: wordpress:6.1.1-php8.2-fpm
container_name: wordpress
restart: unless-stopped
links:
- db:db
# - redis:redis
env_file: .env
environment:
- WORDPRESS_DB_HOST=db:3306
- WORDPRESS_DB_USER=$MYSQL_USER
- WORDPRESS_DB_PASSWORD=$MYSQL_PASSWORD
- WORDPRESS_DB_NAME=wordpress
#- WPFPM_WP_REDIS_HOST: redis
#- WPFPM_RT_WP_NGINX_HELPER_CACHE_PATH: "/tmp/cache"
#- WP_PLUGINS: "nginx-helper redis-cache"
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=$REDIS_PASSWORD
logging:
options:
max-size: "10m"
max-file: "10"
volumes:
- ./wordpress:/var/www/html
- ./data/upload/upload.ini:/usr/local/etc/php/conf.d/upload.ini
networks:
- app-network
nginx:
depends_on:
- wordpress
image: nginx:1.23.3-alpine
container_name: nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./wordpress:/var/www/html
- ./data/nginx:/etc/nginx/conf.d
- ./data/nginx/logs:/var/log/nginx
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
networks:
- app-network
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
depends_on:
- nginx
image: certbot/certbot
container_name: certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
#command: certonly --webroot --webroot-path=/var/www/html --email [email protected] --agree-tos --no-eff-email --force-renewal --staging -d 444noresponse.com -d www.444noresponse.com
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
phpmyadmin:
image: phpmyadmin:5.2.0
container_name: phpmyadmin
restart: unless-stopped
depends_on:
- db
links:
- db:db
ports:
- "8080:80"
env_file: .env
environment:
- PMA_HOST=db:3306
- PMA_USER=$MYSQL_USER
- PMA_PASSWORD=$MYSQL_PASSWORD
- PMA_ARBITRARY=1
# volumes:
# - ./phpmyadmin:/var/www/pma
networks:
- app-network
# redis:
# image: redis:6.2.6
# restart: unless-stopped
# container_name: redis
# ports:
# - "6379:6379"
# volumes:
# - ./data/redis-data:/var/lib/redis
# - ./data/redis-conf:/usr/local/etc/redis/redis.conf
# networks:
# - app-network
# environment:
# - REDIS_REPLICATION_MODE=master
# command: redis-server --save 20 1 --maxmemory 256mb --maxmemory-policy allkeys-lru --appendonly yes --loglevel warning --requirepass $REDIS_PASSWORD
# #command: redis-server --maxmemory 256mb --maxmemory-policy allkeys-lru --appendonly yes
#volumes:
# certbot-etc:
# wordpress:
# dbdata:
networks:
app-network:
driver: bridge