version: '3'

services:
  https-portal:
    image: steveltn/https-portal:1
    ports:
      - 80:80
      - 443:443
    links:
      - wordpress
    # Restart https-portal on failure or after Docker host restart.
    restart: always
    environment:
      # Forward wordpress.example.com to the WordPress container.
      # You can set up multiple domains at once.
      DOMAINS: 'example.com -> http://wordpress'
      STAGE: local
      # Using staging server by default, for there is a rate limit on production.
      # Uncomment to use Let's Encrypt production server.
      # STAGE: production
    volumes:
      - https-portal-data:/var/lib/https-portal

  wordpress:
    image: wordpress
    links:
      - db:mysql

  db:
    image: mariadb
    environment:
      MYSQL_ROOT_PASSWORD: '<a secure password>'

volumes:
  https-portal-data:

# Note: Recent version of Wordpress doesn't respect `X_FORWARDED_PROTO`
# header sent by HTTPS-PORTAL.
# Please refer to Section "Fixing protocol errors" to fix it after installing

# https://www.nan-labs.com/blog/dockerize-secure-wordpress-behind-proxy

version: '3'

services:
  https-portal:
    image: steveltn/https-portal:1
    ports:
      - 80:80
      - 443:443
    links:
      - wordpress
    # Restart https-portal on failure or after Docker host restart.
    restart: always
    environment:
      # Forward wordpress.example.com to the WordPress container.
      # You can set up multiple domains at once.
      DOMAINS: 'https-portal-test.steveltn.me -> http://wordpress'
      STAGE: production
      # Using staging server by default, for there is a rate limit on production.
      # Uncomment to use Let's Encrypt production server.
      # STAGE: production
    volumes:
      - https-portal-data:/var/lib/https-portal

  wordpress:
    image: wordpress
    links:
      - db:mysql

  db:
    image: mariadb
    environment:
      MYSQL_ROOT_PASSWORD: '<a secure password>'

volumes:
  https-portal-data:

Add a notice about WordPress' X_FORWARDED_PROTO issue
Add a notice about WordPress' X_FORWARDED_PROTO issue
