Skip to content

Add --ci Flag to redeploy Command for Restart-Only with Health Check Wait #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yigitkonur opened this issue Apr 6, 2025 · 0 comments

Comments

@yigitkonur
Copy link

Problem

Currently, the redeploy command redeploys the latest deployment of a service, but it lacks a --ci flag (or similar) to optimize it for CI/CD workflows where only a container restart is needed without pulling a new image. In my use case, I update an S3 file in a GitHub Actions workflow and want to restart the container to pick up the new file, then wait until health checks complete to verify if the updated S3 file works correctly or fails. The existing redeploy command pulls the image again, which is unnecessary overhead, and there’s no way to ensure it waits for health checks in a CI-friendly way.

Proposed Solution

Add a --ci flag (or similar, e.g., --restart-only) to the redeploy command that:

  1. Restarts the existing container without pulling a new image (similar to the web UI’s "Restart" action).
  2. Waits until health checks complete before returning, ensuring the CI pipeline can verify the deployment’s success or failure based on the updated S3 file.

Example Usage

railway redeploy --service=my-service --ci
  • Restarts the container.
  • Waits for health checks to pass/fail.
  • Exits with a success/failure code for CI/CD integration.

Why This Matters

This would streamline CI/CD workflows where external resources (like S3 files) are updated, avoiding unnecessary image redeploys and ensuring health check validation, which is critical for confirming functionality without relying on fixed sleep commands.

Current Workaround

Using railway redeploy works but pulls the image again, adding overhead. There’s no CLI equivalent to a simple restart, and no built-in way to wait for health checks explicitly in CI.

Additional Context

Thanks for considering this enhancement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant