added jellyfin deployment

This commit is contained in:
Bryan Joshua Pedini 2024-09-14 11:21:39 +02:00
parent ee7043ba52
commit 26e46993fd
3 changed files with 55 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.env
data

37
docker-compose.yml Normal file
View File

@ -0,0 +1,37 @@
---
services:
jellyfin:
image: jellyfin/jellyfin:${JELLYFIN_VERSION}
restart: unless-stopped
environment:
- JELLYFIN_PublishedServerUrl=${JELLYFIN_URL}
labels:
### Section Træfik
- traefik.enable=${TRAEFIK_ENABLED}
- traefik.docker.network=${TRAEFIK_NETWORK}
## HTTP
- traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http
# redirect to HTTPS only
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=${TRAEFIK_HTTP_MIDDLEWARES}
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE}
## HTTPS
- traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https
# configure the exposed service
- traefik.http.routers.https-${TRAEFIK_ROUTER}.middlewares=${TRAEFIK_HTTPS_MIDDLEWARES}
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE}
# enable TLS and its 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:
- ${JELLYFIN_DATA}/config:/config
- ${JELLYFIN_DATA}/cache:/cache
- ${JELLYFIN_DATA}/media:/media
networks:
traefik:
external: true
name: ${TRAEFIK_NETWORK}

16
env.example Normal file
View File

@ -0,0 +1,16 @@
# Træfik
TRAEFIK_ENABLED=true
TRAEFIK_NETWORK=traefik
TRAEFIK_ROUTER=jellyfin_example_com
TRAEFIK_SERVICE=jellyfin_example_com
TRAEFIK_SERVICE_PORT=8096
TRAEFIK_MATCHRULE=Host(`jellyfin.example.com`)
TRAEFIK_TLSENABLED=true
TRAEFIK_CERTRESOLVER=letsencrypt
TRAEFIK_HTTP_MIDDLEWARES=http-to-https
TRAEFIK_HTTPS_MIDDLEWARES=hsts
# Jellyfin
JELLYFIN_VERSION=latest
JELLYFIN_DATA=./data
JELLYFIN_URL=https://jellyfin.example.com