Skip to content

pichuang/httpbin-re

 
 

Repository files navigation

httpbin-re: HTTP Request & Response Service

Updates and REbuild based on Kenneth Reitz's project

tw ice cream

Run locally:

docker pull ghcr.io/pichuang/httpbin-re:master
docker run -p 8080:80 ghcr.io/pichuang/httpbin-re:master

# or
docker-compose up -d

TLS termination via nginx

Steps below front the app with nginx so you get HTTP on http://localhost:8080 and HTTPS on https://localhost:8443.

  1. Generate (or copy in) certificates. A quick self-signed pair looks like:
mkdir -p nginx/certs
openssl req -x509 -nodes -newkey rsa:2048 \
  -keyout nginx/certs/server.key \
  -out nginx/certs/server.crt \
  -subj "/CN=localhost" -days 365

Replace the generated files with your trusted certificates when deploying elsewhere.

  1. Launch the compose stack (nginx now terminates TLS and proxies to the re service):
docker-compose up -d
  1. Visit http://localhost:8080 or https://localhost:8443. Adjust the published ports in docker-compose.yml if you need to bind directly to 80/443.

See httpbin.org for more information.

Major Changelog

  • Change
    • Ubuntu 18.04 -> Ubuntu 22.04
    • Travis CI -> GitHub Actions
    • Python 3.6 -> Python 3.10
    • Pipenv -> built-in pip
  • Add
    • Provide variables to change TITLE and DESCRIPTION
    • Follow OCI Specification

References

SEE ALSO

About

HTTP Request & Response Service, written in Python + Flask.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Python 76.5%
  • HTML 21.8%
  • Dockerfile 1.7%