Deploying staging from a folder checked out on main replaced the
production container, because the environment was inferred from the
current branch and both environments shared the container name
"apskel-pos".
- Environment is now a required argument (staging|production)
- Refuse to deploy when the branch doesn't match, HEAD is detached,
or the tree is dirty
- Container name per environment; the legacy "apskel-pos" container
is only removed by production deploys
- Abort if the port is held by another environment's container
- Confirmation prompt for production (--yes to skip)
- Fast-forward-only pull from origin/<branch>
- Keep the previous image and roll back automatically when the new
container is not healthy; --rollback for manual rollback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>