|
|
|
|
|
FROM node:20-slim AS frontend-builder |
|
|
|
|
|
WORKDIR /app/frontend |
|
|
COPY frontend/package*.json ./ |
|
|
RUN npm install --legacy-peer-deps --production |
|
|
|
|
|
COPY frontend/ ./ |
|
|
RUN npm run build |
|
|
|
|
|
|
|
|
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim |
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y nginx |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
|
|
|
COPY backend/ backend/ |
|
|
COPY pyproject.toml . |
|
|
|
|
|
|
|
|
RUN uv sync && uv pip install . |
|
|
ENV PATH="/root/.local/bin:/root/.uv/venv/bin:${PATH}" |
|
|
|
|
|
|
|
|
COPY --from=frontend-builder /app/frontend/build /usr/share/nginx/html |
|
|
COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf |
|
|
|
|
|
|
|
|
EXPOSE 80 8000 |
|
|
|
|
|
|
|
|
COPY start.sh /start.sh |
|
|
RUN chmod +x /start.sh |
|
|
|
|
|
CMD ["/start.sh"] |