Docker Setup
Quick Start
git clone <buem-repository-url>
cd buem
docker compose up
The API is now available at http://localhost:5000. Test it:
curl http://localhost:5000/api/health
Environment Variables
Variable |
Default |
Description |
|---|---|---|
|
|
Weather CSV directory (mounted read-only) |
|
|
Output directory for timeseries files |
|
|
Path to the CBC solver binary (used by MILP path) |
Volume Mounts
The provided docker-compose.yml mounts:
./src/buem/data/weather→/app/data/weather(read-only)./src/buem/logs→/app/logs./results→/app/results
Manual Build
docker build -t buem:latest .
docker run -d --name buem-api \
-p 5000:5000 \
-v $(pwd)/src/buem/data/weather:/app/data/weather:ro \
-v $(pwd)/results:/app/results \
buem:latest
Health Check
The Compose file includes a health check that calls /api/health every
30 s. Monitor with:
docker compose ps
docker compose logs buem-api
services:
buem:
# ... buem configuration
deploy:
replicas: 3
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
Troubleshooting
Common Issues
Weather data not found: Ensure proper volume mounting and file permissions
Port conflicts: Check that port 5000 is available
Memory issues: Increase container memory limits for large building datasets
Debug Mode
Run container in debug mode:
docker run -it --rm \\
-p 5000:5000 \\
-e FLASK_ENV=development \\
buem:latest
Next Steps
Once your container is running, proceed to API Endpoints to learn about the available API endpoints.