-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
76 lines (72 loc) · 2.05 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
services:
database:
image: mariadb:${DB_VERSION:-10.4}
volumes:
- "dbdata:/var/lib/mysql"
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-password}
MYSQL_DATABASE: ${DB_DATABASE:-wordpress}
MYSQL_USER: ${DB_USER:-wordpress}
MYSQL_PASSWORD: ${DB_PASSWORD:-password}
restart: always
command:
'mysqld --innodb-flush-method=fsync'
redis:
image: redis:alpine
command: ["redis-server", "--appendonly", "yes"]
ports:
- "6379:6379"
restart: always
php:
image: devilbox/php-fpm:${PHP_VERSION:-8.2}-work
depends_on:
- database
- redis
working_dir: /var/www/html
environment:
MYSQL_HOST: ${DB_HOST:-database}
MYSQL_DATABASE: ${DB_DATABASE:-wordpress}
MYSQL_USER: ${DB_USER:-wordpress}
MYSQL_PASSWORD: ${DB_PASSWORD:-password}
WP_CLI_ALLOW_ROOT: true
NEW_UID: 1000
NEW_GID: 1000
volumes:
- "./.docker/config/php/php.ini:/usr/local/etc/php/conf.d/zzz-php.ini"
- "./.docker/wordpress:/var/www/html"
- "./:/var/www/html/wp-content/plugins/prompress"
extra_hosts:
- "${SITE_URL:-localhost}:host-gateway"
restart: always
web:
image: nginx:1-alpine
depends_on:
- php
volumes:
- "./.docker/config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro"
- "./.docker/wordpress:/var/www/html"
- "./:/var/www/html/wp-content/plugins/prompress:ro"
ports:
- "80:80"
- "443:443"
extra_hosts:
- "${SITE_URL:-localhost}:host-gateway"
prometheus:
image: prom/prometheus
volumes:
- ./.docker/config/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- promdata:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9090:9090
restart: always
volumes:
wpdata: {}
dbdata: {}
promdata: {}