63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
services:
|
|
db:
|
|
image: mariadb:11.4
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
|
MYSQL_USER: ${MYSQL_USER}
|
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
|
command:
|
|
- --character-set-server=utf8mb4
|
|
- --collation-server=utf8mb4_unicode_ci
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "mariadb-admin ping -h 127.0.0.1 -uroot -p$$MYSQL_ROOT_PASSWORD --silent"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 30s
|
|
volumes:
|
|
- db_data:/var/lib/mysql
|
|
networks:
|
|
- wp_internal
|
|
|
|
wordpress:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
DEBIAN_MIRROR: ${DEBIAN_MIRROR:-http://mirror-linux.runflare.com/debian}
|
|
DEBIAN_SECURITY_MIRROR: ${DEBIAN_SECURITY_MIRROR:-http://mirror-linux.runflare.com/debian-security}
|
|
IONCUBE_URL: ${IONCUBE_URL:-https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz}
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST}
|
|
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME}
|
|
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER}
|
|
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
|
|
WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX}
|
|
WORDPRESS_DEBUG: ${WORDPRESS_DEBUG}
|
|
WORDPRESS_OFFLINE_MODE: ${WORDPRESS_OFFLINE_MODE:-1}
|
|
WORDPRESS_ACCESSIBLE_HOSTS: ${WORDPRESS_ACCESSIBLE_HOSTS:-localhost,127.0.0.1,::1,wordpress,db,backend-web}
|
|
ports:
|
|
- "${WORDPRESS_PORT}:80"
|
|
volumes:
|
|
- ./wp-content:/var/www/html/wp-content
|
|
- ./wp-config.php:/var/www/html/wp-config.php
|
|
networks:
|
|
- wp_internal
|
|
- wp_public
|
|
|
|
volumes:
|
|
db_data:
|
|
|
|
networks:
|
|
wp_internal:
|
|
driver: bridge
|
|
internal: true
|
|
wp_public:
|
|
driver: bridge
|