3 ms·
The way I do it is to rsync my code to a path such as "app-v1.0.0" I then create symlinks such as "live" & "beta": "live" -> "app-v1.0.0" I rsync the code fr
by joshribakoff 11y ago
The way I do it is to rsync my code to a path such as "app-v1.0.0"
I then create symlinks such as "live" & "beta":
"live" -> "app-v1.0.0"
I rsync the code from a CI server or local host, after running bower/composer & testing, this way I deploy a "snapshot" of the entire codebase.
I find a lot of people just casually deploy their code with git, and subsequently run "bower install", tolerating downtime in between, with no solid rollback mechanism in place. I hear Capistrano works in a similar way but is git based instead of rsync. To me its really important that the updates happen atomically & roll back atomically, and as a result of running a single command.
Simple example of a "deploy.sh" I would use in a new project:
gulp production && rsync --update-after --delay-updates --exclude-from="rsync_exclude.txt" -avr ./ server-www:/var/www/html/
- revmoo 11y agoI do this almost exact process with the symlink swapping, it's amazing. I use bamboo however, so we're literally in a state of 'Commit code, push button to deploy to one of three environments', no other steps are needed or involved.