this post was submitted on 20 Jul 2023
3 points (100.0% liked)

Self Hosted - Self-hosting your services.

11492 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules

Important

Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!

Cross-posting

If you see a rule-breaker please DM the mods!

founded 3 years ago
MODERATORS
 

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?

top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 1 year ago (2 children)

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.

[–] [email protected] 2 points 1 year ago (1 children)

If I'm not mistaken NGINX Proxy Manager does all of that too, doesn't it?

[–] [email protected] 1 points 1 year ago

You could very well be right! I'm afraid I don't know, I've not used Proxy Manager. When I switched from nginx to traefik a good few years ago it definitely didn't exist, but I've not kept up with it since.

[–] [email protected] 2 points 1 year ago

Very true. Traefik is pretty awesome. Thanks for the input!

[–] [email protected] 4 points 1 year ago

I recommend looking into docker-compose. That way you can refer to an nginx image along with your services in one single YAML config.

[–] [email protected] 1 points 1 year ago

I think that's reasonable.