-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·62 lines (60 loc) · 1.84 KB
/
docker-compose.yml
File metadata and controls
executable file
·62 lines (60 loc) · 1.84 KB
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
services:
db:
container_name: docker-wp_db
image: mysql:8.4
restart: always
ports:
- "127.0.0.1:3306:3306"
volumes:
- db_data:/var/lib/mysql
- ./db/init:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: wordpress
MYSQL_DEFAULT_AUTH_PLUGIN: mysql_native_password
MYSQL_INIT_DB_ARGS: "--initialize-insecure"
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$$MYSQL_ROOT_PASSWORD"]
interval: 5s
timeout: 5s
retries: 10
start_period: 60s
wp:
container_name: docker-wp_wp
build: .
ports:
- "127.0.0.1:80:80"
volumes:
- type: bind
source: ./config/php.conf.ini
target: /usr/local/etc/php/conf.d/conf.ini
- type: bind
source: ./project
target: /var/www/html
depends_on:
db:
condition: service_healthy
environment:
DB_NAME: wordpress
DB_USER: root
DB_PASSWORD: 123456
DB_HOST: db
DB_PREFIX: wp_
WP_ADMIN: admin
WP_ADMIN_EMAIL: admin@example.com
WP_ADMIN_PASSWORD: 123456
WP_TITLE: Test
LIVE_URL: https://production.site
DEV_URL: http://development.local
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
volumes:
db_data:
name: docker-wp_db_data