Hey there! I have a Django app and I would love to get to the point where with the push of a button or when I commit to master, my whole deployment flow is automated. I know there's stuff out there like this, I'm just not sure where to start. What do you you use?
I find Gitlab pretty convenient for this purpose. It serves as a all-in-one solution for:
developmentbranch for the staging server and on click formasterbranch and production server)Sounds slick. I'll have to take a peek
Give Cleaver a try
Jenkins!
I work with PHP mostly Laravel so I'm using Github actions with deployer so with every push to master branch all assets are built and all tests run on Github actions and then push the compiled assets to VPS and then run migrations and all that thing so I have basically zero downtime deployment setup for my productions.
Wow v nice. Thanks!
Been using CodeFresh the past year and it has been a huge help
Github Actions with basic Digital Ocean hosting.
Every push to
devacts on "staging" droplet, and every push onmasteracts on "production" droplet. Both workflows: 1) checkout repo, 2) copy it over SSH to corresponding droplet and 3) execute additional commands on droplet over SSH to start API backend.The plan is to use Docker at some point in future, but for now, this works fine. Great thing is that this is still reusable even when changing the hosting provider.
Ohhh very solid. Thanks!
For my side projects I am running a simple Bash provisioning that gives me "git push" style of deployment ala Heroku on my own VPS.
In fact I am writing a book about it so if you are interested then have a look at https://deploymentformakers.com/.
Ya I’ll check it out. Thanks!
If you use bitbucket you might want to checkout bitbucket pipelines. I have used use to look for certain git tags then deploy the code to either my dev or prod AWS Elastic Beanstalk instance.
Thanks!
Same as a few, Github Actions with basic Digital Ocean and Docker
When I push a new tag (eg:
v0.1.0) it kicks off a Github Action that builds the project, logs into a self hosted Docker Registry, builds the Docker image and uploads to the Docker Registry.The Docker container on DigitalOcean has a watchdog that monitors the registry every 15min and pulls new changes and restarts the containers. So far, no issues with it!
Sounds solid! Thanks
I'm interested in docker as a way do package & deploy my apps but for small projects solutions like Kubernetes / k3s and even minikube require too much effort IMHO.
Since I'm starting from monolith with my side projects - few simple bash scripts (basically pulling new version on droplet and replacing running container) are working fine (actually even better than I expected) and then when I will need to scale it I will start split it into microservices (probably consider AWS lambda for that)
Nice! Thanks
Gitlab, Docker-Compose, and Digital Ocean.
How to setup:
How to use:
masterbranch and the.gitlab-ci.ymlfile in the repository will deploy the code onto the VM. You can also see real-time report of your build - whether it correctly built and deployed the application or not.I've hesitated on learning Docker, maybe it's time to dive in. Thanks for the info
From the perspective of in what to write the actual deployment scripts, for me that would be Ansible or Fabric (https://stribny.name/blog/2020/01/deployment-with-fabric), I'd manage my apps as systemd services (unless you use Docker) etc. Then you can use what other people mentioned to put it together as a CI/CD thing.
Awesome writeup. Thanks a ton!
I'm a fan of GitHub actions, you're able to do a decent amount with it and have it triggered via merges or a variety of other events. It's pretty similar to what Gitlab has offered for a while, but since I prefer GitHub, I use actions.
I host on GitHub too so I'll check it out. Thanks!
In one of my current project I am using GitHub and AWS code pipeline for CI/CD. Everything is pretty automated. Merging to staging deploys to staging server and update in master branch deploys to production server. My app is Nodejs/React native and is deployed in Elastic beanstalk.
Thanks!
With my current set-up I use GitHub packages, a server running docker-compose, watchtower, and Travis CI.
On commit a build is triggered which, if on master, pushes a docker image to GitHub Packages. Watchtower is a process which keeps track of all running Docker containers, and updates one whenever there's a new version.
It takes some time to get right with the configuration in between the different services, but once it's set-up it'll work like a charm!
Man, that's where I hope to be one day. Just set it and forget it type of deal
Heroku!
Haha probably the right answer for simpleness but I've done Heroku and I didn't like how I didn't have much control. I am self hosting now on a server, just looking for how to automate what I do every time
This comment was deleted 5 years ago
Oh nice!