-
-
Notifications
You must be signed in to change notification settings - Fork 66
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: Change restart policy of worker and cron to always #107
base: master
Are you sure you want to change the base?
Conversation
Because unless-stopped won't restart the container after the process ended, we changed the restart policies for worker and cron to "always" instead of "unless-stopped"
@@ -8,6 +8,9 @@ x-volumes: &default-volume | |||
x-restart-policy: &restart_policy | |||
restart: unless-stopped | |||
|
|||
x-restart-policy-always: &restart_policy_always |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All containers must have the same restart policy. For example, after Docker daemon restarts, database is not started automatically, but worker is require a database
But according to Docker docs: Similar to I tested a cron worker with More simple way to change restart policy is copy docker-compose.yml and change a one line x-restart-policy: &restart_policy
restart: <policy>
|
Because unless-stopped won't restart the container after the process
ended, we changed the restart policies for worker and cron to "always"
instead of "unless-stopped"
Also fix yaml syntax errors in docker-compose-pord.yml