GithubHelp home page GithubHelp logo

hello-web's Introduction

docker run --name nginx -p 8080:80 -d nginx
docker cp default.conf nginx:/etc/nginx/conf.d/default.conf
docker exec nginx nginx -s reload

docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=demo -d mysql
docker exec mysql mysql -uroot -pdemo -e 'create database demo;'
docker exec mysql mysql -uroot -pdemo -e 'create table demo.demo (id int, name varchar(255));'
docker exec mysql mysql -uroot -pdemo -e 'insert into demo.demo (id, name) values (1, "cclin");'
docker exec mysql mysql -uroot -pdemo -e 'select * from demo.demo;'

docker run --name gui -p 8081:80 -d nginx
docker cp gui-index.html gui:/usr/share/nginx/html/index.html
docker cp gui-cookie.html gui:/usr/share/nginx/html/cookie.html
docker cp gui-table.html gui:/usr/share/nginx/html/table.html
docker cp gui-table.json gui:/usr/share/nginx/html/table.json

docker run --name api -p 8082:80 -d nginx
docker cp api-index.html api:/usr/share/nginx/html/index.html

docker network create demo
docker network connect demo nginx
docker network connect demo mysql
docker network connect demo gui
docker network connect demo api

curl http://localhost:8080
curl http://localhost:8080/gui
curl http://localhost:8080/api
open http://localhost:8080/gui
open http://localhost:8080/gui/cookie.html
open http://localhost:8080/api/cookie/set
open http://localhost:8080/gui/table.html
docker stop api
docker rm api

cd go
docker build -t yourname/api .
docker run --name api -p 8082:80 -d yourname/api

docker network connect demo api
docker stop api
docker rm api

cd py
docker build -t yourname/api .
docker run --name api -p 8082:80 -d yourname/api

docker network connect demo api

hello-web's People

Contributors

jinsenglin avatar cclin81922 avatar

Watchers

James Cloos avatar  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.