- Synthesised one hybrid entry (Tesla Powerwall 3, installed price €9500) appended to the catalog. Tagged installation: hybrid; LP runs with allows_export=True for those. - Replaced single 'plug-in only' checkbox with three category filters: ≤0.8 kW plug-in, ≤2.5 kW plug-in, Hybrid/DC-coupled. Default: all on. Filter selection persists in localStorage. - API now tags every row with a category so the JS can filter without re-fetching. SSR rows carry data-category for first-paint filtering. - Store quote left blank for hybrids since thuisbatterijgids.net only models plug-in arithmetic.
28 lines
823 B
Docker
28 lines
823 B
Docker
FROM python:3.12-slim
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
|
PIP_NO_CACHE_DIR=1 \
|
|
PYTHONPATH=/app/src
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies only (not the package itself), so the source tree at
|
|
# /app stays the runtime layout the app expects: web.py uses
|
|
# Path(__file__).resolve().parents[2] / "data" / "raw" to find CSVs, which
|
|
# only resolves correctly when the package is imported from /app/src.
|
|
COPY pyproject.toml uv.lock ./
|
|
RUN pip install --no-cache-dir uv \
|
|
&& uv pip install --system --no-cache \
|
|
"pandas>=2.2" "scipy>=1.13" "numpy>=2.0" "flask>=3.0" "gunicorn>=21.0"
|
|
|
|
COPY src ./src
|
|
COPY data ./data
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ["gunicorn", "pluginbattery.web:app", \
|
|
"--bind", "0.0.0.0:8080", \
|
|
"--workers", "1", \
|
|
"--timeout", "120"]
|