3 ms·
> All of that to deploy a bunch of standard applications in a single server usage: deploy_app "commit message, push right to master!" deploy_app () {
by MuffinFlavored 6y ago
> All of that to deploy a bunch of standard applications in a single server
usage: deploy_app "commit message, push right to master!"
deploy_app () {
git add --all :/
git commit -m "$1"
git push
ssh user@server <<EOF
cd app/ &&
git reset --hard &&
git clean -df &&
git fetch &&
git reset --hard origin/master &&
sh scripts/deploy.sh
EOF
}
deploy.sh
#!/bin/sh
set -e
# java
sh scripts/rebuild.sh java-api
# node.js
sh scripts/rebuild.sh api
sh scripts/rebuild.sh cron
sh scripts/rebuild.sh ui
sh scripts/rebuild.sh windows-api
sh scripts/rebuild.sh ws
# terraform
sh scripts/apply.sh
# nginx
docker restart nginx
# sql
sh scripts/migrate-database.sh
Rebuilds Docker images, taints the Terraform Docker resources
- davedx 6y agoI have something very, very similar for a new line of business app I've just started building, except with no docker or terraform (I use docker to run a local postgres, that's it).
- dirkc 6y agolooks like you're using terraform to provision your docker containers locally? What is the benefit over using docker-compose? Or do you also provision other things?