{
  "manifest_version": "1",
  "slug": "preview-environments",
  "title": "Preview environments",
  "headline": "Preview environments: a live VM for every pull request",
  "description": "Give every GitHub pull request its own exe.dev VM: your app and a seeded Postgres, the link posted on the PR, updated on push, deleted on close.",
  "category": "dev-tools",
  "tags": [
    "preview environments",
    "pull request previews",
    "review apps",
    "deploy previews",
    "ephemeral environments",
    "github actions",
    "exedev",
    "python sdk",
    "staging",
    "playwright"
  ],
  "url": "https://exe.dev/deploy/preview-environments",
  "markdown_url": "https://exe.dev/deploy/preview-environments.md",
  "upstream": {
    "website": "https://pypi.org/project/exedev/",
    "source": "https://github.com/boldsoftware/exe-sdk-python",
    "docs": "https://exe.dev/docs/https-api",
    "license": "MIT (the exedev SDK)"
  },
  "example_vm_name": "acme-notes-base",
  "time": "15 minutes",
  "stack": [
    {
      "name": "Workflow",
      "detail": ".github/workflows/preview.yml on GitHub's runners, with EXE_TOKEN as its only secret"
    },
    {
      "name": "preview.py",
      "detail": "a short Python script on the exedev SDK that creates, updates, comments, and deletes"
    },
    {
      "name": "Base VM",
      "detail": "acme-notes-base, your app, PostgreSQL, and seeded data, refreshed on every push to main",
      "port": 8000,
      "data": "~/app, PostgreSQL's database app"
    },
    {
      "name": "Preview VMs",
      "detail": "acme-notes-pr-7 for pull request 7, a copy of the base, the app as a systemd service",
      "port": 8000,
      "data": "~/app, its own copy of the database"
    }
  ],
  "access": [
    {
      "url": "https://acme-notes-pr-7.exe.xyz/",
      "who": "private",
      "what": "pull request 7's preview, for you, whoever you share it with, and checks holding a VM token"
    },
    {
      "url": "https://acme-notes-base.exe.xyz/",
      "who": "private",
      "what": "the base VM previews are copied from"
    }
  ],
  "delivers": [
    "A VM per pull request, copied from a warm base in seconds, with the PR's commit running on port 8000",
    "One comment on the pull request with the preview's link, edited on every push",
    "A database per preview, seeded from a fixture, migrated on every push",
    "Previews private behind exe.dev login, shared with your team or reviewers",
    "Previews deleted when the pull request closes, and a nightly sweep for the rest"
  ],
  "deployable": false,
  "published": "2026-11-25",
  "updated": "2026-11-25",
  "verified": "2026-11-25",
  "related": [
    "python-sdk",
    "rust-sdk",
    "github-actions",
    "ci",
    "sandbox",
    "postgres"
  ],
  "alternatives": [
    "Vercel preview deployments",
    "Render preview environments",
    "Heroku review apps"
  ],
  "files": [
    "https://exe.dev/deploy/preview-environments/preview-deploy.sh",
    "https://exe.dev/deploy/preview-environments/preview.py",
    "https://exe.dev/deploy/preview-environments/preview.yml",
    "https://exe.dev/deploy/preview-environments/smoke.py"
  ]
}
