1. Tricky and unfrequent changes:
- mail server, load balancer, database etc: for this I just write bootstrap.sh, rsync to server and run.
- It's literally just a
for server in `foor bar`; scp ; ssh ` done
2. Deployment/Frequent changes:
- docker-compose to spin up everything. It's super nice. Again, the deployment is done with a `rsync` then `docker-compose up -f docker-compose-prod.yml`
Eventually when deployment changes very frequent and need scale/ha I added in Kubernetes. K8S is way easiser to setup than you think and it handle all other suff(load balancer, environment variable etc).
And my deploy now become: `kubectl apply -f`
One trick I used is to use `sed` or `envsubst` to replace the image hash.
For backedup, I again, literally setup cronjob from an external server, `ssh` into database and run `pgdump`.
I also have a nice NFS server to centralize config and sync back to our git repo.
I used this whole setup to operate https://hanami.run an email forwarding service for the first 3 months before I added Kubernetes.
1. Tricky and unfrequent changes: - mail server, load balancer, database etc: for this I just write bootstrap.sh, rsync to server and run. - It's literally just a for server in `foor bar`; scp ; ssh ` done
2. Deployment/Frequent changes: - docker-compose to spin up everything. It's super nice. Again, the deployment is done with a `rsync` then `docker-compose up -f docker-compose-prod.yml`
Eventually when deployment changes very frequent and need scale/ha I added in Kubernetes. K8S is way easiser to setup than you think and it handle all other suff(load balancer, environment variable etc).
And my deploy now become: `kubectl apply -f`
One trick I used is to use `sed` or `envsubst` to replace the image hash.
For backedup, I again, literally setup cronjob from an external server, `ssh` into database and run `pgdump`.
I also have a nice NFS server to centralize config and sync back to our git repo.
I used this whole setup to operate https://hanami.run an email forwarding service for the first 3 months before I added Kubernetes.