chore: add coolify-ready docker packaging and deployment env template
This commit is contained in:
22
test/deployment.test.js
Normal file
22
test/deployment.test.js
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
const test = require("node:test");
|
||||
const assert = require("node:assert/strict");
|
||||
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, /EXPOSE 3000/);
|
||||
assert.match(dockerfile, /STATE_FILE_PATH=\/data\/state\.json/);
|
||||
assert.match(dockerfile, /HEALTHCHECK/);
|
||||
assert.match(dockerfile, /CMD \["node", "src\/server\.js"\]/);
|
||||
});
|
||||
|
||||
test("env example includes required webhook and credit settings", () => {
|
||||
const envFile = fs.readFileSync(".env.example", "utf8");
|
||||
assert.match(envFile, /X_WEBHOOK_SECRET=/);
|
||||
assert.match(envFile, /POLAR_WEBHOOK_SECRET=/);
|
||||
assert.match(envFile, /INCLUDED_CHARS=/);
|
||||
assert.match(envFile, /WEBHOOK_RPM=/);
|
||||
});
|
||||
Reference in New Issue
Block a user