1

This is my first post on SO after a long time using it. In advance, please apologize for my English ;)

Currently, I am working on an app that needs to be Dockerized. This app will be deployed on just one server in a private network. (We assume that the customer will not have access to the internet.)

To sum up, I build my app with a docker-compose.yml file. It consists of 2 nodejs app and a mongodb server.

What are my solutions to deploy this app in a private customer environment with only one server?

Thanks by advance.

Zeitounator
  • 38,476
  • 7
  • 53
  • 66
  • Hi and welcome to SO. What is wrong with docker-compose in this case ? If there is no internet access at all, you can save the images as tar.gz and load them on the other side before launching your compose file.See [this other answer](https://stackoverflow.com/a/23938978/9401096) – Zeitounator Apr 25 '20 at 21:44
  • Hi, thanks for your fast answer! Docker-compose is ok, and saving images is a good solution. Is it ok to do like this in production? What if i want a service to be available at any time ? (Replicas) – MowaRecords Apr 25 '20 at 22:26
  • And how are you planning to deploy a dockerized application on a server without installing docker ? There are container runtimes alternatives like containerd but you will have to install something in the end. – Zeitounator Apr 25 '20 at 22:32
  • Sorry i edited my answer, haha. It's ok to install Docker on the server. Maybe install a Docker Desktop and adjusting values (like restart: always ans replicas) in docker-compose is ok for production? – MowaRecords Apr 25 '20 at 22:43
  • So if you want all this, you're not talking about one server or it does not make sense. You need a swarm, or a Kubernetes cluster. This is really going beyond your initial question. – Zeitounator Apr 25 '20 at 23:01
  • Yeah, I see what do you mean.. I've made many research on this subject. Maybe what I need is just a kubernetes cluster (single node). I will try to find something tomorrow. Maybe i not as understandable as i wanted to be haha. I am French too, maybe i can ask you in French in pm, and we translate it here for the community? Thank you for your time and your answers btw ;) – MowaRecords Apr 25 '20 at 23:52
  • What is the point of having replicas if you have a single node ? It can be useful to test things during development. But to achieve HA and resiliency on production, it is absolutely pointless. – Zeitounator Apr 26 '20 at 00:03
  • Hi again. I was searching for solutions to my problem. What I need is just a way to run my app on a production server (probably windows server), no replicas etc. Can I use a Docker Desktop for that ? Does a production-ready app to run simple docker container exists ? Thanks – MowaRecords Apr 26 '20 at 10:48

1 Answers1

0

finally, my research did great. I think I found a solution to my problem. Because I'm using 2 node.js apps, and a MongoDB server, I will use PM2.

https://pm2.keymetrics.io

PM2 is a tool that will help to manage, monitor, restart in case of failures multiple node.js process.

I will just use this tool to make my project production ready (just npm and pm2 to install on the server) and talk about Docker for further investigations.

Thank you,