mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 21:03:46 +00:00
Add Railway Caddy frontend images
This commit is contained in:
parent
9960fba40e
commit
d7d13e330a
6 changed files with 107 additions and 4 deletions
16
foundry/docker/frontend-caddy-entrypoint.sh
Normal file
16
foundry/docker/frontend-caddy-entrypoint.sh
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
escape_js() {
|
||||
printf '%s' "${1:-}" | sed 's/\\/\\\\/g; s/"/\\"/g'
|
||||
}
|
||||
|
||||
cat > /srv/__foundry_runtime_config.js <<EOF
|
||||
window.__FOUNDRY_RUNTIME_CONFIG__ = {
|
||||
backendEndpoint: "$(escape_js "${VITE_HF_BACKEND_ENDPOINT:-}")",
|
||||
defaultWorkspaceId: "$(escape_js "${VITE_HF_WORKSPACE:-}")",
|
||||
frontendClientMode: "$(escape_js "${FOUNDRY_FRONTEND_CLIENT_MODE:-remote}")"
|
||||
};
|
||||
EOF
|
||||
|
||||
exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
|
||||
Loading…
Add table
Add a link
Reference in a new issue