{"id":14064992,"url":"https://github.com/trstringer/python-flask-docker-compose-debugging","last_synced_at":"2025-08-11T21:44:03.725Z","repository":{"id":147740243,"uuid":"117444729","full_name":"trstringer/python-flask-docker-compose-debugging","owner":"trstringer","description":":bug: Sample application to help illustrate how to break into the debugger in a Python Flask application running as a container in Docker Compose","archived":false,"fork":false,"pushed_at":"2018-06-08T08:15:24.000Z","size":2,"stargazers_count":19,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-31T00:41:21.676Z","etag":null,"topics":["compose","container","debugging","docker","flask","python"],"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/trstringer.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-14T16:01:14.000Z","updated_at":"2025-03-21T09:31:38.000Z","dependencies_parsed_at":"2023-05-27T09:15:12.499Z","dependency_job_id":null,"html_url":"https://github.com/trstringer/python-flask-docker-compose-debugging","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/trstringer%2Fpython-flask-docker-compose-debugging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fpython-flask-docker-compose-debugging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fpython-flask-docker-compose-debugging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fpython-flask-docker-compose-debugging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trstringer","download_url":"https://codeload.github.com/trstringer/python-flask-docker-compose-debugging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252592269,"owners_count":21773230,"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":["compose","container","debugging","docker","flask","python"],"created_at":"2024-08-13T07:04:13.462Z","updated_at":"2025-05-05T23:27:52.745Z","avatar_url":"https://github.com/trstringer.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Debugging a Python Flask app in Docker Compose\n\nThis is the companion repository to [this blog post (Medium)](https://medium.com/@trstringer/debugging-a-python-flask-application-in-a-container-with-docker-compose-fa5be981ec9a)\n\n## Running the application\n\n```\n$ docker-compose run --build -d\n```\n\n## Debugging the application\n\nIf changes were made to the file (e.g. added breakpoint), build first...\n\n```\n$ docker-compose build\n```\n\nRun the application in Docker Compose but specify a particular command...\n\n```\n$ docker-compose run -p 8000:8000 svc1 python3 -m pdb app.py\n```\n\nDebug the application as you would any other Python application\n\n## Interacting with the application\n\n### Display simple message\n\n```\n$ curl localhost:8000\n```\n\n### Add message to application (Redis cache)\n\n```\n$ curl -X POST localhost:8000/message/\u003cmessage_to_add\u003e\n```\n\n### Get message from application (stored in Redis)\n\n```\n$ curl -X POST localhost:8000/message\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrstringer%2Fpython-flask-docker-compose-debugging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrstringer%2Fpython-flask-docker-compose-debugging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrstringer%2Fpython-flask-docker-compose-debugging/lists"}