feat: add jellyfin template

This commit is contained in:
Samuel
2024-07-21 11:05:44 +03:00
parent 63a1039439
commit ad696ea54a
4 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
version: '3.8'
services:
jellyfin:
image: jellyfin/jellyfin
networks:
- dokploy-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.${HASH}.rule=Host(`${JELLYFIN_HOST}`)"
- "traefik.http.services.${HASH}.loadbalancer.server.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'
networks:
dokploy-network:
external: true

View File

@@ -0,0 +1,19 @@
// EXAMPLE
import {
generateHash,
generateRandomDomain,
type Template,
type Schema,
} from "../utils";
export function generate(schema: Schema): Template {
const randomDomain = generateRandomDomain(schema);
const envs = [
`JELLYFIN_HOST=${randomDomain}`,
];
return {
envs,
};
}