{"id":49890069,"url":"https://github.com/laurobmb/fastapi","last_synced_at":"2026-05-15T20:11:22.675Z","repository":{"id":39668752,"uuid":"275199075","full_name":"laurobmb/fastapi","owner":"laurobmb","description":"olá, esse repositório é um exemplo de caso usando a ferramenta FASTAPI dentro de um container para coletar dados do host, este repositório é voltado para estudo.","archived":false,"fork":false,"pushed_at":"2025-03-26T20:10:25.000Z","size":186,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T21:23:17.034Z","etag":null,"topics":["applicationset","docker","dockerfile","fastapi","kubernetes","kustomize","openshift","podman","python","python3","uvicorn"],"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/laurobmb.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-06-26T16:21:51.000Z","updated_at":"2025-03-26T20:10:29.000Z","dependencies_parsed_at":"2025-03-26T21:21:34.372Z","dependency_job_id":"1082a04e-efda-400c-97df-85d7d18b398e","html_url":"https://github.com/laurobmb/fastapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/laurobmb/fastapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurobmb%2Ffastapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurobmb%2Ffastapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurobmb%2Ffastapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurobmb%2Ffastapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laurobmb","download_url":"https://codeload.github.com/laurobmb/fastapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurobmb%2Ffastapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33078281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:05:40.333Z","status":"ssl_error","status_checked_at":"2026-05-15T20:05:38.672Z","response_time":103,"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":["applicationset","docker","dockerfile","fastapi","kubernetes","kustomize","openshift","podman","python","python3","uvicorn"],"created_at":"2026-05-15T20:11:21.698Z","updated_at":"2026-05-15T20:11:22.662Z","avatar_url":"https://github.com/laurobmb.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI using Docker\n\n[![Docker Repository on Quay](https://quay.io/repository/laurobmb/python_fastapi/status \"Docker Repository on Quay\")](https://quay.io/repository/laurobmb/python_fastapi)\n![Docker Stars](https://img.shields.io/docker/stars/laurobmb/fastapi.svg)\n![Docker Pulls](https://img.shields.io/docker/pulls/laurobmb/fastapi.svg)\n![Docker Automated](https://img.shields.io/docker/automated/laurobmb/fastapi.svg)\n![Docker Build](https://img.shields.io/docker/build/laurobmb/fastapi.svg)\n\nThis project is using FASTAPI inside a container. Just compile the Dockerfile and run it on the host\n\n## Build\n    podman build -t fastapi:v1.0 .\n## Execute\n    podman run -it -p 8000:8000 fastapi:v1.0\n## Deploy Kubernetes with YAML\n    kubectl apply -f k8s/deployment.yaml\n\n## Deploy OCP\n\n### Configurando projeto\n    oc new-project fastapi\n    \n### Deploy     \n    oc new-app --name fastapi --labels app=fastapi https://github.com/laurobmb/fastapi.git#master --context-dir app --strategy=docker --env ENVIROMENT=\"prod\"\n\n    oc new-app --name fastapi --labels app=fastapi https://github.com/laurobmb/fastapi.git#master --context-dir app --strategy=source --env ENVIROMENT=\"prod\"\n\n### Expor rota\n    oc -n fastapi expose service fastapi\n    \n    oc -n fastapi expose service fastapi --name fastapi-hml --hostname fastapi-fastapi.hml.lagomes.rhbr-lab.com\n\n    oc -n fastapi create route edge fastapi-tls --service fastapi\n\n### Create secret\n    oc -n fastapi create secret generic fastapi-secret --from-literal=username=admin --from-literal=password=secret\n    \n    oc -n fastapi set env --from=secret/fastapi-secret deployment/fastapi\n\n    oc -n fastapi set volume deployment/fastapi --name=secrets-vol --add --mount-path=/opt/secrets/ --secret-name=fastapi-secret --overwrite\n\n### Create configmap\n    oc -n fastapi create configmap fastapi-page --from-literal=index.html='\u003c!DOCTYPE html\u003e\u003chtml\u003e\u003ch1\u003e\u003cbody\u003eThis is a configmap file from production environment\u003c/h1\u003e\u003c/html\u003e'\n\n    oc -n fastapi set volume deployment/fastapi --name=page-vol --add --mount-path=/opt/config/ --configmap-name=fastapi-page --overwrite\n\n### Create resources limits\n    oc -n fastapi set resources deployment/fastapi --limits=cpu=200m,memory=128Mi --requests=cpu=100m,memory=64Mi\n\n    oc -n fastapi autoscale deployment fastapi --max 10 --min 3 --cpu-percent=80\n\n    oc -n fastapi create quota fastapi-quota --hard=cpu=500m,memory=500Mi\n\n### Create healthcheck\n    oc -n fastapi set probe deployment/fastapi --readiness --initial-delay-seconds=10 --timeout-seconds=30 --get-url=http://:8080/health\n    \n    oc -n fastapi set probe deployment/fastapi --liveness --initial-delay-seconds=10 --timeout-seconds=30 --get-url=http://:8080/health\n    \n    \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurobmb%2Ffastapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaurobmb%2Ffastapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurobmb%2Ffastapi/lists"}