Skip to content

A PostgreSQL service can't be declared without an application Cloudfall deploys #81

Open

Description

@shipmill-romamo

Found while writing a "start with one PostgreSQL" guide for the site.

What happens: a project that declares only a server and a PostgreSQL Service does not validate:

  • spec.postgresql.databases[].application is required (schema_validation_failed)
  • the referenced Application must exist (resource_reference_missing)
  • an Application needs at least one component (spec.components: minItems: 1), and a component needs a repository, runtime, deployment, systemd service and health check

So a database can only move to a Cloudfall server together with an app Cloudfall builds and deploys. A team whose app stays on Vercel, Fly or their own servers and only wants the database off Neon (or another managed PostgreSQL) cannot use Cloudfall for it, and the Neon guide's Step 1 references application: app without saying it has to be declared and deployed.

Expected: a database can be declared on its own, owned by a role Cloudfall creates, reachable by an app that runs elsewhere, with the same backups, restore drill and data copy receipt.

Where it shows: the site's "Move off Neon" call to action, and docs/neon-migration-guide.md Step 1 and Step 5 ("for an app elsewhere, route it the same way as any other declared service").

Activity

  1. shipmill-romamo commented on Oct 16, 2026

    @shipmill-romamo
    ContributorAuthor

    Triage: postponed to after 0.7.0. Confirmed on main (3c2d06c): config/schemas/v1/service.schema.json requires spec.postgresql.databases[].application, and config/schemas/v1/application.schema.json requires at least one component, so a database can't be declared without an app Cloudfall deploys. Making it possible is a new capability with a new contract (a database with no application, a role owner, access from outside the server), and 0.7.0 is in release candidates, which take bug fixes and broken promises only. The broken promise is already handled: #83 stopped the Neon guide and the site from offering a PostgreSQL on its own.

    The plan:

    • Make databases[].application optional in the PostgreSQL Service schema, with an explicit owner role Cloudfall creates when no application is named
    • Declare how an outside app reaches it: a listen address plus an allowed-source list (or a tunnel), never open to the internet by default
    • Keep backups, the restore drill and the data copy receipt the same for a standalone database, since they key on the database, not the application
    • Restore the "for an app elsewhere" path in docs/neon-migration-guide.md once it validates and passes a proving run

    This needs a spec with acceptance criteria before any code. It comes back when the next stable release is out, or sooner if the maintainer promotes it to a feature.

  2. added
    postponedTriage decided not now; revisited after the next stable release
    on Oct 16, 2026
  3. shipmill-romamo commented on Oct 20, 2026

    @shipmill-romamo
    ContributorAuthor

    Triage: feature, back after the 0.7.0 stable release (REVISIT).

    Still true on main (348ed73): service.schema.json requires spec.postgresql.databases[].application. 0.7.0 is out, so the release-candidate bar that postponed this no longer applies, and the change is additive: configs that name an application keep working. The plan in the postponement stands (an optional application, an explicit owner role, a declared way in for an outside app that is closed by default, the same backups, drill and data copy receipt), and it goes into a spec with acceptance criteria before any code.

    Written alongside #82's spec, since both are about moving a managed PostgreSQL onto a Cloudfall server.

    The spec PR is being written now (docs/specs/006-standalone-postgresql.md); I'll put its link and the hold line here. Merging it is the approval.

  4. removed
    postponedTriage decided not now; revisited after the next stable release
    on Oct 20, 2026
  5. shipmill-romamo commented on Oct 20, 2026

    @shipmill-romamo
    ContributorAuthor

    The spec is in #101 (docs/specs/006-standalone-postgresql.md). Choices to check in review: the owner's password comes from a sops reference decrypted on the controller, which adds --secrets-dir to every path that runs services.yml; remote access is TLS-only with Debian's self-signed certificate (sslmode=require, no identity check) and covers only owner databases; validation refuses remote access on a server type with no firewall. Backups, the drill and the data copy receipt key on the database name, so they don't change.

    On hold: the build waits on #101, the spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions