Question

One droplet for multiple docker containers with traefik as reverse proxy

Hello guys,

sorry if this question was asked way before, I just cant find it.

Now my question is. Is it possible to run multiple docker containers on 1 droplet with traefik as reverse proxy? Here is the thing. I want to create SPA with my own BE based on NodeJS with my own Postgres db. So I need 3 docker containers for my project.

Question is, is one droplet good for this kind of project? If yes, its possible to use traefik as proxy and if so, which droplet is good for it?

Thank you :)

Best regards

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I want to create SPA with my own BE based on NodeJS with my own Postgres db. So I need 3 docker containers for my project.

Sure, you can definitely do that. If you are planning to stick to Docker, then I highly recommend using Docker Compose to write the service scripts and the connections between your Docker images and containers.

https://docs.docker.com/compose/

is one droplet good for this kind of project?

One droplet of what size? It would be good for testing/development purposes. For anything related to production-grade, consider using suitable resources. 4 vCPU and somewhere around 16 GB of RAM would be a good combination for production.

Last but not least, you can also use the Managed Kubernetes service on DigitalOcean. The service creation is similar to Docker, and provides extra support for:

  1. Availability
  2. Scalability
  3. Storage management
  4. Secrets and credential management (useful for API keys, etc.)

This is what I would recommend.

If yes, its possible to use traefik as proxy,

Yes, Traefik supports Kuberenetes (if you decide to use Kubernetes) as an Ingress controller and can easily be used as a proxy for your services. Read more on this here and here.