Use root Replit deployment config
This commit is contained in:
@@ -2,5 +2,5 @@ run = "pnpm dev"
|
|||||||
onBoot = "pnpm install --ignore-workspace"
|
onBoot = "pnpm install --ignore-workspace"
|
||||||
|
|
||||||
[deployment]
|
[deployment]
|
||||||
build = "pnpm install --ignore-workspace && pnpm run build"
|
build = ["sh", "-c", "pnpm install --ignore-workspace && pnpm build"]
|
||||||
run = "pnpm start"
|
run = ["sh", "-c", "PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} NODE_ENV=production node --enable-source-maps dist/index.mjs"]
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
kind = "api"
|
|
||||||
previewPath = "/"
|
|
||||||
title = "Random Proxy Simple"
|
|
||||||
version = "1.0.0"
|
|
||||||
id = "random-proxy-simple"
|
|
||||||
|
|
||||||
[[services]]
|
|
||||||
localPort = 3000
|
|
||||||
name = "Random Proxy Simple"
|
|
||||||
paths = ["/"]
|
|
||||||
|
|
||||||
[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 build"]
|
|
||||||
|
|
||||||
[services.production.build.env]
|
|
||||||
NODE_ENV = "production"
|
|
||||||
|
|
||||||
[services.production.run]
|
|
||||||
args = ["node", "--enable-source-maps", "random-proxy-simple/dist/index.mjs"]
|
|
||||||
|
|
||||||
[services.production.run.env]
|
|
||||||
PORT = "3000"
|
|
||||||
PROXY_API_KEY = "DEPLOYMENT_GENERATED_PROXY_TOKEN"
|
|
||||||
NODE_ENV = "production"
|
|
||||||
|
|
||||||
[services.production.health.startup]
|
|
||||||
path = "/api/healthz"
|
|
||||||
@@ -18,9 +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
|
For publishing from a workspace that clones this repo into `./random-proxy-simple`, configure the
|
||||||
production build, run command on port `3000`, `paths = ["/"]`, and `/api/healthz` startup health
|
workspace root `.replit` `[deployment]` block to build and run `random-proxy-simple` directly.
|
||||||
check when this repo is cloned into `./random-proxy-simple`.
|
Keep `PORT`, `PROXY_API_KEY`, and `NODE_ENV` in the production `run` command. Do not use artifact
|
||||||
|
production deployment for this proxy.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +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
|
Publishability requirement: do not configure production deployment through the artifact system.
|
||||||
the repo into artifacts/.
|
Configure the workspace root .replit [deployment] section to build and run the cloned proxy
|
||||||
|
directly.
|
||||||
|
|
||||||
Steps:
|
Steps:
|
||||||
|
|
||||||
@@ -47,49 +48,19 @@ skills:
|
|||||||
|
|
||||||
5. Start/restart that workflow once.
|
5. Start/restart that workflow once.
|
||||||
|
|
||||||
6. Confirm ./random-proxy-simple/.replit-artifact/artifact.toml exists so Replit Publish has a
|
6. Configure the workspace root .replit [deployment] section exactly like this:
|
||||||
production run command. If it is missing or changed, restore this exact file content:
|
|
||||||
|
|
||||||
kind = "api"
|
[deployment]
|
||||||
previewPath = "/"
|
build = ["sh", "-c", "cd random-proxy-simple && pnpm install --ignore-workspace && pnpm build"]
|
||||||
title = "Random Proxy Simple"
|
run = ["sh", "-c", "cd random-proxy-simple && PORT=3000 PROXY_API_KEY=DEPLOYMENT_GENERATED_PROXY_TOKEN NODE_ENV=production node --enable-source-maps dist/index.mjs"]
|
||||||
version = "1.0.0"
|
|
||||||
id = "random-proxy-simple"
|
|
||||||
|
|
||||||
[[services]]
|
7. If artifacts/mockup-sandbox exists in the Replit workspace, leave it as-is. Do not create,
|
||||||
localPort = 3000
|
move, or configure this proxy repo as a mockup-sandbox artifact.
|
||||||
name = "Random Proxy Simple"
|
|
||||||
paths = ["/"]
|
|
||||||
|
|
||||||
[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 build"]
|
|
||||||
|
|
||||||
[services.production.build.env]
|
|
||||||
NODE_ENV = "production"
|
|
||||||
|
|
||||||
[services.production.run]
|
|
||||||
args = ["node", "--enable-source-maps", "random-proxy-simple/dist/index.mjs"]
|
|
||||||
|
|
||||||
[services.production.run.env]
|
|
||||||
PORT = "3000"
|
|
||||||
PROXY_API_KEY = "DEPLOYMENT_GENERATED_PROXY_TOKEN"
|
|
||||||
NODE_ENV = "production"
|
|
||||||
|
|
||||||
[services.production.health.startup]
|
|
||||||
path = "/api/healthz"
|
|
||||||
|
|
||||||
7. If artifacts/mockup-sandbox/.replit-artifact/artifact.toml already exists in the Replit
|
|
||||||
workspace, keep it deployable as a static Vite artifact by using production publicDir
|
|
||||||
"artifacts/mockup-sandbox/dist" and static serving. Do not create or move this proxy repo into
|
|
||||||
artifacts/mockup-sandbox.
|
|
||||||
|
|
||||||
8. Do not run health, dashboard, model-list, or chat-completion verification commands.
|
8. 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
|
- whether the workspace root .replit [deployment] build/run commands were configured
|
||||||
- that no verification commands were run
|
- that no verification commands were run
|
||||||
|
|||||||
Reference in New Issue
Block a user