diff --git a/.gitignore b/.gitignore index 6cf9fe4..27d49d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,18 @@ +# IDE 및 에디터 설정 디렉토리 무시 +# VS Code와 Claude 등의 개발 도구가 생성하는 설정 파일이나 캐시 디렉토리를 제외합니다. +# 이는 개인 환경 설정이 다른 개발자에게 영향을 주지 않도록 합니다. .vscode/ -.claude/ \ No newline at end of file +.claude/ + +# Python 관련 파일 및 디렉토리 무시 +# Python 프로젝트에서 자동 생성되는 캐시, 컴파일된 바이트코드 파일 등을 제외합니다. +# 프로젝트의 깨끗한 상태를 유지하고, 불필요한 바이너리를 Git에 포함하지 않기 위함입니다. +__pycache__/ + +# Python 컴파일된 바이트코드 파일 무시 (확장자 패턴) +# .pyc, .pyo, .pyd 등의 컴파일된 파일을 무시합니다. +*.py[cod] + +# Python 클래스 파일 무시 (특정 패턴) +# $py.class 형식의 파일을 무시합니다. +*$py.class diff --git a/compose/web_service/nginx_uvicorn/docker-compose.yml b/compose/web_service/nginx_uvicorn/docker-compose.yml index 8531083..ec96ffd 100644 --- a/compose/web_service/nginx_uvicorn/docker-compose.yml +++ b/compose/web_service/nginx_uvicorn/docker-compose.yml @@ -39,7 +39,7 @@ services: - ../../../log:/log - ../../../config/app-server/uvicorn/:/uvicorn - ../../../script/logrotate/uvicorn/uvicorn:/etc/logrotate.d/uvicorn - command: bash -c "uv pip install --system --no-cache . && gunicorn -c /uvicorn/gunicorn_uvicorn.conf.py" + command: bash -c "uv pip install --system --no-cache . && exec gunicorn -c /uvicorn/gunicorn_uvicorn.conf.py" environment: TZ: "Asia/Seoul" restart: always diff --git a/config/web-server/nginx/gunicorn/conf.d/fastapi_sample_gunicorn_ng.conf b/config/web-server/nginx/gunicorn/conf.d/fastapi_sample_gunicorn_ng.conf index 93fac13..608d377 100644 --- a/config/web-server/nginx/gunicorn/conf.d/fastapi_sample_gunicorn_ng.conf +++ b/config/web-server/nginx/gunicorn/conf.d/fastapi_sample_gunicorn_ng.conf @@ -1,6 +1,6 @@ server { - listen 80; - server_name localhost www.localhost; + listen 80 default_server; # default_server 추가 + server_name localhost www.localhost; access_log /log/nginx/fastapi_sample.com.access.log main; error_log /log/nginx/fastapi_sample.com.error.log warn; @@ -10,7 +10,7 @@ server { gzip_static on; expires max; #alias /www/fastapi_sample/fastapi_sample/media; - alias /www/fastapi_sample/media; # your fastapi project's media files - amend as required + alias /www/app/media; # your fastapi project's media files - amend as required #include /etc/nginx/mime.types; } @@ -19,7 +19,7 @@ server { expires max; #alias /www/fastapi_sample/fastapi_sample/static; # normally static folder is named as /static - alias /www/fastapi_sample/static; # your fastapi project's static files - amend as required + alias /www/app/static; # your fastapi project's static files - amend as required #include /etc/nginx/mime.types; } @@ -32,7 +32,7 @@ server { # Allow Lets Encrypt Domain Validation Program location ^~ /.well-known/acme-challenge/ { allow all; - root /www/fastapi_sample; + root /www/app; } # Block dot file (.htaccess .htpasswd .svn .git .env and so on.) diff --git a/www/app/media/.gitkeep b/www/app/media/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/www/static/.gitkeep b/www/static/.gitkeep new file mode 100644 index 0000000..e69de29