How can dockers be used to run multiple open source web applications?

It is generally recommended that you run one process per docker container. And that makes sense if you are trying to run a single web application that requires different kinds of tools.

For example, an open source web application kanboarduses

  • MySQL
  • Apache
  • php5
  • Memcache

Now, if this was the only web application that I was going to run, then it makes sense to run each tool in a separate container in order to use dockers one process per container .

But let's say, instead of launching only one web application, I wanted to run several web applications,

  • kanboard
  • EtherPad
  • plexus
  • Owncloud
  • dockuwiki
  • discourse

, -? , , , ,

  • (mysql, postgres, sqlite)
  • (memcache, redis)
  • (, , RQ, SHARQ)
  • - (nginx, apache)
  • (lucene, sphinx, opensearchserver)

-. 2 , ,

  • . kanboard, etherpad .
  • dockers dictum one process per container mysql, postgres, sqlite, memcache .. docker linking, . . .

, ? , ?

, , ( ) ? , -?

+4
3

.
, (. "PID 1 -). , , : phusion/baseimage-docker

webapp ( )

, .

, NGiNX , - -, URL- (url/discourse url/plex , plex ..)

0
0

:

. .

, . :

-:

  • Dockerimage/-

  • , init script ( CMD ENTRYPOINT). - ,
  • , , . , redis .. .
  • , .
  • : ?
  • . .
  • , .

, :

:

  • (, postgres, wordpress, ),
  • : -, .

:

  • , .

. , docker-compose, "" , docker-compose.yml

If you then use a tool, for example https://github.com/jwilder/nginx-proxy (I did, it works like a charm), even reverse proxying is a simple thing and you can run X different programs on the same host.

Thus, we created our jenkins, redmine, cms and much more for our company. Hope this helps you with your decision.

0
source

Source: https://habr.com/ru/post/1613143/


All Articles