{"id":13942204,"url":"https://github.com/samrocketman/docker-production-ready-flask","last_synced_at":"2026-03-19T09:20:43.166Z","repository":{"id":145441978,"uuid":"552666511","full_name":"samrocketman/docker-production-ready-flask","owner":"samrocketman","description":"This is an example app meant to package a Flask REST API in Docker meant for running in production contexts.","archived":false,"fork":false,"pushed_at":"2023-10-19T22:06:34.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-21T16:57:48.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samrocketman.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":"2022-10-17T03:16:14.000Z","updated_at":"2023-05-06T19:58:57.000Z","dependencies_parsed_at":"2024-04-10T13:54:11.377Z","dependency_job_id":"63780690-fbb0-4c36-97ab-142bb1e02d45","html_url":"https://github.com/samrocketman/docker-production-ready-flask","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samrocketman/docker-production-ready-flask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocketman%2Fdocker-production-ready-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocketman%2Fdocker-production-ready-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocketman%2Fdocker-production-ready-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocketman%2Fdocker-production-ready-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samrocketman","download_url":"https://codeload.github.com/samrocketman/docker-production-ready-flask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocketman%2Fdocker-production-ready-flask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29777635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T04:54:30.205Z","status":"ssl_error","status_checked_at":"2026-02-24T04:53:58.628Z","response_time":75,"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":[],"created_at":"2024-08-08T02:01:45.004Z","updated_at":"2026-02-24T09:05:22.327Z","avatar_url":"https://github.com/samrocketman.png","language":"Makefile","funding_links":[],"categories":["Makefile"],"sub_categories":[],"readme":"# Purpose\n\nCreate the smallest feasible Docker container for a Python flask app using a\nproduction-ready WSGI server.\n\nFollow Python, Flask, and Docker best practices:\n\n- Python\n  - Flake8 formatted code.\n  - Organize code into modules.\n  - Unit tests with pytest.\n  - Code coverage report generated from unit tests.\n- Flask\n  - Run Flask from a production WSGI server; Apache httpd\n  - Web server supports HTTP/2.\n- Docker\n  - PID 1 init program to handle process signals and child processes.\n  - Web server starts in foreground.\n  - Web server logs to stdout and stderr to be handled by Docker instead of\n    writing logs to disk.\n\n# Running Docker container\n\nThe resulting Docker image is `flask`.  To build and start web service run the\nfollowing.\n\n    make serve\n\nOpen in a web browser:\n\n* http://localhost:8080 to see the JSON API response.\n* http://localhost:8080/media/example.txt example asset\n\nRun tests with\n\n    make test\n\n# ARM image support\n\nThe restulting Docker image is `flaskarm`.\n\nBuilding an arm image from an amd64 machines (in my case Ubuntu) requires some\nextra packages to be installed on the host.\n\n    sudo apt install -y qemu-user-static binfmt-support\n\nThen, you can run the ARM version of the flask app.\n\n    make serve-arm\n\nTests can be run as well.\n\n    make test-arm\n\n# Result\n\nFlask app running apache2 runs as a normal user (`apache`) via wsgi.  Final\ncontainer size is just under 62MB.\n\nComplete with unit testing and 100% test coverage.\n\n# License\n\nCC0 or Public Domain\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrocketman%2Fdocker-production-ready-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamrocketman%2Fdocker-production-ready-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrocketman%2Fdocker-production-ready-flask/lists"}