Frost

repository·main·Indexed 43 days ago

https://github.com/elitan/frost

An open-source alternative to Vercel, Netlify, Railway, Render, and Neon. Frost enables developers to build, deploy, and run containerized applications on their own servers using a Docker-native, Git-push workflow. It features a REST API for project automation, S3-compatible object storage, and a YAML-based template system for defining single-service or multi-service project stacks.

Tokens
18.3K
Snippets
69
Records
122
Agent score
55%

What's inside Frost

  1. Reference other services in templates

    main

    In project templates, services can reference the environment variables of other services using a specific interpolation syntax.

    Database templates automatically provide several built-in reference fields:

    • HOST
    • PORT
    • USERNAME
    • PASSWORD
    • DATABASE
    • DATABASE_URL

    To reference a service named postgres, use the syntax ${postgres.VARIABLE_NAME}.

    DATABASE_URL: ${postgres.DATABASE_URL}
    DB_HOST: ${postgres.HOST}
  2. Understand Frost Template types and directory structure

    main

    Frost templates are community-contributed YAML files used to deploy services. They are organized into three distinct categories based on their scope:

    • Single-Service Templates (databases/): Used for standalone database services (e.g., postgres, mysql, redis).
    • Single-Service Templates (services/): Used for standalone application services (e.g., nginx, httpbin).
    • Project Templates (projects/): Used for complete application stacks that consist of multiple pre-configured services (e.g., plausible, ghost).
    templates/
      databases/     # Single-service database templates
      services/      # Single-service application templates
      projects/      # Multi-service project templates
  3. Understand the Frost Core Model

    main

    Frost organizes resources into several key abstractions:

    • Project: A container for related services that share environment variables and a Docker network. Within a project, you can use a service name as a hostname to communicate between services.
    • Service: The deployable unit, which can be sourced from a repository or a prebuilt Docker image.
    • Object Storage: A single user-facing S3-compatible API endpoint. You manage buckets and access keys directly within Frost.
    • Domain: A custom domain attached to a service, used for either proxying traffic or as a redirect.
    • Deployment: An immutable record of a deployment that includes logs and status information.
  4. Use PR Preview Environments

    main

    When a pull request is opened against a connected repository, Frost automatically generates a preview environment.

    Workflow:

    • Cloning: Services from the production environment are cloned into the preview environment.
    • Deployment: A deployment runs for the service that matches the repository associated with the PR.
    • Feedback: Frost posts a status comment on the PR containing the preview URL and the current deployment status.
    • Cleanup: The preview environment is automatically destroyed when the pull request is closed or merged.
  5. Understand deployment statuses

    main

    A deployment is a record of a service deployment attempt. You can track the progress of a deployment using the following status indicators:

    • pending: The deployment is currently queued.
    • cloning: The system is cloning the git repository.
    • pulling: The system is pulling the Docker image.
    • building: The system is building the Docker image.
    • deploying: The system is starting the container.
    • running: The container is healthy and active.
    • failed: The deployment attempt failed.
  6. Understand the hourly reset behavior and limits

    main

    Demo instances run a frost-demo-reset.service via an hourly timer.

    Safety Gates

    The reset only triggers if:

    1. /etc/frost-demo.env contains DEMO_ENV=demo.
    2. Frost settings.domain matches demo.frost.build.

    Reset Scope

    Kept: Password/login, domain/SSL settings, wildcard/DNS settings, and FROST_DEMO_MODE=true. Cleared: Projects, services, deployments, registries, GitHub installs, OAuth clients/tokens, API keys, and metrics. A single demo-hello project/service is reseeded after reset.

    Demo Mode Restrictions

    To prevent abuse, the following actions are locked in demo mode:

    • Password, setup, domain, SSL, or wildcard changes.
    • GitHub app setup, webhooks, registry, or API key/MCP token changes.
    • OAuth client/token writes.
    • update/apply, auto-updates, and rollbacks.
    • Cleanup settings or manual cleanup.

    Resource Limits

    • Projects: Max 5
    • Envs per project: Max 3
    • Services per env: Max 8
    • Replicas per service: Max 1
    • CPU/Memory: Max 2 CPU / 2g Memory
    • Deployment Rate: Max 10 deploys per service per 10 minutes
    • Login Rate Limit: 30 failed attempts per minute per IP
  7. Understand Frost environment types

    main

    Frost uses environments to run isolated copies of your services within a single project. There are three types of environments:

    • Production: The default environment. It is created automatically for every project and is limited to one per project.
    • Preview: Automatically created when a pull request is opened on a connected GitHub repository. These environments clone your production services and are automatically destroyed when the pull request is closed or merged.
    • Manual: User-defined environments used for staging, testing, or custom workflows. You can create these from the project page and optionally choose to clone services from an existing environment.
  8. How zero-downtime deployments work

    main

    When deploying a service that is already running, Frost uses a zero-downtime deployment strategy to ensure availability. The lifecycle follows these steps:

    1. Parallel Startup: New container(s) start alongside the existing ones.
    2. Health Checks: Frost runs health checks on the new containers.
    3. Traffic Switch: Once the new containers are healthy, traffic is routed to them.
    4. Connection Draining: Old containers remain alive to drain existing connections for the duration of drain_timeout seconds.
    5. Termination (SIGTERM): After draining, old containers receive a SIGTERM signal.
    6. Forceful Shutdown (SIGKILL): If the old containers are still running after shutdown_timeout seconds, a SIGKILL is sent to force them to stop.
  9. Use cross-service references in project templates

    main

    In multi-service project templates, you can reference environment variables from one service in another using the syntax ${service_name.ENV_VAR_NAME}.

    For database services, the following built-in references are available:

    • HOST
    • PORT
    • USERNAME
    • PASSWORD
    • DATABASE
    • DATABASE_URL
    services:
      postgres:
        type: database
        # ... configuration ...
    
      app-service:
        image: my-app:latest
        environment:
          DATABASE_URL: ${postgres.DATABASE_URL}
          DB_HOST: ${postgres.HOST}
          DB_USER: ${postgres.USERNAME}
          DB_PASSWORD: ${postgres.PASSWORD}
  10. Authenticate MCP Agents with Frost

    main

    Frost uses OAuth 2.1 with PKCE for MCP authentication. The process is browser-based, meaning there are no tokens for you to manually copy-paste during setup:

    1. The agent connects to /api/mcp and receives a 401.
    2. The agent discovers the auth server via /.well-known/oauth-protected-resource.
    3. The agent registers as a client via /api/oauth/register.
    4. Your browser opens for you to log in and approve access.
    5. The agent receives and stores an access token locally.

    Token Management:

    • Access tokens expire (default: 30 days).
    • You can view or revoke active tokens in Settings → MCP Tokens.
    • For programmatic or CI/CD access, use the x-frost-token header with an API key obtained from your Settings.