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

Allow overriding container restart policy #310

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

markmetcalfe
Copy link
Member

@markmetcalfe markmetcalfe commented Dec 16, 2024

This adds a new .env option of RESTART_POLICY which allows overriding whether a container will restart automatically after rebooting or crashing. This is handy as it means you can make it so that you don't need to tup your containers everytime you start your computer. This is a backwards compatible change, where it will default to the status quo.

# Set the restart policy for containers
# If set to 'no', containers will only start when you manually start them via `tup`
# If set to 'unless-stopped', containers will restart upon rebooting/crashing
RESTART_POLICY=unless-stopped

@markmetcalfe markmetcalfe force-pushed the add-restart-unless-stopped branch from a55637f to a9d6674 Compare December 16, 2024 21:18
@markmetcalfe markmetcalfe changed the title Add restart unless stopped to container definitions Allow overriding container restart policy Dec 16, 2024
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