{"id":18577340,"url":"https://github.com/pjt3591oo/fastapi-logging-example","last_synced_at":"2025-08-25T05:19:02.989Z","repository":{"id":184739551,"uuid":"672395894","full_name":"pjt3591oo/fastapi-logging-example","owner":"pjt3591oo","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-19T03:02:09.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-16T01:33:48.700Z","etag":null,"topics":[],"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/pjt3591oo.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":"2023-07-29T23:56:51.000Z","updated_at":"2023-07-30T10:25:10.000Z","dependencies_parsed_at":"2024-11-06T23:31:46.061Z","dependency_job_id":null,"html_url":"https://github.com/pjt3591oo/fastapi-logging-example","commit_stats":null,"previous_names":["pjt3591oo/fastapi-logging-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pjt3591oo/fastapi-logging-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjt3591oo%2Ffastapi-logging-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjt3591oo%2Ffastapi-logging-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjt3591oo%2Ffastapi-logging-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjt3591oo%2Ffastapi-logging-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pjt3591oo","download_url":"https://codeload.github.com/pjt3591oo/fastapi-logging-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjt3591oo%2Ffastapi-logging-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272008786,"owners_count":24857658,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-06T23:28:50.966Z","updated_at":"2025-08-25T05:19:02.930Z","avatar_url":"https://github.com/pjt3591oo.png","language":"Python","readme":"# fastapi 로깅\n\n```bash\n$ uvicorn main:app --host 0.0.0.0 --port 8000 --workers 3 --log-config log.ini\n```\n\n## 도커\n\n* 이미지 빌드\n\n```bash\n$ docker build . -t fastapi-my-service:0.1\n```\n\n* 컨테이너 실행\n\n```bash\n$ docker run -d -p 8000:80 --name my-service fastapi-my-service:0.1\n```\n\n## 도커 컴포즈\n\n```bash\n$ docker-compose up\n```\n\n* 백그라운드 모드\n\n```bash\n$ docker-compose up -d\n```\n\n### LB - 가중치 설정\n\n```\nuser  nginx;\nworker_processes  auto;\nerror_log  /var/log/nginx/error.log warn;\npid        /var/run/nginx.pid;\n\nevents {\n    worker_connections  1024;\n}\n\nhttp {\n  include       /etc/nginx/mime.types;\n  default_type  application/octet-stream;\n\n\t# API 서버 업스트림\n  upstream api-server {\n    server api-1:80 weight=3;\n    server api-2:80 weight=1;\n  }\n\n  server {\n    listen 8080;\n\n    # /api 경로로 요청된 트래픽은 업스트림 api-server로 전달\n    location / {\n        proxy_pass http://api-server;\n    }\n\n  }\n\n  log_format  main  '$remote_addr - $remote_user [$time_local] \"$request\" '\n                    '$status $body_bytes_sent \"$http_referer\" '\n                    '\"$http_user_agent\" \"$http_x_forwarded_for\"';\n  access_log  /var/log/nginx/access.log  main;\n\n  sendfile        on;\n  keepalive_timeout  65;\n  include /etc/nginx/conf.d/*.conf;\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjt3591oo%2Ffastapi-logging-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpjt3591oo%2Ffastapi-logging-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjt3591oo%2Ffastapi-logging-example/lists"}