chore: switch production container and docs to bun runtime
This commit is contained in:
@@ -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=/);
|
||||
|
||||
Reference in New Issue
Block a user