feat(deploy): add Codra Deploy foundation#32
Conversation
Abdulmuiz44
commented
Jun 9, 2026
- Adds Codra Deploy foundation as the deployment and runtime layer of the Codra ecosystem.\n- Adds Render-style deployment config model and deploy plan generation.\n- Adds safe validation for web, worker, cron, and static service definitions.\n- Adds examples and documentation.\n- Adds CLI planning surface if compatible with existing CLI.\n- Does not perform real deployments or destructive Docker operations.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4571314b71
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if matches!(service.service_type, DeployServiceType::Web) && service.start_command.is_none() | ||
| { |
There was a problem hiding this comment.
Require non-empty start commands for runnable services
Because this condition only tests is_none() for Web and has no matching Worker branch, codra deploy plan accepts a web service with "startCommand": "" or any worker service with no start command and generates a plan that has no runnable process command. For a deployment/runtime layer those configs cannot be started, so validate startCommand as non-empty for all long-running service types before rendering a successful plan.
Useful? React with 👍 / 👎.
| message: "No health check path configured.".to_string(), | ||
| }); | ||
| } | ||
| if matches!(service.service_type, DeployServiceType::Web) && service.ports.is_empty() { |
There was a problem hiding this comment.
Treat private-only ports as missing public ports
For a web service configured with only private ports, e.g. ports: [{ "internal": 3000, "public": false }], this check suppresses the “No public port configured” warning even though no port is public; generate_plan then still reports expected_port from the first private port. Since the config schema distinguishes public exposure with the public flag, the plan should warn unless at least one port has public: true.
Useful? React with 👍 / 👎.
| pub fn validate_config(config: &DeployConfig) -> ValidationResult { | ||
| let mut errors = Vec::new(); |
There was a problem hiding this comment.
Reject unsupported deploy config versions
DeployConfig requires a version, but validate_config never checks it, so a codra.deploy.json with "version": 0 or a future incompatible schema version still passes validation and gets planned as if it were version 1. Since the examples and docs establish version 1 as the current schema, the validator should fail unsupported versions before generating a deployment plan that may misinterpret the config.
Useful? React with 👍 / 👎.