Navigation Menu

Skip to content

ikasam/dc-multi-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample for multi environments of docker-compose.yml which be written with DRY

MIT License

Requirements

  • Docker version 17.12.0+
  • docker-compose version 1.18.0+

How to startup

$ docker-compose -f proxy.yml -p proxy up -d
$ docker-compose -f docker-compose.yml -f env1.yml -p env1 up -d
$ docker-compose -f docker-compose.yml -f env2.yml -p env2 up -d

Test

$ curl -I -H "Host: hoge" localhost
HTTP/1.1 503 Service Temporarily Unavailable
Server: nginx/1.13.9
Date: Sun, 03 Feb 2019 14:03:41 GMT
Content-Type: text/html
Content-Length: 213
Connection: keep-alive
$ curl -H "Host: env1.web.local" localhost
here is env1!
$ curl -H "Host: env1.back.local" localhost
here is env1.back!
$ curl -H "Host: env2.web.local" localhost
here is env2!
$ curl -H "Host: env2.back.local" localhost
here is env2.back!

License

About

DRY に書いた docker-compose.yml で複数環境を作るサンプル

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published