first deployment

needs testing
This commit is contained in:
Bryan Joshua Pedini 2022-02-25 23:16:28 +01:00
parent fccd8e2d9e
commit 7f2b37f266
3 changed files with 54 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/.env
/config

37
docker-compose.yml Normal file
View File

@ -0,0 +1,37 @@
---
version: "3"
services:
heimdall:
image: linuxserver/heimdall:${HEIMDALL_VERSION}
restart: unless-stopped
environment:
- PUID=${HEIMDALL_PUID}
- PGID=${HEIMDALL_PGID}
- TZ=${HEIMDALL_TIMEZONE}
labels:
- traefik.enable=${TRAEFIK_ENABLED}
- traefik.docker.network=traefik
### Section HTTP
- traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http
# redirect to HTTPS only
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=http-to-https
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
### Section HTTPS
- traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https
# configure the exposed service
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
# of course, enable TLS and it's certificate provider
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=${TRAEFIK_TLSENABLED}
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=${TRAEFIK_CERTRESOLVER}
# specify a service so a custom port can be used
- traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT}
networks:
- traefik
volumes:
./config:/config
networks:
traefik:
external: true
name: ${TRAEFIK_NETWORK}

15
example.env Normal file
View File

@ -0,0 +1,15 @@
# Heimdall
HEIMDALL_VERSION=2.2.2
HEIMDALL_PUID=1000
HEIMDALL_PGID=1000
HEIMDALL_TIMEZONE=Europe/London
# Træfik
TRAEFIK_CERTRESOLVER=letsencrypt
TRAEFIK_ENABLED=true
TRAEFIK_MATCHRULE=heimdall.mydomain.com
TRAEFIK_NETWORK=traefik
TRAEFIK_ROUTER=heimdall_mydomain_com
TRAEFIK_SERVICE=heimdall_mydomain_com
TRAEFIK_SERVICE_PORT=80
TRAEFIK_TLSENABLED=true