{"id":15878929,"url":"https://github.com/azhar22k/docker-flask","last_synced_at":"2026-04-11T06:05:29.535Z","repository":{"id":53115418,"uuid":"251562560","full_name":"azhar22k/docker-flask","owner":"azhar22k","description":"Dockerised flask app configured to run on k8s as well","archived":false,"fork":false,"pushed_at":"2023-05-01T21:23:57.000Z","size":12,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T15:33:06.413Z","etag":null,"topics":["docker","docker-compose","flask","k8s","kompose","python","virtualenv"],"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/azhar22k.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":"2020-03-31T09:51:44.000Z","updated_at":"2021-04-06T04:39:46.000Z","dependencies_parsed_at":"2024-10-27T10:03:53.029Z","dependency_job_id":"1467f3a5-ce73-4a8c-b063-3130aca4a0f8","html_url":"https://github.com/azhar22k/docker-flask","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/azhar22k%2Fdocker-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azhar22k%2Fdocker-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azhar22k%2Fdocker-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azhar22k%2Fdocker-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azhar22k","download_url":"https://codeload.github.com/azhar22k/docker-flask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246730260,"owners_count":20824396,"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":["docker","docker-compose","flask","k8s","kompose","python","virtualenv"],"created_at":"2024-10-06T02:42:22.966Z","updated_at":"2025-12-30T23:12:24.503Z","avatar_url":"https://github.com/azhar22k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-flask\nDockerised flask app configured to run on k8s as well\n\n# Workflow\n\n```\nFirst clone this repo locally\n```\n\nThe app can be run in 3 ways\n\n* [Python virtualenv](#virtualenv)\n* [Docker](#docker)\n* [Kubernetes(k8s)](#kubernetes)\n\n## Virtualenv\n\n1. Create and setup virtual environment\n```shell\npython3 -m venv venv;\nsource venv/bin/activate;\npython3 -r requirements.text;\n```\n\n2. Start App\n\n```shell\npython3 app.py;\n```\n\n3. Stop and deactivate virtualenv\n\n```bash\nCtrl+c\ndeactivate;\n```\n\n## Docker\n\n1. Setup `.env` file (To see the values required check [.env.sample](.env.sample))\n2. Start Service\n\n```shell\ndocker-compose --compatibility up;\n```\n\n3. Stop Service\n\n```shell\nCtrl+c\n```\n\n## Kubernetes\n\n1. Install kompose\n\n```shell\nbrew install kompose;\n```\n\n2. Convert `docker-compose.yml` to `kubectl` compatible files\n\n```shell\nkompose convert;\n```\n\n3. Create a namespace for your resource\n\n```shell\nkubectl create namespace demo;\n```\n\n4. Deploy your code to kubernetes\n\n```shell\nkubectl apply \\\n    -f env-configmap.yaml \\\n    -f docker-flask-deployment.yaml \\\n    -f docker-flask-service.yaml \\\n    -n demo;\n```\n\n5. Get Inro About the App\n\n```shell\nkubectl get deployment,service,pods -n demo;\n```\n\n6. Remove Everything\n\n```shell\nkubectl delete namespace demo;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazhar22k%2Fdocker-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazhar22k%2Fdocker-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazhar22k%2Fdocker-flask/lists"}