Docker Reverse Proxy with static and wordpress pages

version: '3'
services:
 nginx-proxy:
 image: 'jwilder/nginx-proxy'
 container_name: nginx-proxy
 ports:
 - "80:80"
 volumes:
 - /var/run/docker.sock:/tmp/docker.sock:ro
 environment:
 - DEFAULT_HOST=a.example.com

nginx-a:
 build: ./a/
 container_name: nginx-a
 environment:
 - VIRTUAL_HOST=a.example.com

nginx-b:
 build: ./b/
 container_name: nginx-b
 environment:
 - VIRTUAL_HOST=b.example.com

mysql-c:
 image: mariadb
 container_name: mysql-c
 environment:
 MYSQL_ROOT_PASSWORD: xxxxxxxxx
 MYSQL_DATABASE: wordpress
 MYSQL_USER: wordpress
 MYSQL_PASSWORD: wordpress
 volumes:
 - ./persistent-data/wordpress-mariadb/:/var/lib/mysql

 wordpress-c:
 image: wordpress
 container_name: wordpress-c
 environment:
# WORDPRESS_DB_HOST: mysql-mklug:3306
# WORDPRESS_DB_NAME: wordpress
# WORDPRESS_DB_USER: wordpress
# WORDPRESS_DB_PASSWORD: xxxxxxxx
 environment:
 - VIRTUAL_HOST=c.example.com

 

One thought on “Docker Reverse Proxy with static and wordpress pages”

  1. You have made some good points there. I looked on the nett ffor additional information about the issue and found most people will go along wijth
    your views on this site.

Comments are closed.