Add docker-compose.yaml
This commit is contained in:
commit
596345e05e
41
docker-compose.yaml
Normal file
41
docker-compose.yaml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
services:
|
||||||
|
wordpress:
|
||||||
|
image: 'wordpress:latest'
|
||||||
|
volumes:
|
||||||
|
- 'wordpress-files:/var/www/html'
|
||||||
|
environment:
|
||||||
|
- SERVICE_FQDN_WORDPRESS
|
||||||
|
- WORDPRESS_DB_HOST=mysql
|
||||||
|
- WORDPRESS_DB_USER=$SERVICE_USER_WORDPRESS
|
||||||
|
- WORDPRESS_DB_PASSWORD=$SERVICE_PASSWORD_WORDPRESS
|
||||||
|
- WORDPRESS_DB_NAME=wordpress
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
- CMD
|
||||||
|
- curl
|
||||||
|
- '-f'
|
||||||
|
- 'http://127.0.0.1'
|
||||||
|
interval: 2s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
mysql:
|
||||||
|
image: 'mysql:8'
|
||||||
|
volumes:
|
||||||
|
- 'mysql-data:/var/lib/mysql'
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=$SERVICE_PASSWORD_ROOT
|
||||||
|
- MYSQL_DATABASE=wordpress
|
||||||
|
- MYSQL_USER=$SERVICE_USER_WORDPRESS
|
||||||
|
- MYSQL_PASSWORD=$SERVICE_PASSWORD_WORDPRESS
|
||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
- CMD
|
||||||
|
- mysqladmin
|
||||||
|
- ping
|
||||||
|
- '-h'
|
||||||
|
- 127.0.0.1
|
||||||
|
interval: 5s
|
||||||
|
timeout: 20s
|
||||||
|
retries: 10
|
||||||
Loading…
x
Reference in New Issue
Block a user