Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/deploy-fastapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
echo "LOKI_PASSWORD=${{ secrets.LOKI_PASSWORD }}" >> .env.prod
echo "ENV_NAME=${{ secrets.ENV_NAME }}" >> .env.prod
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> .env.prod
echo "MODE=prd" >> .env.prod

- name: Set repo lowercase
run: echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion apps/pre-processing-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ COPY . .


# (권장 대안) 코드에서 uvicorn import 안 하고 프로세스 매니저로 실행하려면:
CMD ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "app.main:app", "-b", "0.0.0.0:8000"]
ENTRYPOINT ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "app.main:app", "-b", "0.0.0.0:8000"]
6 changes: 4 additions & 2 deletions apps/pre-processing-service/app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ class BaseSettingsConfig(BaseSettings):
mecab_path: Optional[str] = None

# Loki 설정
loki_host: str = "localhost"
loki_host: str
loki_username: str
loki_password: str
loki_port: int = 3100

# 테스트/추가용 필드
Expand All @@ -106,7 +108,7 @@ def db_url(self) -> str:
f"@{self.db_host}:{self.db_port}/{self.db_name}"
)

model_config = SettingsConfigDict(env_file=[".env"])
model_config = SettingsConfigDict(env_file=[".env"], extra="ignore")


# 환경별 설정 클래스
Expand Down
4 changes: 2 additions & 2 deletions docker/production-fastapi/promtail-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ scrape_configs:
__path__: /logs/production/app.log
pipeline_stages:
- regex:
expression:
expression: '^\[(?P<traceId>[^\]]*)\] (?P<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}) \| (?P<level>\w+) \| (?P<logger>[^:]+:[^:]+:\d+) \| (?P<message>.*)$'
- labels:
traceId:
level:
Expand All @@ -39,7 +39,7 @@ scrape_configs:
__path__: /logs/production/error.log
pipeline_stages:
- regex:
expression:
expression: '^\[(?P<traceId>[^\]]*)\] (?P<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}) \| (?P<level>\w+) \| (?P<logger>[^:]+:[^:]+:\d+) \| (?P<message>.*)$'
- labels:
traceId:
level:
Expand Down
Loading