Über diese Docker-Compose Datei kann WordPress mit PHP 8.3 hinter einem reverse Proxy (Port 81 oder anderem) betreiben. Es wird fest das Image mit php 8.3 verwendet.
docker-compose.yml
version: '3' services: db_wordpress: image: mysql:latest restart: unless-stopped # container_name: db_wordpress command: [ '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci' ] volumes: - /opt/docker-containers/wp-m-hofmann.dev/database:/var/lib/mysql environment: MYSQL_DATABASE: "${DB_NAME}" MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}" # ports: # - 127.0.0.1:3307:3306 wp: image: wordpress:php8.3-apache #latest https://hub.docker.com/_/wordpress/ restart: unless-stopped ports: - 127.0.0.1:82:80 volumes: - ./php.conf.ini:/usr/local/etc/php/conf.d/conf.ini - ./wp-data/:/var/www/html environment: WORDPRESS_DB_HOST: db_wordpress WORDPRESS_DB_NAME: "${DB_NAME}" WORDPRESS_DB_USER: root WORDPRESS_DB_PASSWORD: "${DB_ROOT_PASSWORD}" depends_on: - db_wordpress links: - db_wordpress
.env
DB_ROOT_PASSWORD=geheimesPW DB_NAME=wordpress
php.conf.ini
memory_limit = 512M upload_max_filesize = 30M post_max_size = 30M max_execution_time = 300