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

[FIX] Tweaking Docker setup to enable running shell commands when deployed #101

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

gcaprio
Copy link
Contributor

@gcaprio gcaprio commented Jul 17, 2023

WHY are these changes introduced?

Fixes #100

The default Docker implementation for this template hardcodes the rails server startup within the entrypoint.sh. This disables the ability to run other commands when the container is running. For example, when deployed to Heroku, you cannot open a shell to your container.

WHAT is this pull request doing?

It moves the rails server startup command outside of entrypoint.sh and into the Dockerfile, supporting the existing behavior. However, it also allows you to override the CMD being run so you can execute shell commands as well.

It also adds a sanity check before deleting the existing server.pid in case it doesn't actually exist.

Checklist

Note: once this PR is merged, it becomes a new release for this template.

  • [-] I have added/updated tests for this change
  • [-] I have made changes to the README.md file and other related documentation, if applicable

@gcaprio
Copy link
Contributor Author

gcaprio commented Jul 31, 2023

thanks @Spiritaine !

Copy link
Contributor

@mllemango mllemango left a comment

Choose a reason for hiding this comment

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

Thanks!

@mllemango mllemango merged commit febb3e4 into Shopify:main Aug 18, 2023
4 checks passed
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.

Running Rake Commands w/ Docker Deployment on Heroku
3 participants