Skip to main content

AWS CDK-ish API for your home server deployments using staxman.

This package works with Deno, BunIt is unknown whether this package works with Cloudflare Workers, Node.js, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score
76%
Published
a year ago (0.1.6)

containerlib

AWS CDK but for normal people. Don't worry about scaling and AWS bills, just rent a VPS and run my randomly-named services on it! I'm no Jia Tan but a man can dream.

Also this is only going to be tested with Deno. You deserve better than node.

Usage

Use with staxman (WIP).

Usage example (v0):

import { Stack } from "../mod.ts";

interface RedisStackOptions {
  stackName?: string;
  redisVersion?: string;
}

export class RedisStack extends Stack {
  constructor(props: ImmichStackOptions) {
    super(props.stackName ?? "immich");

    const redis = new Service(this, "redis", {
      image: `registry.hub.docker.com/library/redis:${props.redisVersion ?? "alpine"}`,
      restart: "unless-stopped"
    });
  }
}

const stack = new RedisStack({ redisVersion: "6.2-alpine" });

For a more in-depth example, see the example stacks in example/.

World domination plan

Current status: v0 - Annoyingly, this already kinda works!

v1: docker-compose

Initially, containerlib will return docker-compose.yml files. This allows quick implementation and moving from existing Portainer setups to staxman.

v2: assume direct control

Post-MVP, containerlib will return an intermediary state representation (akin to Kubernetes manifests) that serverman can use to control OCI containers via docker API. This is basically integrating the docker-compose functionality directly within serverman.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@staxman/containerlib

Import symbol

import * as containerlib from "@staxman/containerlib";
or

Import directly with a jsr specifier

import * as containerlib from "jsr:@staxman/containerlib";

Add Package

pnpm i jsr:@staxman/containerlib
or (using pnpm 10.8 or older)
pnpm dlx jsr add @staxman/containerlib

Import symbol

import * as containerlib from "@staxman/containerlib";

Add Package

yarn add jsr:@staxman/containerlib
or (using Yarn 4.8 or older)
yarn dlx jsr add @staxman/containerlib

Import symbol

import * as containerlib from "@staxman/containerlib";

Add Package

npx jsr add @staxman/containerlib

Import symbol

import * as containerlib from "@staxman/containerlib";

Add Package

bunx jsr add @staxman/containerlib

Import symbol

import * as containerlib from "@staxman/containerlib";