From 0175ea028a9617cc6a70e1a5b1b64442d65ed843 Mon Sep 17 00:00:00 2001 From: hwhung Date: Wed, 6 May 2026 22:32:56 +0800 Subject: [PATCH] Add Replit publish artifact config --- .replit-artifact/artifact.toml | 30 +++++++++++++++++++++++++ readme.md | 4 ++++ setup.md | 40 +++++++++++++++++++++++++++++++++- 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 .replit-artifact/artifact.toml diff --git a/.replit-artifact/artifact.toml b/.replit-artifact/artifact.toml new file mode 100644 index 0000000..2086dc8 --- /dev/null +++ b/.replit-artifact/artifact.toml @@ -0,0 +1,30 @@ +kind = "api" +previewPath = "/" +title = "Random Proxy Simple" +version = "1.0.0" +id = "random-proxy-simple" + +[[services]] +localPort = 3000 +name = "Random Proxy Simple" +paths = ["/", "/api", "/v1"] + +[services.development] +run = "cd random-proxy-simple && pnpm dev -- --host 0.0.0.0 --port 3000 --proxy-api-key DEPLOYMENT_GENERATED_PROXY_TOKEN --openai-base-url \"$AI_INTEGRATIONS_OPENAI_BASE_URL\" --openai-api-key \"$AI_INTEGRATIONS_OPENAI_API_KEY\" --anthropic-base-url \"$AI_INTEGRATIONS_ANTHROPIC_BASE_URL\" --anthropic-api-key \"$AI_INTEGRATIONS_ANTHROPIC_API_KEY\"" + +[services.production.build] +args = ["sh", "-c", "cd random-proxy-simple && pnpm install --ignore-workspace && pnpm run build"] + +[services.production.build.env] +NODE_ENV = "production" + +[services.production.run] +args = ["sh", "-c", "cd random-proxy-simple && node --enable-source-maps dist/index.mjs"] + +[services.production.run.env] +PORT = "8080" +PROXY_API_KEY = "DEPLOYMENT_GENERATED_PROXY_TOKEN" +NODE_ENV = "production" + +[services.production.health.startup] +path = "/api/healthz" diff --git a/readme.md b/readme.md index 25d5ada..67bea53 100644 --- a/readme.md +++ b/readme.md @@ -18,6 +18,10 @@ The `.replit` `onBoot` command installs dependencies with: pnpm install --ignore-workspace ``` +The repo also includes `.replit-artifact/artifact.toml` so Replit Publish has an explicit +production build, run command, and `/api/healthz` startup health check when this repo is cloned +into `./random-proxy-simple`. + ## Install Run from this repository root: diff --git a/setup.md b/setup.md index 6ebc47f..79caedd 100644 --- a/setup.md +++ b/setup.md @@ -26,6 +26,9 @@ Do not: - run verification commands - run chat-completion smoke tests unless asked +Publishability requirement: register the cloned app as a deployable artifact in-place. Do not move +the repo into artifacts/. + Steps: 1. Clone into ./random-proxy-simple. @@ -44,9 +47,44 @@ skills: 5. Start/restart that workflow once. -6. Do not run health, dashboard, model-list, or chat-completion verification commands. +6. Confirm ./random-proxy-simple/.replit-artifact/artifact.toml exists so Replit Publish has a +production run command. If it is missing or changed, restore this exact file content: + + kind = "api" + previewPath = "/" + title = "Random Proxy Simple" + version = "1.0.0" + id = "random-proxy-simple" + + [[services]] + localPort = 3000 + name = "Random Proxy Simple" + paths = ["/", "/api", "/v1"] + + [services.development] + run = "cd random-proxy-simple && pnpm dev -- --host 0.0.0.0 --port 3000 --proxy-api-key DEPLOYMENT_GENERATED_PROXY_TOKEN --openai-base-url \"$AI_INTEGRATIONS_OPENAI_BASE_URL\" --openai-api-key \"$AI_INTEGRATIONS_OPENAI_API_KEY\" --anthropic-base-url \"$AI_INTEGRATIONS_ANTHROPIC_BASE_URL\" --anthropic-api-key \"$AI_INTEGRATIONS_ANTHROPIC_API_KEY\"" + + [services.production.build] + args = ["sh", "-c", "cd random-proxy-simple && pnpm install --ignore-workspace && pnpm run build"] + + [services.production.build.env] + NODE_ENV = "production" + + [services.production.run] + args = ["sh", "-c", "cd random-proxy-simple && node --enable-source-maps dist/index.mjs"] + + [services.production.run.env] + PORT = "8080" + PROXY_API_KEY = "DEPLOYMENT_GENERATED_PROXY_TOKEN" + NODE_ENV = "production" + + [services.production.health.startup] + path = "/api/healthz" + +7. Do not run health, dashboard, model-list, or chat-completion verification commands. Report only: - local URL - whether setupReplitAIIntegrations wired OpenAI and Anthropic +- whether the in-place deployable artifact has a production run command - that no verification commands were run