webdebugger

0

Описание

Языки

  • Makefile34,5%
  • HTML27,4%
  • Python21,9%
  • Dockerfile10,6%
  • Shell5,6%
README.md

webdebugger

Build Status

This webb app show HTTP headers and other useful information

How to run

Docker

Just run docker container from Docker Hub

And now open webdebugger at http://localhost:8080/

Configuration

Environment variables

App behavior variables:

  • APP_DELAY
    reply delay, seconds
  • APP_BGCOLOR
    set web-page background color. Default
    white
  • APP_NO_CSS
    disable loading external CSS or JS resources (usebla inside of isolated environments). Available values: one of
    'true', 'yes', '1'
    is
    True
    , every other value is
    False
    .

Sentry-related variables:

  • SENTRY_DSN
    sentry DSN to send traces. Default empty TODO:

Routes

Webdebugger process these URI paths

  • /hello
    - always return
    Hello World! ^_^
  • /healthz
    - always return
    OK
  • /env/<env_var>
    - return value of uppercased os environment variable
    env_var
  • /
    and
    /<path:path>
    - are all other URI paths. Return request and os environment variables.

Development

Requirements

First, you must have

make
installed, to simplify all the operations. If you haven't, see Makefile for corresponding commands.

Then, you must have

poetry
installed. See https://python-poetry.org/docs/

Or just run

After that, install dependencies

or

Run tests

pycodestyle

or

pytest

or

hadolint (lint Dockerfile)

Version control

This project use sematic versioning. See semver

For increasee version, use corresponding Makefile targets

  • version
    - get version
  • version-patch
    - increase version patch number
  • version-minor
    - increase minor version
  • version-major
    - increase major version

NOTE: All chacges must be committed. All these actions, except

version
, create new commit and add tag with version number.

Sentry integration

TODO

Run in docker container

Run with docker-compose

  • docker-compose up

App will be available on you'r IP port

8000

Variables (
make
args)

Make args are the same as environment variables

Commands (
make
targets)

Build image

Build image and run tests

Run container

Run shell inside container

Author

Aleksey Koloskov vsyscoder@gmail.com