Skip to content
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

Use release script when deploying with containers #1002

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

JulianPasquale
Copy link
Contributor

Description:

When using the heroku.yml to deploy apps with the container stack on Heroku, the release script is not being executed. This PR fixes the issue by adding the script into the heroku.yml file.

Note: Migrations are executed as part of the docker-entrypoint script, so we don't need to run them during the release phase (just like Rails does in this template)

bundle exec rails db:migrate
bundle exec rails feature_flags:initialize
echo "Running release script" &&
bundle exec rails feature_flags:initialize
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the db:migrate command be here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are running the migrations in the entrypoint script. Rails does the same here.

@JulianPasquale JulianPasquale requested a review from a team March 11, 2025 14:54
@santib santib requested a review from Copilot March 11, 2025 14:57

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the issue where the release script was not executed during container-based deployments on Heroku. It adds a "release" section in the heroku.yml file to ensure that the custom release script is run during deployment.

  • Adds a new release section with the appropriate script call.
  • Ensures that the web image is used for the release phase.
Comments suppressed due to low confidence (1)

heroku.yml:17

  • Ensure that './bin/release.sh' exists and is executable in the repository to prevent deployment failures.
- ./bin/release.sh
@JulianPasquale JulianPasquale merged commit 68e72c8 into main Mar 11, 2025
7 checks passed
@JulianPasquale JulianPasquale deleted the fix-heroku-release-script branch March 11, 2025 16:15
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

Successfully merging this pull request may close these issues.

3 participants