diff --git a/backend/app/main.py b/backend/app/main.py index e69de29..b3ffb6e 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -0,0 +1,40 @@ +from fastapi import FastAPI +from fastapi.middleware.cors import CORSMiddleware + +app = FastAPI( + title="TK-MP BOM System API", + description="BOM (Bill of Materials) 시스템 API", + version="1.0.0" +) + +# CORS 설정 +app.add_middleware( + CORSMiddleware, + allow_origins=["*"], + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + +@app.get("/") +async def root(): + return { + "message": "TK-MP BOM System API", + "version": "1.0.0", + "status": "running" + } + +@app.get("/health") +async def health_check(): + return { + "status": "healthy", + "database": "connected", + "api": "operational" + } + +@app.get("/api/projects") +async def get_projects(): + return { + "projects": [], + "message": "프로젝트 목록 (추후 데이터베이스 연결)" + } diff --git a/docker-compose.yml b/docker-compose.yml index c991268..ae8aad0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,7 +25,7 @@ services: container_name: tk-mp-pgadmin restart: unless-stopped environment: - PGADMIN_DEFAULT_EMAIL: admin@tkmp.local + PGADMIN_DEFAULT_EMAIL: admin@example.com PGADMIN_DEFAULT_PASSWORD: admin2025 PGADMIN_CONFIG_SERVER_MODE: 'False' ports: