Skip to content

Instantly share code, notes, and snippets.

@jitheshkt
Last active December 29, 2019 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jitheshkt/2b6264cfc83465b2440abee07e64a6d4 to your computer and use it in GitHub Desktop.
Save jitheshkt/2b6264cfc83465b2440abee07e64a6d4 to your computer and use it in GitHub Desktop.
Apache and Traefik 2.0 with Docker Compose
version: "3"
networks:
proxy:
external: true
services:
public_apache:
image: httpd
labels:
- "traefik.enable=true"
- "traefik.http.routers.www-secure.rule=Host(`www.website.com`) || Host(`website.com`)" #www is a unique identifier for the container. so replace it below two lines as well.
- "traefik.http.routers.www-secure.tls=true"
- "traefik.http.routers.www-secure.tls.certresolver=http"
networks:
- proxy
restart: always
container_name: public_apache
volumes:
- ./html:/usr/local/apache2/htdocs/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment