Loading…
Loading documentation...
Build and run a public GitHub repository commit on an isolated host with pinned environment variables, health checks and redeploy hooks.
Commands checked on 2026-11-12 with Servers Are Up Platform v1.7, Docker Engine 27, Git 2.43.
Your own application repository from GitHub will build at an exact, immutable commit SHA on an isolated Servers Are Up host, run with validated health checks and injected runtime secrets, and redeploy cleanly whenever you push a reviewed release from GitHub Actions or the v1 API.
Dockerfile at the repository root (or a specified subdirectory) that listens on a configurable TCP PORT (for example 3000 or 8080) and exposes an HTTP health route such as /healthz or /api/health./dashboard, plus an optional scoped Personal Access Token created on Account settings > API keys (/account/api-keys) if you want automated CI/CD redeploys from GitHub Actions.app-custom-github via GET /api/v1/catalog or Home > Create a resource (/dashboard/store).Ensure your repository builds reproducibly from a lockfile and binds to 0.0.0.0 inside the container so the host reverse proxy can reach it:
FROM node:24-bookworm-slim AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:24-bookworm-slim AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3000
USER node
COPY --from=build --chown=node:node /app ./
EXPOSE 3000
HEALTHCHECK --interval=15s --timeout=3s --start-period=15s \
CMD node -e "fetch('http://127.0.0.1:3000/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
CMD ["node", "dist/server.js"]
Commit and push your Dockerfile, then record the full 40-character commit SHA you want to deploy (git rev-parse HEAD). Pinning an exact commit SHA guarantees the host builds the exact code you reviewed.
Open Home > Create a resource (/dashboard/store?src=dashboard&product=app-custom-github) or inspect existing app records at /dashboard/custom-apps:
https://github.com/your-org/your-service) and the pinned branch or 40-character commit SHA.3000) and health-check path (/healthz).NODE_ENV=production, LOG_LEVEL=info) and reference sensitive credentials from Access > Key vault & KMS (/dashboard/key-vault) so secrets never sit in repository files.app-custom-github is marked Available in the catalog, or deploy the identical container workflow onto a Linux VPS (/linux) or Managed Docker host (/containers) at any time.To redeploy automatically whenever main passes tests, store a least-privilege Servers Are Up API token (instances:exec + instances:read) in your GitHub repository under Settings > Secrets and variables > Actions as SAU_API_TOKEN, alongside SAU_INSTANCE_ID.
Add .github/workflows/deploy-sau.yml to trigger an authenticated pull-and-restart over the audited /api/v1/instances/{id}/exec endpoint (no raw SSH private key needed in GitHub!):
name: Deploy to Servers Are Up
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run build and tests
run: |
npm ci
npm test
- name: Roll out pinned commit via SAU v1 API
env:
SAU_API_TOKEN: ${{ secrets.SAU_API_TOKEN }}
SAU_INSTANCE_ID: ${{ secrets.SAU_INSTANCE_ID }}
GIT_SHA: ${{ github.sha }}
run: |
curl -fsSL -X POST "https://serversareup.com/api/v1/instances/${SAU_INSTANCE_ID}/exec" \
-H "Authorization: Bearer ${SAU_API_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"command\":\"/usr/local/bin/redeploy-app.sh ${GIT_SHA}\",\"timeoutMs\":120000}"
Open Network (/dashboard/network) to verify port 443 forwards to your host's TLS reverse proxy, and stream build or runtime container logs from Automation > Console & scripts (/dashboard/ide) or via the sau CLI:
sau ssh <instance-id> -- docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
Query your live health endpoint and confirm it reports HTTP 200 and the exact deployed commit SHA:
curl -fsSL https://api.example.com/healthz | jq .
Check Operations > Activity log (/dashboard/activity) to confirm every automated deployment command is recorded with the caller token prefix, timestamp, and exit status.
127.0.0.1 inside the Docker container instead of 0.0.0.0, preventing Docker port publishing from reaching the process. Bind 0.0.0.0 inside the container while binding 127.0.0.1:3000:3000 on the host side behind Caddy.npm ci fails inside the Docker build with missing lockfile or engine mismatch. Commit package-lock.json and match the FROM node:24-... base image to your engines.node constraint in package.json.403 Forbidden. Confirm the Personal Access Token in SAU_API_TOKEN carries instances:exec scope and that no ReadOnly management lock is active on the target server in /dashboard/resource-manager.@sha256:...) from Compute > Container registry (/dashboard/container-registry) rather than mutable latest tags./usr/local/bin/redeploy-app.sh <sha>) and validate /healthz before stopping the previous container so a broken release never causes downtime./account/api-keys).Every Servers Are Up virtual machine and container includes an integrated HTML5 browser-based SSH, RDP, and VNC console in your dashboard, default-off inbound firewall rules with per-IP allow-lists, and full programmatic control via REST API v1 and Model Context Protocol (MCP). Explore our Virtual Datacenter Plans or reach out to Servers Are Up Support.