Last active
January 17, 2023 16:25
-
-
Save austinfrey/58b3bb5a9d10a3214b376e33ea84bdc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
# FaaS API Gateway | |
gateway: | |
volumes: | |
- "/var/run/docker.sock:/var/run/docker.sock" | |
image: alexellis2/faas-gateway:latest | |
networks: | |
- traefik-net | |
deploy: | |
labels: | |
- traefik.port=8080 | |
- traefik.frontend.rule=Host:yourdomain.com,www.yourdomain.com | |
placement: | |
constraints: [node.role == manager] | |
# Traefik: Dynamic Reverse Proxy | |
traefik: | |
image: traefik:latest | |
command: -c --docker=true | |
--docker.swarmmode=true | |
--docker.domain=traefik | |
--docker.watch=true | |
--web=true | |
--debug=true | |
--defaultEntryPoints='http,https' | |
--acme=true | |
--acme.domains='yourdomain.com,www.yourdomain.com' | |
--acme.email= | |
--acme.ondemand=true | |
--acme.onhostrule=true | |
--acme.storage=/etc/traefik/acme/acme.json | |
--acme.entrypoint=https | |
--entryPoints='Name:https Address::443 TLS' | |
--entryPoints='Name:http Address::80 Redirect.EntryPoint:https' | |
ports: | |
- 80:80 | |
- 8080:8080 | |
- 443:443 | |
volumes: | |
- "/var/run/docker.sock:/var/run/docker.sock" | |
- "acme:/etc/traefik/acme" | |
networks: | |
- traefik-net | |
deploy: | |
placement: | |
constraints: [node.role == manager] | |
networks: | |
traefik-net: | |
driver: overlay | |
volumes: | |
portainer: | |
acme: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment