Looking for some best practices here—I’d like to do the following
• deploy a nodejs project on push to GitHub
• hosted a single server (on something like Linode or Digital Ocean)
I’m open to using Docker, but want to avoid too many moving parts too.
Hi Spencer, i believe our tool https://microtica.com can help you out. Our cloud provider at the moment is AWS and we abstract the whole infrastructure setup part. As an addition we offer microservice deployment on Kubernetes together with CI/CD. We have a github integration, so you'll be good to go in no time. Check it out and let me know if you have any questions.
Thanks @maria_micro. Looks like a cool product! I’ll keep it in mind for the future.
I’m looking for a simpler production infra right at the moment but can see how microtica would be helpful
Thanks Spencer! You feedback means a lot! Can you tell me why you think microtica might not be the simple solution you're looking for? As we are a new startup on the market, naturally your opinion is valuable to us :)
Hi Spencer! Good question. What type of project is it? And what's most important to you, shipping or costs?
If you don't mind paying a bit more, you can use a PaaS like Heroku which makes it a breeze to deploy on push to Github. Additionally, you don't have to worry about configuring, managing and securing a server.
If you want to save some bucks, a VPS is the way to go. I know Digital Ocean has a Github Action allowing you to set up automatic deployments on every push to Github. Linode has one too, and if you go with a different provider that doesn't have a CLI tool you can always use SSH remote commands to deploy your application.
Docker is a great tool once you get the hang of it. If you haven't worked with it before however, it might add more friction than necessary.
Happy to answer if you have more questions!
Thanks @maximization. Super helpful.
The link about securing a VPS is really helpful and clear.
Taking a look at the Linode and Digital Ocean CLIs, it looks like those are mostly for spinning up servers/interacting with the hosted resources. Do you know of any resources or examples that implement the deploy on push?
Have a look at this file https://github.com/Maximization/autodeploy-docker/blob/master/deploy.sh. The project uses CircleCI (but any CI/CD provider will do) to run the build + test and then run this file to deploy if tests are green.
It's using Docker, but without Docker the process would be similar. The gist is at the bottom of the file where the script connects to the production server with SSH and fetches a new version of the code and then restarts the app. If you use PM2 you get 0-downtime deployments and rollbacks for free.
Is it a bit more clear?
@maximization, super helpful! Thanks!