chore: switch production container and docs to bun runtime

This commit is contained in:
Codex
2026-02-18 13:18:02 +00:00
parent e3f9a3574e
commit 0e9e804935
4 changed files with 15 additions and 9 deletions

View File

@@ -6,15 +6,17 @@ const fs = require("node:fs");
test("Dockerfile contains production container essentials", () => {
const dockerfile = fs.readFileSync("Dockerfile", "utf8");
assert.match(dockerfile, /FROM node:22-alpine/);
assert.match(dockerfile, /FROM oven\/bun:1\.3\.5-alpine/);
assert.match(dockerfile, /EXPOSE 3000/);
assert.match(dockerfile, /STATE_FILE_PATH=\/data\/state\.json/);
assert.match(dockerfile, /bun install --frozen-lockfile --production/);
assert.match(dockerfile, /HEALTHCHECK/);
assert.match(dockerfile, /CMD \["node", "src\/server\.js"\]/);
assert.match(dockerfile, /CMD \["bun", "src\/server\.js"\]/);
});
test("env example includes required webhook and credit settings", () => {
const envFile = fs.readFileSync(".env.example", "utf8");
assert.match(envFile, /LOG_LEVEL=/);
assert.match(envFile, /X_WEBHOOK_SECRET=/);
assert.match(envFile, /POLAR_WEBHOOK_SECRET=/);
assert.match(envFile, /INCLUDED_CHARS=/);