Skip to content

Instantly share code, notes, and snippets.

@jitheshkt
Last active May 11, 2024 21:16
Show Gist options
  • 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