Fix static directory path in main.py for Docker deployment

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2025-12-25 15:24:30 -08:00
parent b9291861da
commit b2e85b758a
2 changed files with 5 additions and 27 deletions

View File

@@ -1,6 +1,6 @@
# FitTrack2 Development Guidelines # FitTrack2 Development Guidelines
Auto-generated from all feature plans. Last updated: 2025-12-25 Auto-generated from all feature plans. Last updated: 2025-12-22
## Active Technologies ## Active Technologies
@@ -10,35 +10,13 @@ Auto-generated from all feature plans. Last updated: 2025-12-25
```text ```text
backend/ backend/
├── alembic/
├── src/
│ ├── models/
│ ├── services/
│ ├── api/
│ └── utils/
├── templates/
├── static/
├── main.py
├── requirements.txt
└── Dockerfile
frontend/ frontend/
tests/ tests/
└── integration/
└── test_sync_flow.py
``` ```
## Commands ## Commands
```bash # Add commands for
# Run the application
docker-compose up --build
# Run tests
python -m pytest tests/
# Run migrations
alembic upgrade head
```
## Code Style ## Code Style
@@ -46,7 +24,7 @@ alembic upgrade head
## Recent Changes ## Recent Changes
- 001-fitbit-garmin-sync: Added complete implementation for Fitbit-Garmin synchronization, including weight sync, activity archiving, and health metrics download - 001-fitbit-garmin-sync: Added
<!-- MANUAL ADDITIONS START --> <!-- MANUAL ADDITIONS START -->
<!-- MANUAL ADDITIONS END --> <!-- MANUAL ADDITIONS END -->

View File

@@ -32,7 +32,7 @@ async def lifespan(app: FastAPI):
logger.info("--- Application Shutting Down ---") logger.info("--- Application Shutting Down ---")
app = FastAPI(lifespan=lifespan) app = FastAPI(lifespan=lifespan)
app.mount("/static", StaticFiles(directory="static"), name="static") app.mount("/static", StaticFiles(directory="../static"), name="static")
templates = Jinja2Templates(directory="templates") templates = Jinja2Templates(directory="templates")
from src.api import status, sync, setup, logs, metrics, activities from src.api import status, sync, setup, logs, metrics, activities