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

Improving entrypoint.sh to run services in foreground #455

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rafaelstz
Copy link

WHY are these changes introduced?

Running Docker on Heroku or locally with the previous entrypoint.sh we cannot access the container's terminal since it's not running the services in the foreground.

WHAT is this pull request doing?

I'm running php-fpm and nginx in the background, allowing easy access to the container's terminal when using Heroku or the local environment.

In a Docker environment, it's better to avoid using init systems like OpenRC and instead to start the main process of the container (in this case, nginx or php-fpm) directly in the foreground. That's why it's more common to see nginx -g 'daemon off;' or php-fpm as the command to start the container. This is because Docker itself takes over many of the roles of an init system.

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

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.

1 participant