Benutzer-Werkzeuge

Webseiten-Werkzeuge


content:serverbasics:docker-wordpress
This version is outdated by a newer approved version.DiffThis version (2026/01/20 20:38) was approved by obel1x.The Previously approved version (2026/01/20 20:29) is available.Diff

Dies ist eine alte Version des Dokuments!


Docker: Wordpress

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
    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

The User and Database with that Password has to be created before on your mariadb- instance.

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
}
content/serverbasics/docker-wordpress.1768937932.txt.gz · Zuletzt geändert: von obel1x

Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki