mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-21 06:08:12 +02:00
Add files via upload
This commit is contained in:
72 files changed
+12339
No files matched your search
+48
@@ -0,0 +1,48 @@
|
||||
# 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
|
||||
|
||||
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 directory
|
||||
RUN mkdir -p screenshots
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8000
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/')" || exit 1
|
||||
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
||||
Reference in new issue
Block a user