feat: add deployment script and systemd service#5
Conversation
- Create rollback script for easy restoration of previous deployment - Add rollback recipe to justfile - Update deployment script to backup entire directory (not just binary) - Simplify rollback instructions to use justfile command
Changes Requested
Summary of Changes
Overall Feedback
Please address the requested changes and re-request review. |
- Add sudo to all systemctl and file operations commands - Copy files to /tmp first, then move with sudo to final location - Fixes 'Interactive authentication required' error - Fixes 'Is a directory' scp error when directory doesn't exist
- Clear existing backup directory before copying - Prevents 'cannot overwrite non-directory' error on subsequent deployments
…vice - Copy files to /tmp while service is still running - Stop service only when ready to swap files - Reduces downtime from 10-30s to ~1-2s - Add logs recipe to justfile for easy log viewing
|
Please update the unit file and deployment steps accordingly. @Pertempto |
|
Actionable changes:
This avoids false failures when |
|
Please add these checks before starting SSH/scp operations:
These prevent mid-deploy surprises and make failures easier to diagnose. @Pertempto |
Summary
Changes
Systemd Service (
deploy/aptora-extensions.service)/opt/aptora-extensions/.envDeployment Script (
deploy/deploy.sh)Justfile Integration
deploy HOSTrecipe with dependency onbuild-backendjust deploy <hostname>Security
.env.productionto.gitignoreto prevent committing sensitive credentialsUsage