Pulumi code for my server setup
0
fork

Configure Feed

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

Add target directory option

+14 -13
+14 -13
src/index.ts
··· 1 1 import * as pulumi from "@pulumi/pulumi"; 2 2 import * as docker from "@pulumi/docker"; 3 + import { remote } from "@pulumi/command"; 3 4 import { ContainerService } from "./service"; 4 5 import { getEnv } from "./env"; 5 6 6 - const dockerConfMount = (name: string) => ({ 7 - source: `/home/bas/docker/${name}`, 8 - target: "/config", 9 - type: "bind", 10 - }); 7 + const dockerConfMount = (name: string, target?: string) => { 8 + new remote.Command(`mkdir-${name}`, { 9 + connection: { host: "haring.bas.sh", user: "bas" }, 10 + create: `mkdir -p /home/bas/docker/${name}`, 11 + }); 12 + 13 + return { 14 + source: `/home/bas/docker/${name}`, 15 + target: target || "/config", 16 + type: "bind", 17 + }; 18 + }; 11 19 12 20 const dataMount = { 13 21 source: "/home/bas/data", ··· 235 243 const ankiService = await ContainerService.create("anki", { 236 244 image: "ankicommunity/anki-sync-server:latest-develop", 237 245 webPort: 27701, 238 - domain: "anki", 239 246 envs: [ 240 247 "ANKISYNCD_AUTH_DB_PATH=/app/data/auth.db", 241 248 "ANKISYNCD_DATA_ROOT=/app/data/collections", 242 249 "ANKISYNCD_SESSION_DB_PATH=/app/data/session.db", 243 250 ], 244 - mounts: [ 245 - { 246 - source: "/home/bas/docker/anki", 247 - target: "/app/data", 248 - type: "bind", 249 - }, 250 - ], 251 + mounts: [dockerConfMount("anki", "/app/data")], 251 252 }); 252 253 253 254 const sabnzbdService = await ContainerService.create("sabnzbd", {