Add wordpress/compose.yaml
This commit is contained in:
55
wordpress/compose.yaml
Normal file
55
wordpress/compose.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
services:
|
||||
db:
|
||||
image: mariadb:11
|
||||
container_name: webostadeplein-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||
- MYSQL_USER=${MYSQL_USER}
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||
volumes:
|
||||
# MySQL data → host
|
||||
- /srv/appdata/wordpress/db:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
wordpress:
|
||||
image: wordpress:6-apache
|
||||
container_name: webostadeplein-wp
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- WORDPRESS_DB_HOST=db:3306
|
||||
- WORDPRESS_DB_USER=${MYSQL_USER}
|
||||
- WORDPRESS_DB_PASSWORD=${MYSQL_PASSWORD}
|
||||
- WORDPRESS_DB_NAME=${MYSQL_DATABASE}
|
||||
# Direct file writes via WP (plugins/themes)
|
||||
- WORDPRESS_CONFIG_EXTRA=define('FS_METHOD','direct');
|
||||
volumes:
|
||||
# WordPress files (plugins, uploads, themes, etc.) → host
|
||||
- /srv/appdata/wordpress/html:/var/www/html
|
||||
ports:
|
||||
# Tijdelijk direct via IP: http://192.168.2.90:8080
|
||||
- "8080:80"
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
networks: {}
|
||||
Reference in New Issue
Block a user