Files
photos.kennethreitz.org/Dockerfile
T
kennethreitz 9507fe901c Add photo manager, folder importer, Postgres Celery broker, UI polish
- Photo manager (/manage/) with multi-select, bulk visibility/delete,
  faceted filtering by camera/lens/year, add-to-collection with inline
  creation
- import_folder management command with concurrent workers
- Use Postgres as Celery broker in production (no Redis needed on Fly)
- Add Celery worker process to fly.toml
- Thread fallback for image processing when Celery unavailable
- Collection list with image preview cards
- CSS cache-busting via content hash
- Fix empty UUID validation errors in bulk actions
- Makefile: remove redis start/stop (now a brew service)
- Switch to ManifestStaticFilesStorage for production

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:02:49 -04:00

32 lines
845 B
Docker

FROM python:3.14-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# Build tools for django-bolt (Rust/maturin)
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc libc6-dev curl && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal && \
rm -rf /var/lib/apt/lists/*
ENV PATH="/root/.cargo/bin:${PATH}"
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# Install dependencies first (cached layer)
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
# Copy project
COPY . .
# Collect static files
RUN uv run python manage.py collectstatic --noinput
EXPOSE 8000
# Default command — overridden by fly.toml [processes]
CMD ["uv", "run", "python", "manage.py", "runbolt", "--host", "0.0.0.0", "--port", "8000"]