Skip to content

Instantly share code, notes, and snippets.

@tader
Last active July 15, 2023 20:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tader/fd8c2b778770856e0905ca3310bb5f7d to your computer and use it in GitHub Desktop.
Save tader/fd8c2b778770856e0905ca3310bb5f7d to your computer and use it in GitHub Desktop.
ESPHome in Docker with Traefik for HTTPS
# https://gist.github.com/tader/fd8c2b778770856e0905ca3310bb5f7d
version: '3.3'
services:
traefik:
image: traefik:v2.9.8
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
ports:
- "443:443"
command:
- "--entrypoints.websecure.address=:443"
- "--providers.docker.exposedbydefault=false"
esphome:
image: esphome/esphome:2023.2.2
volumes:
- "./config:/config"
labels:
traefik.enable: true
traefik.http.routers.esphome.tls: true
traefik.http.routers.esphome.rule: HostRegexp(`{any:.+}`)
traefik.http.services.esphome.loadbalancer.server.port: 6052
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment