Sign inSign up

webdestroya/http-placeholder

By webdestroya

•Updated over 7 years ago

Image
0

50K+

webdestroya/http-placeholder repository overview

⁠Docker Placeholder HTTP App

This provides a placeholder web app that can be used to test deployment system and anything else that assumes a web service is available at a specific endpoint.

⁠Usage

$ docker run --rm -p 8080:8080 webdestroya/http-placeholder:latest

⁠Endpoints

  • /health: returns a 200 OK and the text "OK"
  • /favicon.ico: returns a 404
  • /robots.txt: returns a Robots file to disable indexing
  • /###: returns a page with the corresponding error code provided
  • /headers: returns request headers
  • /environment: returns a JSON hash of the environment variables for the container (if enabled)
  • All Others: returns a welcome page

⁠Configuration

Environment VariableDefaultDescription
PLACEHOLDER_SHOW_ENVtrueWhether to show the /environment page.
Possible values are:
true: show all vars (default)
false: show nothing
list: show env vars in PLACEHOLDER_ENV_LIST
PLACEHOLDER_HEALTHCHECK/healthThe path to use for the healthcheck
PLACEHOLDER_APP_NAMEPlaceholderThe name of the app. Shown on index page
PLACEHOLDER_ROBOTStrueWhether to respond to the robots.txt request
PLACEHOLDER_ENV_LISTA comma separated list of env vars to show.
(When PLACEHOLDER_SHOW_ENV is set to list)
PORT8080Default port to serve app on

Tag summary

Content type

Image

Digest

Size

50.9 MB

Last updated

over 7 years ago

docker pull webdestroya/http-placeholder