How would you deploy a simple web application to a single VM?

twitter logo github logo ・1 min read

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?

twitter logo DISCUSS (5)
markdown guide

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.


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' ".

Classic DEV Post from Feb 8

Why you may need a dedicated homelab.

When that good ol' PC won't cut it anymore.

Frederik 👨‍💻➡️🌐 Creemers profile image
I'm never sure what to put in a bio. If there's anything you want to know, don't be afraid to ask!

Hey there reader...

Do you prefer sans serif over serif?

You can change your font preferences in the "misc" section of your settings. ❤️