diff --git a/public/templates/jellyfin.svg b/public/templates/jellyfin.svg new file mode 100644 index 000000000..4227a7064 --- /dev/null +++ b/public/templates/jellyfin.svg @@ -0,0 +1,34 @@ + + + \ No newline at end of file diff --git a/templates/jellyfin/docker-compose.yml b/templates/jellyfin/docker-compose.yml new file mode 100644 index 000000000..16ae6be96 --- /dev/null +++ b/templates/jellyfin/docker-compose.yml @@ -0,0 +1,30 @@ +version: '3.8' +services: + jellyfin: + image: jellyfin/jellyfin:10 + networks: + - dokploy-network + ports: + - ${JELLYFIN_PORT} + labels: + - "traefik.enable=true" + - "traefik.http.routers.${HASH}.rule=Host(`${JELLYFIN_HOST}`)" + - "traefik.http.services.${HASH}.loadbalancer.server.port=${JELLYFIN_PORT}" + volumes: + - config:/config + - cache:/cache + - media:/media + restart: 'unless-stopped' + # Optional - alternative address used for autodiscovery + environment: + - JELLYFIN_PublishedServerUrl=http://${JELLYFIN_HOST} + # Optional - may be necessary for docker healthcheck to pass if running in host network mode + extra_hosts: + - 'host.docker.internal:host-gateway' +volumes: + config: + cache: + media: +networks: + dokploy-network: + external: true diff --git a/templates/jellyfin/index.ts b/templates/jellyfin/index.ts new file mode 100644 index 000000000..dc33b121a --- /dev/null +++ b/templates/jellyfin/index.ts @@ -0,0 +1,22 @@ +// EXAMPLE +import { + type Schema, + type Template, + generateHash, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainServiceHash = generateHash(schema.projectName); + const randomDomain = generateRandomDomain(schema); + const port = 8096; + const envs = [ + `JELLYFIN_HOST=${randomDomain}`, + `HASH=${mainServiceHash}`, + `JELLYFIN_PORT=${port}`, + ]; + + return { + envs, + }; +} diff --git a/templates/templates.ts b/templates/templates.ts index 0063013e3..a23273464 100644 --- a/templates/templates.ts +++ b/templates/templates.ts @@ -378,4 +378,19 @@ export const templates: TemplateData[] = [ tags: ["analytics"], load: () => import("./umami/index").then((m) => m.generate), }, + { + id: "jellyfin", + name: "jellyfin", + version: "v10.9.7", + description: + "Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. ", + logo: "jellyfin.svg", + links: { + github: "https://github.com/jellyfin/jellyfin", + website: "https://jellyfin.org/", + docs: "https://jellyfin.org/docs/", + }, + tags: ["media system"], + load: () => import("./jellyfin/index").then((m) => m.generate), + }, ];