Embed APP_VERSION build arg in Docker image (default: dev). build_push.sh passes the git tag as build arg. Proxy exposes GET /version, admin UI shows it as read-only field in settings.
25 lines
565 B
Docker
25 lines
565 B
Docker
FROM node:20-alpine AS frontend-builder
|
|
WORKDIR /app
|
|
COPY frontend/package*.json frontend/
|
|
RUN npm ci --prefix frontend
|
|
COPY frontend/ frontend/
|
|
RUN npm run build --prefix frontend
|
|
|
|
FROM python:3.12-slim
|
|
ARG APP_VERSION=dev
|
|
ENV APP_VERSION=$APP_VERSION
|
|
WORKDIR /app
|
|
|
|
COPY backend/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt psycopg2-binary
|
|
|
|
COPY backend/ backend/
|
|
COPY --from=frontend-builder /app/frontend/dist frontend/dist
|
|
|
|
COPY docker-entrypoint.sh .
|
|
RUN chmod +x docker-entrypoint.sh
|
|
|
|
EXPOSE 8000 8001
|
|
|
|
CMD ["./docker-entrypoint.sh"]
|