Add Replit publish artifact config

This commit is contained in:
hwhung
2026-05-06 22:32:56 +08:00
parent 591e716063
commit 0175ea028a
3 changed files with 73 additions and 1 deletions
+30
View File
@@ -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"
+4
View File
@@ -18,6 +18,10 @@ The `.replit` `onBoot` command installs dependencies with:
pnpm install --ignore-workspace 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 ## Install
Run from this repository root: Run from this repository root:
+39 -1
View File
@@ -26,6 +26,9 @@ Do not:
- run verification commands - run verification commands
- run chat-completion smoke tests unless asked - 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: Steps:
1. Clone into ./random-proxy-simple. 1. Clone into ./random-proxy-simple.
@@ -44,9 +47,44 @@ skills:
5. Start/restart that workflow once. 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: Report only:
- local URL - local URL
- whether setupReplitAIIntegrations wired OpenAI and Anthropic - whether setupReplitAIIntegrations wired OpenAI and Anthropic
- whether the in-place deployable artifact has a production run command
- that no verification commands were run - that no verification commands were run