Some checks failed
CI / build-and-test (pull_request) Has been cancelled
Rename stack service from backend to runners-calendar-backend so DNS on shared external networks (e.g. postgres_default) cannot resolve to another project’s backend. Nginx proxy_pass targets the same hostname. Made-with: Cursor
14 lines
505 B
Docker
14 lines
505 B
Docker
# Сборка из корня монорепо: docker build -f Dockerfile.frontend .
|
|
# SPA дергает API по префиксу /api (nginx проксирует на сервис runners-calendar-backend:3000).
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY frontend/package.json frontend/package-lock.json ./
|
|
RUN npm ci
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
FROM nginx:alpine
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
COPY docker/nginx.frontend.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE 80
|