-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Parent Issue: #54
Goal
Update Docker Compose and Dockerfile to install and run namespace packages.
Tasks
Step 4.1: Update Pixi configuration
- Update
pixi.tomlto add editable installs for all namespace packages - Remove root
pyproject.tomlif it exists
Step 4.2: Update Dockerfile for namespace packages
- Modify
Dockerfileto install packages in dependency order:- Install datamodels first (no internal dependencies)
- Install webservice (depends on datamodels)
- Install pipeline (depends on datamodels)
- Copy remaining files (alembic, configs)
Step 4.3: Refactor docker-compose.yml services
- Keep
dbservice (PostgreSQL) - Keep
prefect-serverservice - Rename
appservice toprefect-worker- Runs Prefect worker for pipeline tasks
- Command:
pixi run prefect worker start --pool default-pool
- Add new
apiservice- Runs FastAPI application
- Command:
pixi run uvicorn ca_biositing.webservice.main:app --host 0.0.0.0 --port 8000 - Exposes port 8000
- Depends on
dbservice
- Ensure proper networking between all services
- Add volume mounts for development
Step 4.4: Create docker-compose overrides
- Create
docker-compose.dev.yml- Enable hot reload for API
- Mount volumes for live code changes
- Enable debug mode
- Create
docker-compose.prod.yml(future)- Production optimizations
Step 4.5: Update .dockerignore
- Create/update
.dockerignorewith appropriate exclusions
Step 4.6: Update environment configuration
- Update
.env.examplewith all required variables:- Database configuration
- API configuration
- Prefect configuration
- Google Sheets credentials
Step 4.7: Test full stack with namespace packages
- Build containers:
docker-compose build - Start all services:
docker-compose up -d - Verify namespace package imports work
- Check service health:
- Database
- Prefect server
- API
- Prefect worker
- Run database migrations:
docker-compose exec api alembic upgrade head - Test running a flow:
docker-compose exec prefect-worker python run_prefect_flow.py - Update documentation with new Docker commands
Success Criteria
- All services start with
docker-compose up - Database health check passes
- Prefect server and worker connect successfully
- API accessible on configured port
- Pipeline can execute flows in container
- Namespace packages import correctly in all containers
Dependencies
- Depends on: Phase 1: Create Namespace Package Structure #56 (Phase 1) - namespace packages
- Depends on: Phase 3: Create Webservice Namespace Package #58 (Phase 3) - webservice package
Labels
Sub-task, phase-4, docker, infrastructure
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels