php - nginx docker instance multiple application -


so, dockerizing architecture consists of multiple php applications ran on apache.

if i'm right need: 1 nginx container, 1 php container , multiple data-containers volume-from in nginx container.

how able have multiple data container linked nginx container? example got app1.domain.com volumed /data/app1 , app2.domain.com volumed /data/app2 etc etc.

you can create 1 volume container each app:

  • app1: docker create -v /data/app1 --name app1 ....
  • app2: docker create -v /data/app2 --name app2 ....

then link them nginx container with:

docker run --volumes-from app1 --volumes-from app2 --name nginx ... nginx ... 

more information volumes can find in official volumes documentation.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -