Skip to content

Use release script when deploying with containers#1002

Merged
JulianPasquale merged 1 commit intomainfrom
fix-heroku-release-script
Mar 11, 2025
Merged

Use release script when deploying with containers#1002
JulianPasquale merged 1 commit intomainfrom
fix-heroku-release-script

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
Copy link

Copilot AI left a comment

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.

4 participants