2022-11-13 23:16:12 +00:00
|
|
|
local compose = import 'compose.libsonnet';
|
|
|
|
local Compose = compose.Compose;
|
|
|
|
local Command = compose.Command;
|
|
|
|
local Port = compose.Port;
|
|
|
|
local MediaService = compose.MediaService;
|
|
|
|
local MediaMounts = compose.MediaMounts;
|
2022-11-13 01:06:12 +00:00
|
|
|
|
|
|
|
function(secrets={})
|
|
|
|
Compose({
|
|
|
|
traefik: {
|
|
|
|
image: 'traefik:latest',
|
2022-11-13 23:16:12 +00:00
|
|
|
command: Command({
|
2022-11-13 01:06:12 +00:00
|
|
|
'log.level': 'ERROR',
|
|
|
|
'api.insecure': 'true',
|
|
|
|
'providers.docker': 'true',
|
|
|
|
'providers.docker.exposedbydefault': 'false',
|
|
|
|
'entrypoints.web.address': ':80',
|
|
|
|
// 'entrypoints.websecure.address': ':443',
|
|
|
|
}),
|
|
|
|
docker:: true,
|
|
|
|
webPort:: 80,
|
|
|
|
ports: [Port(80), /* Port(443), */ Port(8080)],
|
|
|
|
traefik:: {
|
|
|
|
// 'traefik.http.routers.http-catchall.rule': 'hostregexp(`{host:.+}`)'
|
|
|
|
// 'traefik.http.routers.http-catchall.entrypoints': 'web'
|
|
|
|
// 'traefik.http.routers.http-catchall.middlewares': 'redirect-to-https'
|
|
|
|
// 'traefik.http.middlewares.redirect-to-https.redirectscheme.scheme': 'https'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
portainer: {
|
|
|
|
image: 'portainer/portainer-ce:latest',
|
|
|
|
docker:: true,
|
|
|
|
volumes: { portainer_data: '/data' },
|
|
|
|
webPort:: 9000,
|
|
|
|
ports: [Port(9443)],
|
|
|
|
},
|
|
|
|
deluge: MediaService(
|
|
|
|
name='deluge',
|
|
|
|
env={ DELUGE_LOGLEVEL: 'error' },
|
|
|
|
mounts={ torrents: '/downloads' },
|
|
|
|
webPort=8112,
|
|
|
|
ports=[Port(54979), Port(54979, kind='udp')],
|
|
|
|
),
|
|
|
|
prowlarr: MediaService(
|
|
|
|
name='prowlarr',
|
|
|
|
tag='develop',
|
|
|
|
webPort=9696,
|
|
|
|
mounts={
|
|
|
|
torrents: '/downloads',
|
|
|
|
'passport-5tb': '/passport-5tb',
|
|
|
|
'passport-1tb': '/passport-1tb',
|
|
|
|
},
|
|
|
|
),
|
|
|
|
bazarr: MediaService(
|
|
|
|
name='bazarr',
|
|
|
|
webPort=6767,
|
|
|
|
mounts={
|
|
|
|
'passport-5tb': '/passport-5tb',
|
|
|
|
'passport-1tb': '/passport-1tb',
|
|
|
|
},
|
|
|
|
),
|
|
|
|
radarr: MediaService(
|
|
|
|
name='radarr',
|
|
|
|
webPort=7878,
|
|
|
|
mounts={
|
|
|
|
'passport-5tb/movies': '/passport-5tb',
|
|
|
|
'passport-1tb/movies': '/passport-1tb',
|
|
|
|
torrents: '/downloads',
|
|
|
|
},
|
|
|
|
),
|
|
|
|
sonarr: MediaService(
|
|
|
|
name='sonarr',
|
|
|
|
webPort=8989,
|
|
|
|
mounts={
|
|
|
|
'passport-5tb/tv': '/passport-5tb',
|
|
|
|
'passport-1tb/tv': '/passport-1tb',
|
|
|
|
torrents: '/downloads',
|
|
|
|
}
|
|
|
|
),
|
|
|
|
plex: {
|
|
|
|
image: 'plexinc/pms-docker',
|
|
|
|
environment: {
|
2022-11-13 23:16:12 +00:00
|
|
|
TZ: 'America/New_York',
|
2022-11-13 01:06:12 +00:00
|
|
|
PLEX_CLAIM: std.get(secrets, 'PLEX_CLAIM'),
|
|
|
|
ADVERTISE_IP: std.get(secrets, 'ADVERTISE_IP'),
|
|
|
|
},
|
|
|
|
volumes: { plex_config: '/config' },
|
|
|
|
mounts:: MediaMounts({
|
|
|
|
'torrents/plex-transcode': '/transcode',
|
|
|
|
'passport-5tb': '/passport-5tb',
|
|
|
|
'passport-1tb': '/passport-1tb',
|
|
|
|
}),
|
|
|
|
devices: ['/dev/dri:/dev/dri'],
|
|
|
|
webPort:: 32400,
|
|
|
|
ports: [
|
|
|
|
Port(56463, src=32400),
|
|
|
|
Port(3005),
|
|
|
|
Port(8324),
|
|
|
|
Port(32469),
|
|
|
|
Port(1900, kind='udp'),
|
|
|
|
Port(32410, kind='udp'),
|
|
|
|
Port(32412, kind='udp'),
|
|
|
|
Port(32413, kind='udp'),
|
|
|
|
Port(32414, kind='udp'),
|
|
|
|
],
|
|
|
|
},
|
|
|
|
archivebox: {
|
|
|
|
image: 'archivebox/archivebox:dev',
|
|
|
|
command: 'server --quick-init 0.0.0.0:8000',
|
|
|
|
environment: {
|
|
|
|
ALLOWED_HOSTS: '*',
|
|
|
|
MEDIA_MAX_SIZE: '750m',
|
|
|
|
RESOLUTION: '1024,768',
|
|
|
|
},
|
|
|
|
mounts:: MediaMounts({ 'passport-5tb/archivebox': '/data' }),
|
|
|
|
webPort:: 8000,
|
|
|
|
host:: 'archive',
|
|
|
|
},
|
|
|
|
})
|