Giter VIP home page Giter VIP logo

docker-compose-demo's Introduction

docker-compose-demo

A simple Docker Compose Demo for Spring Cloud Project .

中文文档

how to use

  • build maven project and push them into docker by running "build-images.sh"

    if you are successful , you can find this :

    build-images.jpg

  • running project by using docker-compose :

      docker-compose up -d
    

    if you are successful , you can find this :

    run-docker-compose

    and you can find container list in your Docker pannel :

    after-run.jpg

  • stop all the project by running :

      docker-compose down          
    
  • if you changed the code , plz run :

      docker-compose down 
      
      ./rm-images.sh
      
      ./build-image.sh
      
      docker-compose up
    

    the ./rm-images.sh will remove the Image from Docker :

    rm.jpg

    the ./build-image.sh will package your project and upload it to Docker .

    before you run ./build-image.sh , your Docker pannel should be look like this :

    before-install.jpg

    after your run ./build-image.sh , your Docker pannel should be look like this :

    after-install.jpg

  • plz pay attention , if you want to debug in IDEA , you need set your hosts file :

      127.0.0.1 docker-compose-eureka
      127.0.0.1 docker-compose-config
      127.0.0.1 docker-compose-gateway
      127.0.0.1 demo-api-a
      127.0.0.1 demo-api-b                
    

    But jut running in Docker , you do not need set this .

running demo

  • Eureka pannel should be look like this :

    eureka/jpg

  • config server should be look like this :

    config.jpg

  • visit demo-api-a throw zuul gateway should be look like this :

    demo-api-a.jpg

  • visit demo-api-b throw zuul gateway should be look like this :

    demo-api-b.jpg

write file to host demo

read and write file from host demo

docker-compose-demo's People

Contributors

liumapp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.