Adds a full pensions feature: SIPP/workplace DC/LISA account metadata, contribution recording with relief-at-source/net-pay/salary-sacrifice gross calculations, state pension tracker, annual allowance monitor, and LISA summary. Pension contributions feed into the tax report (RAS gross totals, allowance used). Includes two Alembic migrations, backend service/schema/API, and full frontend pensions page with cards for allowance, state pension, LISA, and retirement projection. Also fixes CSRF cookie secure flag (must be false for HTTP deployments) and extends tax schemas/service to expose pension data in the report. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 lines
1.2 KiB
Docker
40 lines
1.2 KiB
Docker
FROM python:3.12-slim AS base
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libmagic1 \
|
|
postgresql-client \
|
|
gnupg \
|
|
gzip \
|
|
gosu \
|
|
tesseract-ocr \
|
|
tesseract-ocr-eng \
|
|
poppler-utils \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
RUN pip install --no-cache-dir uv
|
|
WORKDIR /app
|
|
COPY pyproject.toml ./
|
|
|
|
FROM base AS deps
|
|
RUN uv pip install --system --no-cache -e .
|
|
|
|
FROM deps AS test
|
|
COPY app/ ./app/
|
|
COPY alembic/ ./alembic/
|
|
COPY alembic.ini ./
|
|
COPY tests/ ./tests/
|
|
RUN uv pip install --system --no-cache "pytest>=8" "pytest-asyncio>=0.20" "fakeredis[aioredis]" "httpx>=0.27"
|
|
CMD ["python", "-m", "pytest", "tests/", "-v", "--tb=short"]
|
|
|
|
FROM deps AS production
|
|
COPY app/ ./app/
|
|
COPY alembic/ ./alembic/
|
|
COPY alembic.ini ./
|
|
COPY scripts/ ./scripts/
|
|
RUN useradd -r -s /bin/false -u 1001 appuser \
|
|
&& chown -R appuser /app \
|
|
&& mkdir -p /app/uploads /app/backups \
|
|
&& chown appuser /app/uploads /app/backups
|
|
COPY scripts/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
EXPOSE 8000
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["sh", "-c", "python -m alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 2 --proxy-headers"]
|