31 lines
904 B
Docker
31 lines
904 B
Docker
FROM node:22-alpine AS frontend-build
|
|
|
|
WORKDIR /frontend
|
|
COPY frontend/package.json ./package.json
|
|
COPY frontend/package-lock.json ./package-lock.json
|
|
RUN npm ci --no-audit --no-fund
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
FROM python:3.12-slim
|
|
|
|
LABEL org.opencontainers.image.title="ServiceMap" \
|
|
org.opencontainers.image.description="Production infrastructure intelligence" \
|
|
org.opencontainers.image.version="1.6.2" \
|
|
org.opencontainers.image.licenses="MIT"
|
|
|
|
WORKDIR /app
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
SERVICEMAP_DB=/data/servicemap.db \
|
|
SERVICEMAP_STATIC_DIR=/app/static
|
|
|
|
COPY backend/requirements.lock ./requirements.lock
|
|
COPY backend/app ./app
|
|
RUN pip install --no-cache-dir -r requirements.lock
|
|
COPY --from=frontend-build /frontend/dist ./static
|
|
|
|
VOLUME ["/data"]
|
|
EXPOSE 8000
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|