Skip to content

Instantly share code, notes, and snippets.

@wmnnd
Last active February 14, 2024 00:55
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 wmnnd/b88ec2f160028ae6bcf2ff9db1977113 to your computer and use it in GitHub Desktop.
Save wmnnd/b88ec2f160028ae6bcf2ff9db1977113 to your computer and use it in GitHub Desktop.
docker-compose with Traefik labels
version: '3.4'
services:
# ...
my-app:
image: my-app:latest
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.my-app.rule=Host(`example.com`)'
- 'traefik.http.routers.my-app.tls=true'
- 'traefik.http.routers.my-app.tls.certresolver=lets-encrypt'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment