-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
95 lines (90 loc) · 2.41 KB
/
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
networks:
mysql-net: {}
proxy-net: {}
volumes:
mysql-vol: {}
services:
mysql:
image: mysql:8.0
command:
- mysqld
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootpass}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
networks:
- mysql-net
# # Mount port for dev tools
# ports:
# - 3306:3306
restart: unless-stopped
volumes:
- mysql-vol:/var/lib/mysql
# # For initial database
# - ./initdb:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "MYSQL_PWD=$$MYSQL_ROOT_PASSWORD mysqladmin ping -h localhost -u root -s"]
start_period: 15s
interval: 3s
timeout: 3s
retries: 5
wordpress:
image: wordpress_app
container_name: wordpress
build:
context: ./docker/wordpress
dockerfile: Dockerfile
args:
- WORDPRESS_VERSION=6
- PHP_VERSION=8.2
depends_on:
- mysql
environment:
WORDPRESS_DB_NAME: ${MYSQL_DATABASE}
WORDPRESS_DB_USER: ${MYSQL_USER}
WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD}
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_CHARSET: utf8
# WORDPRESS_DB_COLLATE:
WORDPRESS_TABLE_PREFIX: wp_
# WORDPRESS_AUTH_KEY:
# WORDPRESS_SECURE_AUTH_KEY:
# WORDPRESS_LOGGED_IN_KEY:
# WORDPRESS_NONCE_KEY:
# WORDPRESS_AUTH_SALT:
# WORDPRESS_SECURE_AUTH_SALT:
# WORDPRESS_LOGGED_IN_SALT:
# WORDPRESS_NONCE_SALT:
WORDPRESS_DEBUG: 1
networks:
- mysql-net
- proxy-net
restart: unless-stopped
volumes:
- ./docker/wordpress/php.ini:/usr/local/etc/php/conf.d/dev.ini:ro
- ./app:/var/www/html
web:
image: nginx:stable-alpine
container_name: web
depends_on:
- wordpress
environment:
PHP_FPM_ENDPOINT: wordpress:9000
networks:
- proxy-net
restart: unless-stopped
ports:
- 80:80
volumes:
- ./docker/nginx/default.conf:/etc/nginx/templates/default.conf.template:ro
- ./app:/var/www/html:ro
healthcheck:
test: ["CMD", "curl", "-fs", "-o", "/dev/null", "http://localhost:80/_health/nginx"]
start_period: 15s
interval: 5s
timeout: 3s
retries: 5