{"id":40153860,"url":"https://github.com/hspsh/whohacks","last_synced_at":"2026-01-19T15:33:11.326Z","repository":{"id":49989174,"uuid":"123477195","full_name":"hspsh/whohacks","owner":"hspsh","description":"Who is at Hackerspace Pomorze?","archived":false,"fork":false,"pushed_at":"2025-03-01T15:02:10.000Z","size":376,"stargazers_count":14,"open_issues_count":14,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-01T16:19:04.473Z","etag":null,"topics":["dockerfile","flask","peewee","pipfile","whois"],"latest_commit_sha":null,"homepage":"https://whois.at.hsp.sh","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hspsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-01T18:40:04.000Z","updated_at":"2025-01-11T22:43:50.000Z","dependencies_parsed_at":"2024-03-22T01:29:41.041Z","dependency_job_id":"7dd485bc-f274-4d3d-8f71-db22b1fc3632","html_url":"https://github.com/hspsh/whohacks","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/hspsh/whohacks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hspsh%2Fwhohacks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hspsh%2Fwhohacks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hspsh%2Fwhohacks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hspsh%2Fwhohacks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hspsh","download_url":"https://codeload.github.com/hspsh/whohacks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hspsh%2Fwhohacks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28573017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T14:39:55.009Z","status":"ssl_error","status_checked_at":"2026-01-19T14:39:01.217Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dockerfile","flask","peewee","pipfile","whois"],"created_at":"2026-01-19T15:33:11.220Z","updated_at":"2026-01-19T15:33:11.318Z","avatar_url":"https://github.com/hspsh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# whohacks @ hsp.sh?\n\n[![Build status](https://github.com/hspsh/whohacks/actions/workflows/build.yml/badge.svg)](https://github.com/hspsh/whohacks/actions/workflows/build.yml) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n## Prerequisities\n\n- poetry\n\n## Instalation\n\n### Install dependencies\n\n```shell\npoetry install\n```\n\n## Setup whohacks locally\n\n### Create the database\n\nLocal setup involves using the sqlite3 database. Before running the web server,\nwe need to create the database with helper script:\n\n```shell\npoetry run python helpers/db_create.py\n```\n\n### Setup Environment Variables\n\nSet the following environment variables:\n\n1. `SECRET_KEY`\n2. `APP_IP_MASK` - A mask that filters the allowed IP's, allowing blocking\n   requests outside of the accepted network. For the local development purposes\n   this can be set to `127.0.0.1` to allow requests only from the host machine.\n\nExample of setting environemnt variables:\n\n- Windows: `set SECRET_KEY=example123`.\n\n- Linux: `export SECRET_KEY=example123`.\n\n### Launch the web server\n\n```shell\npoetry run python -m whois\n```\n\nYou can access the webpage by the `localhost:5000` (default settings).\n\n## Setup via Docker\n\n- Create .env file, buy it doesn't work. Go figure\n\n```shell\nsource env.sh\n```\n\n### Create the database\n\n```shell\ndocker compose run web python helpers/db_create.py\n```\n\n### Deploy via docker-compose\n\n```shell\ndocker compose up\n```\n\n## OAuth2 integration\n\nsee: https://github.com/navikt/mock-oauth2-server\n\nconfiguration can be found in ./tests/resources\n\nIf you want for redirects to work properly you need to add mock oauth to `/etc/hosts`\n\n```bash\necho \"127.0.0.1 oauth.localhost\" \u003e\u003e /etc/hosts\n```\n\nBut if you can't, you can always change `oauth.localhost` to `localhost` in your browser when redirect fails.\n\n## Deployment\n\n```shell\ndocker-compose build\n# first run, later it should just connect to existing db\ndocker-compose run web python3 helpers/db_create.py\ndocker-compose up\n```\n\n## Testing\n\nYou can run the tests with `poetry run python -m unittest`\n\n### Caution\n\nThis: `-v /etc/localtime:/etc/localtime:ro` is required to match the timezone in the container to timezone of the host\n\n### Docker compose\n\nSample:\n\n```yaml\nversion: \"3\"\nservices:\n  rabbitmq:\n    image: \"rabbitmq:3.6-management-alpine\"\n    ports:\n      - \"5672:5672\"\n      - \"15672:15672\"\n  web:\n    build: ./docker/web\n    environment:\n      # you should change secret key\n      - SECRET_KEY=\u003cyour_secret_key\u003e\n      - DB_PATH=/data/whoisdevices.db\n    ports:\n      # use 127.0.0.1:8000:8000\n      - \"8000:8000\"\n    volumes:\n      - database:/data\n      - /etc/localtime:/etc/localtime:ro\n    restart: always\n  worker:\n    build: ./docker/worker\n    environment:\n      - DB_PATH=/data/whoisdevices.db\n    volumes:\n      - database:/data\n      - /etc/localtime:/etc/localtime:ro\n    restart: always\n\nvolumes:\n  database:\n```\n\n### Envvars\n\n[`SECRET_KEY`](https://stackoverflow.com/questions/22463939/demystify-flask-app-secret-key#22463969) in .env\n\n### Finding the database contents\n\nLook for mountpoint via `docker inspect whois_db`\n\nIf you'd like to migrate from a previously running instance please copy the contents of db into current Docker volume\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhspsh%2Fwhohacks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhspsh%2Fwhohacks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhspsh%2Fwhohacks/lists"}