Skip to content

Add nx add koyeb to prepare a Koyeb deployment #684

Backlog

Description

@Espoir-Loem

Problem

Deploying a Nexy app to Koyeb needs a few exact settings: a Dockerfile build, port 8000 exposed, route /:8000, PORT=8000, and a run command that binds to 0.0.0.0. A developer has to work these out from platform docs and applies them by hand in the dashboard or CLI.

Proposed solution

Add nx add koyeb (also available as nexy add koyeb) that prepares an existing Nexy project:

  • Write a Dockerfile and .dockerignore with the verified two-stage build: Node plus uv to run nx build, Python to run nx start --host 0.0.0.0 --port 8000.
  • Print the verified CLI command, with placeholders for the app and service names: koyeb deploy . MY_APP/MY_SERVICE --archive-builder docker --ports 8000:http --routes /:8000 --env PORT=8000 --env NEXY_ACTION_SECRET=....
  • Document the equivalent dashboard settings: Dockerfile builder, exposed port 8000, route /:8000, PORT=8000, and the secret for the action key.
  • Document the verified buildpack alternative: build command uv sync --frozen && uv run nx build, run command nx start --host 0.0.0.0 --port 8000.
  • Print every file changed, skip files that already have the wanted content, and leave the project unchanged on a second run, like nx add vercel.

Acceptance criteria:

  • Running the command twice produces no further changes and never overwrites a file the developer owns.
  • The generated Dockerfile builds and serves the app locally on port 8000 before deployment.
  • Tests cover the generated bytes, the printed command, conflict handling and idempotency.
  • A docs page explains the Dockerfile deployment, the buildpack alternative, secrets and health checks, and is listed in docs/README.md and llms.txt.

Alternative solutions

Keep only the generic Docker instructions. That avoids a platform command but leaves the port, route, env and builder choices to each developer, where a mistake is easy to make.

Additional context

The deployment steps were verified against the Koyeb documentation for FastAPI and for project directory deployment: https://www.koyeb.com/docs/deploy/fastapi and https://www.koyeb.com/docs/build-and-deploy/deploy-project-directory. Koyeb has no declarative service file for this flow; the CLI command and the Dockerfile are the stable artifacts. The command should follow the file writing behavior of nx add vercel (issue #671): data describing the generated files, no platform dependency added to the framework core, and no overwrite of a file the developer owns.

Validation

  • I have searched existing issues and this is not a duplicate.
  • I would be willing to help implement this feature.

Activity

  1. added
    enhancement
    on Nov 26, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions