services
Static Site
Deploy static websites, SPAs, and documentation sites.
A static site serves pre-built HTML, CSS, and JavaScript files. Use this for marketing pages, documentation, single-page apps (React, Vue, Svelte), and any site that does not need a backend server.
When to Use#
- React, Vue, or Svelte single-page applications
- Static site generators (Hugo, Astro, Gatsby, VitePress)
- Landing pages and marketing sites
- Documentation sites
Configuration#
runix.yaml
yaml
services:
- name: docs
type: static-site
repo: https://github.com/alice/docs-site
build_command: pnpm build
start_command: pnpm startAvailable Fields#
| Field | Default | Description |
|---|---|---|
| `repo` | — | GitHub repository URL (required) |
| `branch` | `main` | Git branch to deploy |
| `build_command` | Auto-detected | Command to build the site (e.g., `npm run build`) |
| `start_command` | Auto-detected | Command to serve the site |
| `env` | None | Environment variables for the build |
How It Works#
- 1.Runix clones your repo and runs the build command
- 2.The build output is served via a lightweight HTTP server inside the container
- 3.A public URL is assigned with automatic TLS
Static sites are lightweight and work well on Starter instances. Save your budget for compute-heavy services.
Example: React App#
runix.yaml
yaml
name: my-frontend
services:
- name: app
type: static-site
repo: https://github.com/alice/react-app
build_command: npm run build
env:
VITE_API_URL: "https://api-a1b2.runixcloud.dev"