Offline-first photo capture app for Nextcloud with: - Camera capture with continuous mode (auto-reopens after each photo) - File browser with fullscreen image gallery, swipe navigation, and rename - Upload queue with background sync engine - Admin panel for Nextcloud user management - Service worker for offline-first caching (v13) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
46 lines
1.0 KiB
Docker
46 lines
1.0 KiB
Docker
FROM python:3.11-slim
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
curl \
|
|
libheif-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Create directories for runtime data
|
|
RUN mkdir -p /tmp/flask_session && \
|
|
chmod 777 /tmp/flask_session
|
|
|
|
# Create non-root user for security
|
|
RUN useradd -m -u 1000 nextsnap && \
|
|
chown -R nextsnap:nextsnap /app /tmp/flask_session
|
|
|
|
USER nextsnap
|
|
|
|
# Expose port
|
|
EXPOSE 8000
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
|
|
CMD curl -f http://localhost:8000/api/health || exit 1
|
|
|
|
# Use gunicorn for production with app factory
|
|
CMD ["gunicorn", \
|
|
"--workers", "4", \
|
|
"--bind", "0.0.0.0:8000", \
|
|
"--timeout", "120", \
|
|
"--access-logfile", "-", \
|
|
"--error-logfile", "-", \
|
|
"--log-level", "info", \
|
|
"app:create_app()"]
|