api-client/docs/superpowers/specs/2026-05-06-coolify-aio-cleanup-design.md
2026-05-06 09:50:56 +02:00

2.9 KiB

Coolify AIO Cleanup Design

Goal

Prepare this Hoppscotch fork as an internal AIO deployment repository for Coolify. The repository should keep only the web app, backend, admin UI, database migration path, and workspace packages required to build the all-in-one Docker image.

Keep

  • packages/hoppscotch-selfhost-web: main self-hosted web app and webapp server.
  • packages/hoppscotch-backend: NestJS backend, Prisma schema, migrations, and backend Caddy config.
  • packages/hoppscotch-sh-admin: self-host admin dashboard used by AIO.
  • packages/hoppscotch-common: shared frontend UI/runtime code used by the app.
  • packages/hoppscotch-data: shared data models and migrations used by frontend packages and sandbox code.
  • packages/hoppscotch-kernel: runtime abstraction used by the web app/common package.
  • packages/hoppscotch-js-sandbox: script/test sandbox used by the web app.
  • packages/codemirror-lang-graphql: CodeMirror GraphQL language package used by hoppscotch-common.
  • Root Docker/Caddy/runtime files required by prod.Dockerfile.

Remove

  • Desktop-only code: packages/hoppscotch-desktop.
  • Agent-only code: packages/hoppscotch-agent.
  • CLI-only code: packages/hoppscotch-cli.
  • Rust relay source: packages/hoppscotch-relay.
  • Deprecated Docker services that build removed package Dockerfiles.
  • Deployment/config files for platforms outside Coolify AIO: Firebase and Netlify.
  • Upstream community repository documents that do not serve the internal fork.

Docker Deployment Shape

Coolify should use the main docker-compose.yml. The compose file should expose one supported deployment mode:

  • hoppscotch-aio: built from prod.Dockerfile target aio.
  • hoppscotch-db: local PostgreSQL 15 service for deployments that do not use an external database.

The AIO command keeps the existing production behavior:

pnpm exec prisma migrate deploy && node /usr/src/app/aio_run.mjs

This preserves automatic migrations on container start while keeping Coolify configuration small.

Build Strategy

Keep the upstream multi-stage prod.Dockerfile structure for the first cleanup. It is already tied to workspace postinstall scripts, Prisma generation, GraphQL generation, the webapp server Go build, and Caddy. The aggressive cleanup comes from removing packages and narrowing the workspace, not from rewriting the Dockerfile copy/install strategy in the same change.

Add or keep a Docker ignore file that excludes VCS metadata, local caches, dependency folders, build outputs, test artifacts, docs, and removed platform files from the Docker build context.

Validation

  • Verify pnpm-workspace.yaml lists only retained packages.
  • Verify root scripts do not invoke removed packages.
  • Verify docker-compose.yml references only retained services and files.
  • Verify the AIO Docker config is syntactically valid with docker compose config.
  • Run a focused package install/build check if dependencies are available locally.