Skip to content

Web server in python that returns his IP address, listening port and hit count.

Notifications You must be signed in to change notification settings

fersantxez/simpleweb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simpleweb

A simple web server that outputs the IP addresses of the source and destination, useful for load balancing testing. It checks for the $PORT0 variable and starts the server on that port if it's defined. This is useful for deployment with Marathon.

Runs on Alpine linux base in order to be lightweight. Uses python 2.7.

What is simpleweb?

simpleweb is a simple web to show the source and destination IP addresses of the received requests information, written in python.

How to use this image?

The docker image is auto built at https://registry.hub.docker.com/u/fernandosanchez/simpleweb/.

In Dockerfile

FROM fernandosanchez/simpleweb

Local Run

$ docker run --rm -it -p 80:80 fernandosanchez/simpleweb

Which image is based on?

The image is based on yeasy/simple-web, which is based on python:2.7

What has been changed?

Add the index.py code. Modify it to have the server listen on port number $PORT0 if that environment variable is defined. This is useful for automatic port assignment with Marathon. Dockerfile to run on lightweight Alpine linux and python 2.7.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

About

Web server in python that returns his IP address, listening port and hit count.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%