Compose-Examples/examples/wordpress/docker-compose.yml

53 lines
1.9 KiB
YAML
Raw Normal View History

2023-02-19 17:22:09 +00:00
version: '3.3'
services:
wordpress-db:
image: mariadb:10.11
2023-02-19 17:22:09 +00:00
container_name: wordpress-db
hostname: wordpress-db
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/wordpress/mysql:/var/lib/mysql
2023-02-19 17:22:09 +00:00
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=wordpressroot
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpress
2024-05-18 01:20:49 +00:00
#networks:
# - proxy
2023-02-19 17:22:09 +00:00
wordpress:
image: wordpress:latest
container_name: wordpress
hostname: wordpress
volumes:
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/wordpress/data:/var/www/html
2023-02-19 17:22:09 +00:00
ports:
- 80:80
2024-05-18 01:20:49 +00:00
expose:
- 80
2023-02-19 17:22:09 +00:00
restart: unless-stopped
environment:
- WORDPRESS_DB_HOST=wordpress-db
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress
- WORDPRESS_DB_NAME=wordpress
2024-05-18 01:20:49 +00:00
#networks:
# - proxy
2023-02-19 17:22:09 +00:00
#labels:
# - traefik.enable=true
2024-05-18 01:20:49 +00:00
# - traefik.docker.network=proxy
# - traefik.http.routers.wordpress.rule=Host(`wordpress.example.com`) # please adjust
2023-02-19 17:22:09 +00:00
# - traefik.http.services.wordpress.loadbalancer.server.port=80
# - traefik.http.middlewares.limit.buffering.maxRequestBodyBytes=50000000 # optional, only necessary for enabled file uploads
# - traefik.http.middlewares.limit.buffering.maxResponseBodyBytes=50000000 # optional, only necessary for enabled file uploads
# - traefik.http.middlewares.limit.buffering.memRequestBodyBytes=50000000 # optional, only necessary for enabled file uploads
# - traefik.http.middlewares.limit.buffering.memResponseBodyBytes=50000000 # optional, only necessary for enabled file uploads
2023-02-19 17:22:09 +00:00
# # Part for optional traefik middlewares
# - traefik.http.routers.wordpress.middlewares=local-ipwhitelist@file
#networks:
# proxy:
# external: true