AWS CDK if it was awesome
Find a file
Hamcha 5132597c42
Some checks failed
Build and push Docker image / build (push) Failing after 1s
ci: runner name fix
2024-04-07 23:16:18 +02:00
.forgejo/workflows ci: runner name fix 2024-04-07 23:16:18 +02:00
example feat: more cdkey 2024-04-07 18:49:04 +02:00
src ci: add action 2024-04-07 23:15:31 +02:00
.gitignore feat: more scaffolding 2024-04-07 17:56:33 +02:00
jsr.json ci: add action 2024-04-07 23:15:31 +02:00
LICENSE.txt ci: add action 2024-04-07 23:15:31 +02:00
mod.ts feat: more cdkey 2024-04-07 18:49:04 +02:00
README.md docs: add docs! 2024-04-07 22:45:51 +02:00

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 = this.addService("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.