A HTTP server which serve a static response defined by environment variables.
10K+
A very simple static HTTP server with support for web-sockets.
/.ws for a basic UI to connect and send web-socket messages.CONTENT_TYPE and CONTENT_BODY defines response's content type and body.PORT environment variable sets the server port.To run as a container:
docker run --env CONTENT_TYPE=application/json \
--env CONTENT_BODY='{"upstream": "production"}' \
--detach -P pagarme/static-response-server
Also works great with docker-compose:
services:
production:
image: pagarme/static-response-server
environment:
- PORT=8080
- CONTENT_TYPE=application/json
- CONTENT_BODY={"upstream":"production"}
ports:
- "8080:8080"
sandbox:
image: pagarme/static-response-server
environment:
- PORT=8081
- CONTENT_TYPE=application/json
- CONTENT_BODY={"upstream":"sandbox"}
ports:
- "8081:8081"
Content type
Image
Digest
Size
1.3 MB
Last updated
almost 10 years ago
docker pull pagarme/static-response-server