Files
Priceflow/Dockerfile
T
Claude a8ff8217b3 fix: Use absolute paths for debug_dumps directory
- Changed debug_dumps path from relative to absolute (/app/debug_dumps)
- Updated direct_search_service.py to use consistent absolute path
- Updated debug.py router to use the same absolute path
- Added debug_dumps directory creation in Dockerfile
- Improved _dump_debug_html with safer filename handling
2025-11-24 07:27:45 +00:00

51 lines
1.1 KiB
Docker

# Stage 1: Build Frontend
FROM node:22-alpine as frontend-build
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install
# Force cache invalidation for frontend source
ARG CACHEBUST=1
COPY frontend/ .
RUN npm run build
# Stage 2: Build Backend and Serve
FROM python:3.12-slim
WORKDIR /app
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# Copy build files
COPY pyproject.toml .
COPY README.md .
# Use uv for faster installation (fixed syntax)
RUN uv pip install --system --no-cache .
# Copy backend code
COPY app/ ./app
COPY alembic.ini ./
COPY docker-entrypoint.sh ./
# Make entrypoint executable
RUN chmod +x docker-entrypoint.sh
# Copy built frontend static files
COPY --from=frontend-build /app/frontend/dist /app/static
# Create screenshots and debug_dumps directories
RUN mkdir -p screenshots debug_dumps
# Expose port
EXPOSE 8555
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8555/api/')" || exit 1
ENTRYPOINT ["./docker-entrypoint.sh"]