Pulumi code for my server setup
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove more unnecessary conditions

+68 -94
+15 -21
services/haring/downloaders/qbittools.ts
··· 3 3 import { ContainerService } from "~lib/service/service"; 4 4 import { qbittorrentService } from "./qbittorrent"; 5 5 6 - let qbittoolsService: ContainerService | undefined; 7 - 8 - if (qbittorrentService.localUrl) { 9 - qbittoolsService = new ContainerService("qbittools", { 10 - image: "registry.gitlab.com/alexkm/qbittools", 11 - mounts: [confMount("qbittorrent", "/qbittorrent")], 12 - command: [ 13 - "reannounce", 14 - "-C", 15 - "/qbittorrent/qBittorrent.conf", 16 - "-s", 17 - qbittorrentService.localUrl, 18 - "-U", 19 - getEnv("USERNAME"), 20 - "-P", 21 - getEnv("QBITTORRENT_PASSWORD"), 22 - ], 23 - }); 24 - } 25 - 26 - export { qbittoolsService }; 6 + export const qbittoolsService = new ContainerService("qbittools", { 7 + image: "registry.gitlab.com/alexkm/qbittools", 8 + mounts: [confMount("qbittorrent", "/qbittorrent")], 9 + command: [ 10 + "reannounce", 11 + "-C", 12 + "/qbittorrent/qBittorrent.conf", 13 + "-s", 14 + qbittorrentService.localUrl, 15 + "-U", 16 + getEnv("USERNAME"), 17 + "-P", 18 + getEnv("QBITTORRENT_PASSWORD"), 19 + ], 20 + });
+9 -15
services/haring/downloaders/qbittorrent-exporter.ts
··· 2 2 import { ContainerService } from "~lib/service/service"; 3 3 import { qbittorrentService } from "./qbittorrent"; 4 4 5 - let qbittorrentExporterService: ContainerService | undefined; 6 - 7 - if (qbittorrentService?.localUrl) { 8 - qbittorrentExporterService = new ContainerService("qbittorrent-exporter", { 9 - image: "caseyscarborough/qbittorrent-exporter", 10 - servicePort: 17871, 11 - envs: { 12 - QBITTORRENT_BASE_URL: qbittorrentService.localUrl, 13 - QBITTORRENT_USERNAME: getEnv("USERNAME"), 14 - QBITTORRENT_PASSWORD: getEnv("QBITTORRENT_PASSWORD"), 15 - }, 16 - }); 17 - } 18 - 19 - export { qbittorrentExporterService }; 5 + export const qbittorrentExporterService = new ContainerService("qbittorrent-exporter", { 6 + image: "caseyscarborough/qbittorrent-exporter", 7 + servicePort: 17871, 8 + envs: { 9 + QBITTORRENT_BASE_URL: qbittorrentService.localUrl, 10 + QBITTORRENT_USERNAME: getEnv("USERNAME"), 11 + QBITTORRENT_PASSWORD: getEnv("QBITTORRENT_PASSWORD"), 12 + }, 13 + });
+1 -1
services/haring/files/sist2.ts
··· 20 20 mounts: [confMount("elasticsearch", "/usr/share/elasticsearch/data")], 21 21 envs: { "discovery.type": "single-node" }, 22 22 }, 23 - { dependsOn: [sist2Service.container] }, 23 + { dependsOn: sist2Service.container }, 24 24 );
+13 -19
services/haring/media/autolanguages.ts
··· 2 2 import { ContainerService } from "~lib/service/service"; 3 3 import { plexService } from "./plex"; 4 4 5 - let autolanguagesService: ContainerService | undefined; 6 - 7 - if (plexService?.localUrl) { 8 - autolanguagesService = new ContainerService("autolanguages", { 9 - // image: "remirigal/plex-auto-languages", 10 - image: "journeyover/plex-auto-languages", 11 - envs: { 12 - PLEX_TOKEN: getEnv("PLEX_TOKEN"), 13 - PLEX_URL: plexService.localUrl, 14 - UPDATE_LEVEL: "season", 15 - TRIGGER_ON_ACTIVITY: true, 16 - REFRESH_ON_SCAN: true, 17 - NOTIFICATIONS_ENABLE: true, 18 - NOTIFICATIONS_APPRISE_CONFIGS: `[{ urls: ["${getEnv("AUTO_LANGUAGES_DISCORD_WEBHOOK")}"], events: ["play_or_activity", "scheduler"] }]`, 19 - }, 20 - }); 21 - } 22 - 23 - export { autolanguagesService }; 5 + export const autolanguagesService = new ContainerService("autolanguages", { 6 + // image: "remirigal/plex-auto-languages", 7 + image: "journeyover/plex-auto-languages", 8 + envs: { 9 + PLEX_TOKEN: getEnv("PLEX_TOKEN"), 10 + PLEX_URL: plexService.localUrl, 11 + UPDATE_LEVEL: "season", 12 + TRIGGER_ON_ACTIVITY: true, 13 + REFRESH_ON_SCAN: true, 14 + NOTIFICATIONS_ENABLE: true, 15 + NOTIFICATIONS_APPRISE_CONFIGS: `[{ urls: ["${getEnv("AUTO_LANGUAGES_DISCORD_WEBHOOK")}"], events: ["play_or_activity", "scheduler"] }]`, 16 + }, 17 + });
+6 -8
services/haring/media/medialytics.ts
··· 2 2 import { ContainerService } from "~lib/service/service"; 3 3 import { plexService } from "./plex"; 4 4 5 - let medialyticsService: ContainerService | undefined; 6 - 7 - if (plexService?.localUrl) { 8 - medialyticsService = new ContainerService("medialytics", { 5 + export const medialyticsService = new ContainerService( 6 + "medialytics", 7 + { 9 8 image: "ghcr.io/drewpeifer/medialytics", 10 9 servicePort: 80, 11 10 envs: { ··· 13 12 SERVER_TOKEN: getEnv("PLEX_TOKEN"), 14 13 }, 15 14 middlewares: ["auth"], 16 - }); 17 - } 18 - 19 - export { medialyticsService }; 15 + }, 16 + { dependsOn: plexService.container }, 17 + );
+23 -29
services/haring/media/plexanibridge.ts
··· 3 3 import { ContainerService } from "~lib/service/service"; 4 4 import { plexService } from "./plex"; 5 5 6 - let plexAniBridgeService: ContainerService | undefined; 7 - 8 - if (plexService?.localUrl) { 9 - plexAniBridgeService = new ContainerService("plexanibridge", { 10 - image: "ghcr.io/eliasbenb/plexanibridge", 11 - servicePort: 4848, 12 - mounts: [confMount("plexanibridge")], 13 - envs: { 14 - PAB_LOG_LEVEL: "DEBUG", 15 - PAB_PLEX_TOKEN: getEnv("PLEX_TOKEN"), 16 - PAB_PLEX_URL: plexService.localUrl, 17 - PAB_PLEX_SECTIONS: JSON.stringify(["TV Anime", "Movies Anime"]), 18 - // PAB_PROFILES__1__ANILIST_TOKEN: getEnv("ANILIST_TOKEN_1"), 19 - // PAB_PROFILES__1__PLEX_USER: getEnv("PLEX_USER_1"), 20 - PAB_PROFILES__2__ANILIST_TOKEN: getEnv("ANILIST_TOKEN_2"), 21 - PAB_PROFILES__2__PLEX_USER: getEnv("PLEX_USER_2"), 22 - PAB_PROFILES__2__EXCLUDED_SYNC_FIELDS: JSON.stringify([]), 23 - PAB_PROFILES__3__ANILIST_TOKEN: getEnv("ANILIST_TOKEN_3"), 24 - PAB_PROFILES__3__PLEX_USER: getEnv("PLEX_USER_3"), 25 - PAB_PROFILES__3__EXCLUDED_SYNC_FIELDS: JSON.stringify([]), 26 - PAB_PROFILES__4__ANILIST_TOKEN: getEnv("ANILIST_TOKEN_4"), 27 - PAB_PROFILES__4__PLEX_USER: getEnv("PLEX_USER_4"), 28 - PAB_PROFILES__4__EXCLUDED_SYNC_FIELDS: JSON.stringify([]), 29 - }, 30 - middlewares: ["auth"], 31 - }); 32 - } 33 - 34 - export { plexAniBridgeService }; 6 + export const plexAniBridgeService = new ContainerService("plexanibridge", { 7 + image: "ghcr.io/eliasbenb/plexanibridge", 8 + servicePort: 4848, 9 + mounts: [confMount("plexanibridge")], 10 + envs: { 11 + PAB_LOG_LEVEL: "DEBUG", 12 + PAB_PLEX_TOKEN: getEnv("PLEX_TOKEN"), 13 + PAB_PLEX_URL: plexService.localUrl, 14 + PAB_PLEX_SECTIONS: JSON.stringify(["TV Anime", "Movies Anime"]), 15 + // PAB_PROFILES__1__ANILIST_TOKEN: getEnv("ANILIST_TOKEN_1"), 16 + // PAB_PROFILES__1__PLEX_USER: getEnv("PLEX_USER_1"), 17 + PAB_PROFILES__2__ANILIST_TOKEN: getEnv("ANILIST_TOKEN_2"), 18 + PAB_PROFILES__2__PLEX_USER: getEnv("PLEX_USER_2"), 19 + PAB_PROFILES__2__EXCLUDED_SYNC_FIELDS: JSON.stringify([]), 20 + PAB_PROFILES__3__ANILIST_TOKEN: getEnv("ANILIST_TOKEN_3"), 21 + PAB_PROFILES__3__PLEX_USER: getEnv("PLEX_USER_3"), 22 + PAB_PROFILES__3__EXCLUDED_SYNC_FIELDS: JSON.stringify([]), 23 + PAB_PROFILES__4__ANILIST_TOKEN: getEnv("ANILIST_TOKEN_4"), 24 + PAB_PROFILES__4__PLEX_USER: getEnv("PLEX_USER_4"), 25 + PAB_PROFILES__4__EXCLUDED_SYNC_FIELDS: JSON.stringify([]), 26 + }, 27 + middlewares: ["auth"], 28 + });
+1 -1
services/haring/networking/unbound/unbound.ts
··· 52 52 networksAdvanced: [{ name: defaultNetwork.name, ipv4Address: STATIC_IPS.UNBOUND }], 53 53 }, 54 54 { 55 - dependsOn: [valkeyUnboundService.container], 55 + dependsOn: valkeyUnboundService.container, 56 56 }, 57 57 );