{"id":16526231,"url":"https://github.com/sbathgate/tdd-flask-docker","last_synced_at":"2026-06-07T03:32:04.948Z","repository":{"id":47203952,"uuid":"262923330","full_name":"sbathgate/tdd-flask-docker","owner":"sbathgate","description":null,"archived":false,"fork":false,"pushed_at":"2021-09-08T15:43:01.000Z","size":46,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T15:15:19.986Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbathgate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-11T02:52:28.000Z","updated_at":"2020-05-19T17:54:02.000Z","dependencies_parsed_at":"2022-09-06T05:02:06.241Z","dependency_job_id":null,"html_url":"https://github.com/sbathgate/tdd-flask-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbathgate%2Ftdd-flask-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbathgate%2Ftdd-flask-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbathgate%2Ftdd-flask-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbathgate%2Ftdd-flask-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbathgate","download_url":"https://codeload.github.com/sbathgate/tdd-flask-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241605740,"owners_count":19989608,"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","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-11T17:26:42.804Z","updated_at":"2026-06-07T03:32:04.243Z","avatar_url":"https://github.com/sbathgate.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tdd-flask-docker\r\n\r\n[![pipeline status](https://gitlab.com/sbathgate/flask-tdd-docker/badges/master/pipeline.svg)](https://gitlab.com/sbathgate/flask-tdd-docker/commits/master)\r\n\r\n## Quick start\r\n* Clone GitLab Repo: `$ git clone https://gitlab.com/sbathgate/flask-tdd-docker.git`\r\n* Switch to project root: `$ cd flask-tdd-docker/`\r\n* Build the images: `$ docker-compose build`\r\n* Run the containers: `$ docker-compose up -d`\r\n* Create the database: `$ docker-compose exec users python manage.py recreate_db`\r\n* Seed the database: `$ docker-compose exec users python manage.py seed_db`\r\n\r\n\r\n## File Structure\r\n#### Within the download you'll find the following directories and files:\r\n```\r\n├── .coverage\r\n├── .coveragerc\r\n├── .dockerignore\r\n├── .gitignore\r\n├── .gitlab-ci.yml\r\n├── Dockerfile\r\n├── Dockerfile.prod\r\n├── README.md\r\n├── docker-compose.yml\r\n├── entrypoint.sh\r\n├── htmlcov\r\n├── manage.py\r\n├── project\r\n│   ├── __init__.py\r\n│   ├── api\r\n│   │   ├── __init__.py\r\n│   │   ├── ping.py\r\n│   │   └── users\r\n│   │       ├── __init__.py\r\n│   │       ├── admin.py\r\n│   │       ├── models.py\r\n│   │       ├── crud.py\r\n│   │       └── views.py\r\n│   ├── config.py\r\n│   ├── db\r\n│   │   ├── Dockerfile\r\n│   │   └── create.sql\r\n│   └── tests\r\n│       ├── __init__.py\r\n│       ├── conftest.py\r\n│       ├── pytest.ini\r\n│       ├── test_admin.py\r\n│       ├── test_config.py\r\n│       ├── test_ping.py\r\n│       ├── test_users.py\r\n│       └── test_users_unit.py\r\n├── release.sh\r\n├── requirements-dev.txt\r\n├── requirements.txt\r\n└── setup.cfg\r\n```\r\n\r\n## Common Commands\r\n#### Build the images:\r\n```$ docker-compose build```\r\n\r\n#### Run the containers:\r\n```$ docker-compose up -d```\r\n\r\n#### Create the database:\r\n```$ docker-compose exec users python manage.py recreate_db```\r\n\r\n#### Seed the database:\r\n```$ docker-compose exec users python manage.py seed_db```\r\n\r\n#### Run the tests:\r\n```$ docker-compose exec users python -m pytest \"project/tests\" -p no:warnings```\r\n\r\n#### Run the tests with coverage:\r\n```$ docker-compose exec users python -m pytest \"project/tests\" -p no:warnings --cov=\"project\"```\r\n\r\n#### Lint:\r\n```$ docker-compose exec users flake8 project```\r\n\r\n#### Run Black and isort with check options:\r\n```$ docker-compose exec users black project --check```\r\n```$ docker-compose exec users /bin/sh -c \"isort project/**/*.py --check-only\"```\r\n\r\n#### Make code changes with Black and isort:\r\n```$ docker-compose exec users black project```\r\n```$ docker-compose exec users /bin/sh -c \"isort project/**/*.py\"```\r\n\r\n### Other Commands\r\n#### To stop the containers:\r\n```$ docker-compose stop```\r\n\r\n#### To bring down the containers:\r\n```$ docker-compose down```\r\n\r\n#### Want to force a build?\r\n```$ docker-compose build --no-cache```\r\n\r\n#### Remove images:\r\n```$ docker rmi $(docker images -q)```\r\n\r\n### Postgres\r\n#### Want to access the database via psql?\r\n```$ docker-compose exec users-db psql -U postgres```\r\n\r\n##### Then, you can connect to the database and run SQL queries. For example:\r\n```# \\c users_dev```\r\n```# select * from users;```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbathgate%2Ftdd-flask-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbathgate%2Ftdd-flask-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbathgate%2Ftdd-flask-docker/lists"}