36 lines
918 B
YAML
36 lines
918 B
YAML
|
version: '3.1'
|
||
|
services:
|
||
|
db:
|
||
|
container_name: db
|
||
|
image: "${mysql_image}:${mysql_version}"
|
||
|
environment:
|
||
|
- MARIADB_DATABASE=exampledb
|
||
|
- MARIADB_USER=exampleuser
|
||
|
- MARIADB_RANDOM_ROOT_PASSWORD='1'
|
||
|
healthcheck:
|
||
|
test: ["CMD-SHELL", "healthcheck.sh --su-mysql --connect --innodb_initialized"]
|
||
|
interval: 60s
|
||
|
timeout: 10s
|
||
|
retries: 3
|
||
|
start_period: 5s
|
||
|
volumes:
|
||
|
- db:/var/lib/mysql:Z
|
||
|
|
||
|
wp:
|
||
|
container_name: wp
|
||
|
image: "${wp_image}:${wp_version}"
|
||
|
depends_on:
|
||
|
- db
|
||
|
ports:
|
||
|
- ${listen_if}:${listen_port}:80
|
||
|
environment:
|
||
|
- WORDPRESS_DB_HOST=db
|
||
|
- WORDPRESS_DB_USER=exampleuser
|
||
|
- WORDPRESS_DB_NAME=exampledb
|
||
|
volumes:
|
||
|
- wp:/var/www/html:Z
|
||
|
|
||
|
volumes:
|
||
|
db:
|
||
|
wp:
|