- Add multi-stage Dockerfile (node:22-alpine build → nginx:alpine serve) - Add nginx.conf for SPA routing inside container - Add .dockerignore - Deploy to dshkabatur.ru server with Docker + host Nginx + SSL (Certbot) - Live at https://diet.dshkabatur.ru Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
252 B
Docker
12 lines
252 B
Docker
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM nginx:alpine
|
|
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
EXPOSE 80
|