简体   繁体   中英

How can I solve the deployment/updating of dockerized app on my VPS?

Not easy to make good title for this question so if someone have better idea please edit.

That's what I have:

  1. VPS (KVM)
  2. Docker
  3. Nginx-proxy so all docker containers supposed to be exposed are automatically exposed to appropriate domain.
  4. Some apps like Wordpress are just using container with connected volumes which are accesible by FTP so this is not an issue to manage them/update stuff etc.
  5. I have SailsJS app (NodeJS) which I have to dockerize. It will be kept updated quite often.
  6. I will have some apps written in C#(ASP.NET) / Java (Spring) with similar scenario as in point 5.

Both 5 and 6 source code is stored on BitBucket but can be changed if it would be better to have self hosted git server to solve issues.

What I am looking for is to have automated process which will build the docker image when I do commit and make sure that docker will pull the new image and restart container with new content. I do not want to use DockerHub as there is only 1 private repository so it will not work for long term.

I thought I can do it with Jenkins somehow but have no idea how...

You can setup private GitLab server. It provides THREE necessary things - Git repository (managed as admin by your own), completely private Docker registry (so you can privately store your own docker images) , and own CI - complete and sufficient to do what you request, integrated seamlessly and working with former two.

You would setup GitLab runner so when you do commit image being rebuilt and pushed to component-specific registry, and there are hooks and environments which allow you to set up back connection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM