Добавил докер образ

This commit is contained in:
Ilia Miheev
2026-08-01 22:48:29 +03:00
parent 7a54ac0c18
commit 3650ffa3cd
7 changed files with 140 additions and 4 deletions
+27
View File
@@ -0,0 +1,27 @@
# syntax=docker/dockerfile:1
FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:1.27-alpine
RUN apk add --no-cache nodejs
COPY --from=builder /app/dist /usr/share/nginx/html
COPY scripts/generate-config.js /docker/generate-config.js
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY docker/entrypoint.sh /docker/entrypoint.sh
RUN chmod +x /docker/entrypoint.sh \
&& sed -i 's/\r$//' /docker/entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/docker/entrypoint.sh"]