{"id":26398449,"url":"https://github.com/claudimf/containerized_python_web_app","last_synced_at":"2026-04-13T10:32:12.022Z","repository":{"id":86373928,"uuid":"335052852","full_name":"claudimf/containerized_python_web_app","owner":"claudimf","description":null,"archived":false,"fork":false,"pushed_at":"2021-02-02T18:49:55.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T12:40:03.101Z","etag":null,"topics":["docker","docker-compose","flask","flask-application","nginx","nginx-configuration","nginx-docker","nginx-server","python"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/claudimf.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":"2021-02-01T18:57:28.000Z","updated_at":"2021-02-02T18:50:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c12c0d6-9698-4d60-ab86-0c27adc5b87d","html_url":"https://github.com/claudimf/containerized_python_web_app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/claudimf/containerized_python_web_app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claudimf%2Fcontainerized_python_web_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claudimf%2Fcontainerized_python_web_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claudimf%2Fcontainerized_python_web_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claudimf%2Fcontainerized_python_web_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/claudimf","download_url":"https://codeload.github.com/claudimf/containerized_python_web_app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claudimf%2Fcontainerized_python_web_app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31749027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["docker","docker-compose","flask","flask-application","nginx","nginx-configuration","nginx-docker","nginx-server","python"],"created_at":"2025-03-17T12:30:34.044Z","updated_at":"2026-04-13T10:32:11.999Z","avatar_url":"https://github.com/claudimf.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Containerized Python Web App(conteinerização de aplicação Web em Python)\n\n👋 Olá, Seja Bem-vindo(a) ao Containerized Python Web App(conteinerização de aplicação Web em Python).\n\n# Exigências\n\n**:warning: Atenção:** É necessário que os desenvolvedores usem o Docker no seu ambiente de desenvolvimento.\n\n- **🛠 Modo Desenvolvimento Docker**\n    - :computer: [Linux Ubuntu LTS](https://ubuntu.com/download/desktop)\n    - 🐳 [Docker](https://docs.docker.com/engine/installation/) Deve estar instalado.\n    - 🐳 [Docker Compose](https://docs.docker.com/compose/) Deve estar instalado.\n    - **💡 Dica:** [Documentação do Docker](https://docs.docker.com/)\n\n# Instalando\n\n## 🐳 Modo Desenvolvimento com Docker\n\nApós instalar o docker e docker-compose, estando na pasta raiz do projeto, execute:\n\n```sh\ndocker-compose up\n```\n\nPara se certificar que os seus containers subiram corretamente, todos os containers deve estar com o status `UP`, execute:\n\n```sh\ndocker-compose ps -a\n```\n\nPara acessar o container da aplicação, execute:\n\n```sh\ndocker-compose run --rm app bash\n```\n\nPara derrubar e subir a instância do docker novamente, execute:\n\n```sh\ndocker-compose down \u0026\u0026 docker-compose up\n```\n\n🚀 :clap: Para visualizar o sistema basta acessar no navegador no endereço: [localhost:3000](http://localhost:3000)\n\n\n# Criar a aplicação\n\n1. Criar a estrutura abaixo de diretórios e arquivos:\n\n```sh\nProject\n├─── web\n| └─── Dockerfile\n├─── app\n│ ├─── Dockerfile\n│ ├─── requirements.txt\n│ └─── src\n│ └─── server.py\n└─── db\n  └─── password.txt\n```\n\n2. Confira aqui o que a configuração do arquivo [server.py](https://github.com/claudimf/containerized_python_web_app/blob/main/app/src/server.py) com o seguinte conteúdo:\n\n3. No arquivo [requirements.txt](https://github.com/claudimf/containerized_python_web_app/blob/main/app/requirements.txt) adicionar o [Flask](https://flask.palletsprojects.com/en/1.1.x/) e o [MySql Connector](https://flask.palletsprojects.com/en/1.1.x/):\n\n```sh\nFlask==1.1.1\nmysql-connector==2.2.9\n```\n\n4. Criar o arquivo [Dockerfile](https://github.com/claudimf/containerized_python_web_app/blob/main/app/Dockerfile) na pasta app com o seguinte conteúdo:\n\n```sh\nFROM python:3.8-alpine\nWORKDIR /src\nCOPY requirements.txt .\nRUN pip install -r requirements.txt\nCOPY ./src /src\nEXPOSE 5000\nCMD python server.py\n```\n\n5. Na pasta app connstrua a aplicação no terminal com o comando:\n\n```sh\ndocker-compose build\n```\n\n6. Suba o projeto no terminal com o comando:\n\n```sh\ndocker-compose up\n```\n\n7. Para testar acesse as rotas:\n- [localhost:3000](http://localhost:3000)\n- [localhost:3000/blogs](http://localhost:3000/blogs)\n\nPronto a aplicação de teste está de pé, para derrubar use o comando:\n\n```sh\ndocker-compose down\n```\n\nEspero que tenha conseguido subir a aplicação Flask + Docker via docker-compose, caso haja dúvidas acesse as [Referências utilizadas](https://github.com/claudimf/containerized_python_web_app#refer%C3%AAncias-utilizadas).\n\n# Referências utilizadas\n\n\n[1° Conteinerização de scripts em Python](https://github.com/claudimf/containerized_python) \n\n[2° Containerized Python Development – Part 2](https://www.docker.com/blog/containerized-python-development-part-2/)  \n\n[3° Containerized Python Development – Part 3](https://www.docker.com/blog/containerized-python-development-part-3/)  \n\n[4° Project sample](https://github.com/aiordache/demos/tree/master/dockercon2020-demo)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaudimf%2Fcontainerized_python_web_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaudimf%2Fcontainerized_python_web_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaudimf%2Fcontainerized_python_web_app/lists"}