Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add jellyfin template #243

Merged
merged 6 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions public/templates/jellyfin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions templates/jellyfin/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: '3.8'
services:
jellyfin:
image: jellyfin/jellyfin:10
networks:
- dokploy-network
ports:
- ${JELLYFIN_PORT}
labels:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this:

    ports:
      - ${JELLYFIN_PORT}

- "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=https://${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
Siumauricio marked this conversation as resolved.
Show resolved Hide resolved
22 changes: 22 additions & 0 deletions templates/jellyfin/index.ts
Original file line number Diff line number Diff line change
@@ -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,
};
}
15 changes: 15 additions & 0 deletions templates/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
];