Skip to content

Instantly share code, notes, and snippets.

@sujaypillai
Created October 7, 2020 01:44
Show Gist options
  • Save sujaypillai/0090fa3c8fbb84b00c1e2f4b7a1f7a90 to your computer and use it in GitHub Desktop.
Save sujaypillai/0090fa3c8fbb84b00c1e2f4b7a1f7a90 to your computer and use it in GitHub Desktop.
version: '3.7'
services:
website:
image: klakegg/hugo:0.63.2
environment:
HUGO_ENV: production
HUGO_BASEURL: https://sujaypillai.dev
command: server --baseURL https://sujaypillai.dev --appendPort=false
ports:
- 1313:1313
volumes:
- /home/ec2-user/sujaypillai.dev:/src
networks:
- public
deploy:
labels:
- "traefik.frontend.rule=Host:${DOMAIN}"
- "traefik.enable=true"
- "traefik.port=1313"
- "traefik.backend=hugo"
- "traefik.tags=public"
- "traefik.docker.network=public"
- "traefik.redirectorservice.frontend.entryPoints=http"
- "traefik.redirectorservice.frontend.redirect.entryPoint=https"
- "traefik.webservice.frontend.entryPoints=https"
- "traefik.backend.loadbalancer.swarm=true"
- "traefik.frontend.passHostHeader=true"
networks:
public:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment