refactor: remove authentication for internal deployment
Verify and deploy production / verify-and-deploy (push) Successful in 2m33s
Verify and deploy production / verify-and-deploy (push) Successful in 2m33s
This commit is contained in:
+1
-4
@@ -10,12 +10,9 @@ const volume = `${service}-data`;
|
||||
const sha = (process.env.GITHUB_SHA || process.env.CI_COMMIT_SHA || "dev").slice(0, 12);
|
||||
const image = `${service}:${sha}`;
|
||||
const port = process.env.DEPLOY_PORT || "3000";
|
||||
const password = process.env.STUDIO_PASSWORD;
|
||||
const username = process.env.STUDIO_USERNAME || "studio";
|
||||
const dockerfile = process.env.DEPLOY_DOCKERFILE || "Dockerfile";
|
||||
const usePrebuiltOutput = dockerfile === "Dockerfile.deploy";
|
||||
|
||||
if (!password) throw new Error("STUDIO_PASSWORD secret is required");
|
||||
if (!/^\d{2,5}$/.test(port) || Number(port) > 65535) throw new Error("DEPLOY_PORT must be a valid TCP port");
|
||||
|
||||
async function removeContainer(name) {
|
||||
@@ -98,7 +95,7 @@ try {
|
||||
next = await docker.createContainer({
|
||||
name: candidate,
|
||||
Image: image,
|
||||
Env: [`STUDIO_USERNAME=${username}`, `STUDIO_PASSWORD=${password}`, "NODE_ENV=production"],
|
||||
Env: ["NODE_ENV=production"],
|
||||
ExposedPorts: { "3000/tcp": {} },
|
||||
HostConfig: {
|
||||
RestartPolicy: { Name: "unless-stopped" },
|
||||
|
||||
Reference in New Issue
Block a user