Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.1'
- volumes:
- mysql_data:
- networks:
- proxy:
- external: true
- backend:
- external: true
- services:
- wordpress:
- image: wordpress
- container_name: wp_******
- depends_on:
- - dbwordpress
- restart: unless-stopped
- environment:
- WORDPRESS_DB_HOST: ${WP_DB_HOST}
- WORDPRESS_DB_USER: ${WP_DB_USER}
- WORDPRESS_DB_PASSWORD: ${WP_DB_PW}
- WORDPRESS_DB_NAME: ${WP_DB_NAME}
- volumes:
- - ./app:/var/www/html
- - ./wordpress.ini:/usr/local/etc/php/conf.d/wordpress.ini
- labels:
- - "traefik.enable=true"
- - "traefik.http.routers.wordpress.entrypoints=https"
- - "traefik.http.routers.wordpress.rule=Host(`domain.tld`,`www.domain.tld`)"
- - "traefik.http.routers.wordpress.middlewares=default@file"
- - "traefik.http.routers.wordpress.tls=true"
- - "traefik.http.routers.wordpress.tls.certresolver=http"
- - "traefik.http.routers.wordpress.service=wordpress"
- - "traefik.http.services.wordpress.loadbalancer.server.port=80"
- - "traefik.docker.network=proxy"
- networks:
- proxy:
- ipv4_address: 172.18.0.6
- ipv6_address: 2***::6
- backend:
- ipv4_address: 172.30.0.2
- dbwordpress:
- image: mariadb
- restart: unless-stopped
- environment:
- MARIADB_ROOT_PASSWORD: ${DB_ROOT_PW}
- MARIADB_DATABASE: ${WP_DB_NAME}
- MARIADB_USER: ${WP_DB_USER}
- MARIADB_PASSWORD: ${WP_DB_PW}
- volumes:
- - ./database:/var/lib/mysql
- networks:
- backend:
- ipv4_address: 172.30.0.3
- ports:
- - 3308:3306
- wpredis:
- image: redis:alpine
- container_name: wordpress-redis
- restart: unless-stopped
- networks:
- backend:
- ipv4_address: 172.30.0.10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement