Refactor: Unified pipeline execution, simplified UI, and fixed Docker config

- Backend: Refactored tasks.py to directly invoke run_single_fna_pipeline.py for consistency.
- Backend: Changed output format to ZIP and added auto-cleanup of intermediate files.
- Backend: Fixed language parameter passing in API and tasks.
- Frontend: Removed CRISPR Fusion UI elements from Submit and Monitor views.
- Frontend: Implemented simulated progress bar for better UX.
- Frontend: Restored One-click load button and added result file structure documentation.
- Docker: Fixed critical Restarting loop by removing incorrect image directive in docker-compose.yml.
- Docker: Optimized Dockerfile to correct .pixi environment path issues and prevent accidental deletion of frontend assets.
This commit is contained in:
zly
2026-01-20 20:25:25 +08:00
parent 5067169b0b
commit c75c85c53b
134 changed files with 146457 additions and 996647 deletions

View File

@@ -27,14 +27,13 @@ git clone <repo>
cd bttoxin-pipeline
pixi install
# 2. Start services (Docker recommended for full stack)
# Using DaoCloud mirrors for faster builds in CN
docker compose -f docker/compose/docker-compose.traefik.yml up -d --build
# 2. Start services (Production with Traefik)
# Using the unified production configuration
docker compose -f docker/compose/docker-compose.traefik.yml -p compose up -d --build
# Access:
# Frontend: https://bttiaw.hzau.edu.cn (via Traefik)
# Backend API: http://localhost:8000 (Internal)
# Traefik Dashboard: http://localhost:8080
# Backend API: http://bttoxin-pipeline:8000 (Internal)
# 3. Development Mode (Local)
pixi run web-start
@@ -475,3 +474,28 @@ docker exec bttoxin-pipeline nginx -T
# Verify backend is running
docker exec bttoxin-pipeline curl http://127.0.0.1:8000/api/health
```
### Post-Mortem: Startup Failures & 404/403 Errors (2026-01 Update)
**Symptoms:**
- Website returns 404 Not Found or 403 Forbidden.
- Container stuck in `Restarting` loop.
- Logs show `exec: "uvicorn": executable file not found`.
**Root Causes & Solutions:**
1. **Missing Environment Config**:
- **Cause**: `pixi.toml` and `pixi.lock` were missing in the final Docker image phase.
- **Fix**: Ensure `COPY --from=builder /app/pixi.toml ...` is present in Dockerfile.
2. **Port Conflict**:
- **Cause**: `docker-compose.yml` mapped `80:80` while Traefik already occupied port 80.
- **Fix**: Remove `ports` mapping in compose file; rely on Docker internal network (`frontend`) and Traefik labels.
3. **Frontend Permissions**:
- **Cause**: Built frontend files owned by root were not readable by Nginx user.
- **Fix**: Add `RUN chmod -R 755 /var/www/html` in Dockerfile.
4. **Health Check Path**:
- **Cause**: Nginx routed `/health` to `/api/health` but backend expected `/health`.
- **Fix**: Update Nginx config to proxy pass to correct endpoint.