This documentation is not working as is. It's only for reference. I am using my own mariadb on bare metal because mariadb in docker is very slow. Also i am using an external docker network for IPV6 subnetting.
In your Docker- Compose Directory, create the folder wordpress and a new file docker-compose.yml as always and add:
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
services:
wp:
image: docker.io/bitnami/wordpress:latest
stop_grace_period: 3m
# ports:
# - '80:8080'
# - '443:8443'
volumes:
- wp:/bitnami/wordpress
# - '/run/mysql/mysql.sock:/run/mysql/mysql.sock'
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
# - ALLOW_EMPTY_PASSWORD=yes
- WORDPRESS_DATABASE_HOST=mariadbserver
- WORDPRESS_DATABASE_PORT_NUMBER=3306
- WORDPRESS_DATABASE_USER=wp_user
- WORDPRESS_DATABASE_NAME=wp_data
- WORDPRESS_DATABASE_PASSWORD=SecureDBPassword
- WORDPRESS_ENABLE_HTTPS=yes
- WORDPRESS_SCHEME=https
- WORDPRESS_EMAIL=Webmaster@domain.tld
- WORDPRESS_ENABLE_REVERSE_PROXY=yes
- WORDPRESS_ENABLE_MULTISITE=yes
- WORDPRESS_MULTISITE_HOST=domain.tld
networks:
- wp_default
volumes:
wp:
driver: local
# Still needs to be defined while without it won't enable ipv6
networks:
wp_default:
external: true
enable_ipv6: true
Attention:
Here you can find about the basic configuration of Bitnamis package: https://hub.docker.com/r/bitnami/wordpress
Now, edit your Caddyfile:
https://wp.domain.tld:443 {
header Strict-Transport-Security max-age=31536000;
reverse_proxy wp-1:8080
}