I have a handful of NodeJS websites that are almost ready to be deployed publicly. All of them are very simple sites which I don’t expect to get much traffic.
I’m thinking I could make a docker container for each website using the NodeJS docker image, then route them using traefik or nginx. This way there’s a good degree of separation between the sites and everything will be organized and easy to backup/transfer around if needed.
Is it a decent plan? Got any better ideas or tips?
I recommend looking into docker-compose. That way you can refer to an nginx image along with your services in one single YAML config.
Yep sounds very reasonable to me. I’d personally recommend traefik over nginx, it’s a lot easier to get up and running quickly and integrates natively with Docker. Just slap some labels on your container and boom it’s live. Plus, traefik can be configured to easily get letsencrypt certs for your domain(s) automatically, which is really nice.
Very true. Traefik is pretty awesome. Thanks for the input!