Backend: - Add type validation and coercion for settings API - Implement SettingStorage and SettingType in registry - Improve CRUD operations for settings Frontend: - Refactor Theme, Language, Sidebar, ViewMode contexts - Simplify admin components (GeneralTab, SettingsTab, UsersTab) - Add new settings endpoints to API client - Improve App initialization flow Infrastructure: - Update Dockerfile and docker-compose.yml - Add .dockerignore - Update Makefile and README 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
66 lines
1.6 KiB
Docker
66 lines
1.6 KiB
Docker
# Multi-stage build for Generic App Service single container
|
|
|
|
# Stage 1: Build frontend
|
|
FROM node:20-alpine as frontend-builder
|
|
|
|
WORKDIR /frontend
|
|
|
|
# Copy package files
|
|
COPY frontend/package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN if [ -f package-lock.json ]; then npm ci --no-audit --no-fund; else npm install --no-audit --no-fund; fi
|
|
|
|
# Copy frontend source
|
|
COPY frontend/ .
|
|
|
|
# Build frontend
|
|
RUN npm run build
|
|
|
|
# Stage 2: Build backend dependencies
|
|
FROM python:3.11-slim as backend-builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Install only essential build dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy and install Python dependencies
|
|
COPY backend/requirements.txt .
|
|
RUN pip install --no-cache-dir --user -r requirements.txt
|
|
|
|
# Stage 3: Final image
|
|
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy Python packages from builder
|
|
COPY --from=backend-builder /root/.local /root/.local
|
|
|
|
# Make sure scripts in .local are usable
|
|
ENV PATH=/root/.local/bin:$PATH
|
|
|
|
# Create config directory
|
|
RUN mkdir -p /config
|
|
|
|
# Copy backend application
|
|
COPY backend/app ./app
|
|
COPY backend/alembic ./alembic
|
|
COPY backend/alembic.ini .
|
|
COPY .env .
|
|
|
|
# Copy built frontend from frontend-builder
|
|
COPY --from=frontend-builder /frontend/dist ./static
|
|
|
|
# Expose port
|
|
EXPOSE 8000
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
|
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1
|
|
|
|
# Run database migrations and start the application
|
|
CMD ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000"]
|