-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (44 loc) · 986 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
47 lines (44 loc) · 986 Bytes
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
services:
db:
image: mariadb:10.11
container_name: wp-db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: rootpass123
MYSQL_DATABASE: wordpress
MYSQL_USER: wpuser
MYSQL_PASSWORD: wppass123
volumes:
- db_data:/var/lib/mysql
networks:
- wpnet
healthcheck:
test: ["CMD-SHELL", "mariadb-admin ping -h localhost -uroot -prootpass123 || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
wordpress:
image: wordpress:php8.2-apache
container_name: wp-app
restart: unless-stopped
depends_on:
db:
condition: service_healthy
ports:
- "80:80"
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: wpuser
WORDPRESS_DB_PASSWORD: wppass123
volumes:
- wp_data:/var/www/html
networks:
- wpnet
networks:
wpnet:
driver: bridge
volumes:
db_data:
wp_data: