Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deliver dockerized app to client? [closed]

Tags:

docker

My app consists of web server (node.js), multiple workers (node.js) and Postgres database. Normally I would just create app on heroku with postgres addon and push app there with processes defined in Procfile.

However client wants the app to be delivered to his private server with docker. So the flow should look like this: I make some changes in my node.js app (in web server on workers), "push" changes to repo (docker hub?) and client when he is ready "pulls" changed app (images?) to his server and app (docker containers?) restart with new, updated code.

I am new to docker and even after reading few articles/tutorials I am not sure how I can use docker...

So ideally if there would be one docker image (in docker hub) which would contain my app code, database and client could just pull it somehow and just run it... Is it possible with docker?

like image 633
user606521 Avatar asked Oct 19 '25 12:10

user606521


1 Answers

Standard strategy is to pack each component of your system into separate docker image (this is called a microservice architecture) and then create an "orchestration" - a set of scripts for deployment, start/stop and update.

For example:

  • deployment script pulls images from docker repo (Docker Hub or your private repo) and calls start script
  • start script just does docker run for each component
  • stop script calls docker stop for each component
  • update script calls stop script, then updates images from repo, then calls start script

There are software projects on the internet intended to simplify the orchestration, e.g. this SO answer has a comprehensive list. But usually plain bash scripts work just fine.

like image 90
Aleksei Petrenko Avatar answered Oct 21 '25 02:10

Aleksei Petrenko