Add `nx add koyeb` to prepare a Koyeb deployment

Open
#684 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
54/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, python
Domain
cloud, devtools

Research direction

Start by reading the existing nx add vercel implementation (issue #671) and its tests to follow the file-writing, conflict, and idempotency behavior. Identify the add-command registration and docs index files; the issue names docs/README.md and llms.txt as required updates. Done means the Koyeb command, generated Docker files, printed deployment guidance, tests, and docs meet the listed acceptance criteria.

Written by the indexing model from the issue text.

Description

enhancement

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.
Dominant language
Python
Stars
11
Forks
6
Avg merge
2h 14m
Merged PRs (30d)
265

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NexyPy/nexy

All issues in NexyPy/nexy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.