项目作者: intellisense

项目描述 :
Simple docker configuration to run nginx and gunicorn in separate containers and test nginx proxy pass to upstream gunicorn
高级语言: Python
项目地址: git://github.com/intellisense/docker_test.git
创建时间: 2017-03-05T12:43:43Z
项目社区:https://github.com/intellisense/docker_test

开源协议:MIT License

下载


Simple docker configuration to run nginx and gunicorn in separate containers and test nginx proxy pass to upstream gunicorn

Prerequisites

  • This project uses docker, docker-machine and docker-compose

Set it up

  1. cd /path/to/docker_test/
  2. docker-machine create test --driver virtualbox --virtualbox-disk-size "2000" --virtualbox-cpu-count 2 --virtualbox-memory "1024"
  3. docker-machine env test
  4. eval "$(docker-machine env test)"
  5. docker build -t docker_test:test .
  6. docker-compose build
  7. docker-compose up -d
  8. docker-machine ip test

Go to browser and paste the IP you get from command docker-machine ip test and you should see the response Hello, World!

Installation of prerequisites on Mac via Homebrew

  1. brew update && brew upgrade --all && brew cleanup && brew prune
  2. # install docker
  3. brew install docker
  4. # install docker-machine and start its service
  5. brew install docker-machine
  6. brew services start docker-machine
  7. # install docker-compose
  8. sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.11.2/docker-compose-$(uname -s)-$(uname -m)"
  9. sudo chmod +x /usr/local/bin/docker-compose
  10. # test docker-compose installed correctly
  11. docker-compose -v