-
-
Save arulrajnet/6cf9ed72d1dd85c61a61f8605d68e37f to your computer and use it in GitHub Desktop.
httpbin using docker-compose with requestlog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GUNICORN_CMD_ARGS=--capture-output --error-logfile - --access-logfile - --access-logformat '%(h)s %(t)s %(r)s %(s)s Host: %({Host}i)s}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
# YAML Aliases / Anchors. | |
x-networkName: &networkName "default" | |
x-default: &default | |
# compose 3.4 introtuced x- extended fields for aliasing. | |
logging: | |
driver: journald | |
options: | |
tag: orchestrator | |
dns: | |
- 8.8.8.8 | |
- 9.9.9.9 | |
services: | |
# HTTPBin service | |
httpbin: | |
<<: *default | |
image: kennethreitz/httpbin:latest | |
networks: | |
*networkName: | |
aliases: | |
- httpbin | |
ports: | |
- 80:80 | |
environment: | |
- GUNICORN_CMD_ARGS=${GUNICORN_CMD_ARGS} | |
networks: | |
*networkName: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment