{"id":16933430,"url":"https://github.com/bbc2/dockerfoo","last_synced_at":"2025-08-17T19:40:44.871Z","repository":{"id":188794140,"uuid":"679440493","full_name":"bbc2/dockerfoo","owner":"bbc2","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-16T10:14:59.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T03:43:18.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbc2.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}},"created_at":"2023-08-16T21:13:39.000Z","updated_at":"2023-08-16T21:15:26.000Z","dependencies_parsed_at":"2024-03-16T11:42:25.762Z","dependency_job_id":null,"html_url":"https://github.com/bbc2/dockerfoo","commit_stats":null,"previous_names":["bbc2/dockerfoo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bbc2/dockerfoo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc2%2Fdockerfoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc2%2Fdockerfoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc2%2Fdockerfoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc2%2Fdockerfoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbc2","download_url":"https://codeload.github.com/bbc2/dockerfoo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc2%2Fdockerfoo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270899433,"owners_count":24664712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-13T20:49:27.995Z","updated_at":"2025-08-17T19:40:44.799Z","avatar_url":"https://github.com/bbc2.png","language":"Python","readme":"# Dockerfoo\n\nDemonstration of a development environment with Docker Compose.\n\n## Prerequisites\n\n- Python Poetry\n- Docker Compose\n\n## Usage\n\n### Development\n\nBuild the container images:\n\n```sh\nmake build\n```\n\nSpin up the database:\n\n```sh\nmake serve\n```\n\nIf this is the first time you run this target, the makefile will generate secrets in\n`.secrets`.\n\nRun the CLI:\n\n```sh\nmake run-cli  # This opens a new shell in the CLI container.\n```\n\n```sh\ndockerfoo init\ndockerfoo seed --count 1000000\n```\n\nFor debugging, you can use the `pqsl` program:\n\n```sh\nmake run-db-ops  # This opens a new psql CLI connected to the database.\n```\n\n```pgsql\n\\d\nselect count(*) from tokens\n```\n\nIf you want to delete the database and start over:\n\n```sh\nmake reset-db  # This deletes the Docker volume containing the database files.\n```\n\n### Production\n\nTo use the CLI in production mode, set the following environment variable:\n\n```sh\nDF_MODE=prod make build run-cli\n```\n\nIn production mode, the container has only the production code and no mount point. By\ndefault, `DF_MODE` is `dev`.\n\n## Architecture\n\n### Environment\n\nAlmost everything runs in Docker. Notable exceptions are unit tests, code linting and\npackage updates.\n\n### Code\n\nThis project is currently primarily a CLI (`dockerfoo`) which can initialize and update\na database. However, this architecture should be suitable for a web application as well.\n\n```\nsrc/dockerfoo\n├── cli: CLI subcommands\n├── sql: SQLAlchemy models (no connection code)\n├── db: Database connection utilities\n└── util: Generic utilities (e.g. timing code)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc2%2Fdockerfoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbc2%2Fdockerfoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc2%2Fdockerfoo/lists"}