When deploying a simple web application to a virtual machine, how do you go about setting it up?
- Do you install the required runtime, if any, (like Python, Ruby, NodeJS) directly on the VM? Do you create systemd unit files to launch the application on startup?
- Do you use vagrant?
- Do you use Docker
- Do you do something completely different
Why do you choose that particular way of deploying?
Top comments (5)
I use Docker. It takes time to understand it and learn some basic stuff and commands, but at the end you will get a sustainable, predictable, scalable way of running your apps.
Just an example. You have some simple app backed, frontend, maybe Redis and some database. You prepared docker compose file once for development, then you could use almost the same configuration for production. If you configured it once very well you could use it everywhere, migrate from one host to another without having troubles with running tons of commands. Then let's imagine your app or product getting more and more parts. You managed to have CI, and it's not a problem because you already have dockerfile configured. Then if you start use orchestration tools such as Kubernetes, it also will not be a problem, because your dockerfile already there.
I'm currently using Docker for this, but it's starting to feel like overkill for most of my personal use cases - my Rust roll-your-own-website is a 5MB binary but rebuilds include all my deps, so pushing changes generally involves pushing hundreds of megabytes of recalc'd layers around. Curious to see what people have to say here - I dig the convenience, just not the bandwidth.
Right now I'm using Lando, so far so good: docs.devwithlando.io
No docker, no vagrant, no goddamn Kubernetes or any other bloated junk. As my friend said "for some people 'portable' does not mean 'it runs on Ubuntu and CentOS' ".
blog.jessfraz.com/post/you-might-n...