This is a simple dockerized web counter solution. Based on the Stack Docker, Python, Fastapi, MongoDB. API is implemented in fastapi, the db Backend is MongoDB and the counter itself is implemented via a get request for a count pixel.
We provide sample HTML implementations using /Sample.html.
User Privacy is ensured via hash based Host+Agent annomymization. For implementation details see makeuuid
in main.py.
pip install -r requirements.txt
uvicorn main:app --reload
start for testing
cd tests
pytests
For local testing, a .env file needs to be created and cocker-compose.yml needs to be altered to use said file.
docker compose build test
docker compose run --rm test
docker compose build release
docker compose push release