Skip to main content

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

This package works with Bun, DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Browsers
JSR Score
76%
Published
2 months ago (0.1.6)
class ComposeStack

ComposeStack is a collection of services, networks, and volumes. Every stack gets turned into a compose file at the end of the execution. To create a stack, define a new class that extends Stack, then instantiate the class with the name of the stack.

Example:

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

class ExampleStack extends Stack {
  constructor(name: string) {
    super(name);

    const redis = this.addService("redis", {
      image: "registry.hub.docker.com/library/redis:6.2-alpine",
      restart: "unless-stopped",
    });
  }
}

const stack = new ExampleStack("example");

Constructors

new
ComposeStack(name: string)

Properties

private
networks: Record<string, Network>
private
services: Record<string, Service>
private
volumes: Record<string, Volume>

Methods

Add Package

deno add @staxman/containerlib

Import symbol

import { ComposeStack } from "@staxman/containerlib";

Add Package

npx jsr add @staxman/containerlib

Import symbol

import { ComposeStack } from "@staxman/containerlib";

Add Package

yarn dlx jsr add @staxman/containerlib

Import symbol

import { ComposeStack } from "@staxman/containerlib";

Add Package

pnpm dlx jsr add @staxman/containerlib

Import symbol

import { ComposeStack } from "@staxman/containerlib";

Add Package

bunx jsr add @staxman/containerlib

Import symbol

import { ComposeStack } from "@staxman/containerlib";