Very Good Web Server Work

This commit is contained in:
Wind
2026-02-13 18:40:48 +09:00
parent 18fa480c84
commit d4f1ca87ab
12 changed files with 1369 additions and 1352 deletions

View File

@@ -9,9 +9,11 @@ services:
POSTGRES_USER: asset_user
POSTGRES_PASSWORD: ${DB_PASSWORD:-assetpilot}
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --locale=C"
TZ: Asia/Seoul
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-db:/docker-entrypoint-initdb.d
- /etc/localtime:/etc/localtime:ro
ports:
- "5432:5432"
networks:
@@ -27,7 +29,8 @@ services:
build:
context: .
dockerfile: Dockerfile
# DNS 설정 (빌드 밖으로 이동)
# 📌 command를 여기(app 서비스 내부)에 넣었습니다.
command: uvicorn main:app --host 0.0.0.0 --port 8000
dns:
- 8.8.8.8
- 1.1.1.1
@@ -37,18 +40,21 @@ services:
postgres:
condition: service_healthy
environment:
# DB 비밀번호 기본값을 postgres 서비스와 동일하게 'assetpilot'으로 설정
DATABASE_URL: postgresql://asset_user:${DB_PASSWORD:-assetpilot}@postgres:5432/asset_pilot
APP_HOST: 0.0.0.0
APP_PORT: 8000
DEBUG: "False"
FETCH_INTERVAL: 5
TZ: Asia/Seoul
ports:
- "8000:8000"
networks:
- asset_pilot_network
volumes:
- .:/app
- app_logs:/app/logs
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s