Closed salex closed 3 years ago
Well it took a few days for it to sink in.
Normal cap deploy does not require sudo. Triggering a restart/reload with systemd does. The staging server had the deploy user in the sudoers , production did not..
Think that needs to be pointing out somewhere in the documentation.
I've upgraded three applications to Rails 6.1.3 from 6.0.3 last week. That was a pain (missing things like you have to upgrade webpacker, etc) but I got it working and deployed all three to my staging server, using the systemd commands
I then tried to upgrade to my production server (digital oceans)
Everything went fine until it tried to restart puma and end with:
At this time the cap terminal is just sitting on the Ctrl C message. Only way to get out it Ctrl C which response with saying deploy failed. It actually deployed it's just puma was not restarted, I could ssh and use systemctrl to restart it, but not with cap deploy.
If I do
sudo systemctl restart puma_rbooks_production
I get a response on ubuntu:Don't get the extra stuff on debian.
I don't know if the extra stuff is interpreted that the command was not complete or what. Don't remember if I was getting the extra stuff before, but I've been using systemd for a few years and it worked fine on deploy.
UPDATE: I guess Ubundu adds log messages to all systemd commands and Debian does not
I'll add that all three application are set up about the same.
The only difference in the systemd service files is the username
One app RBooks is on GitHub if you want to see the deploy setup.