Добавил докер и касторизацию через env

This commit is contained in:
Ilia Miheev
2026-06-20 21:53:03 +03:00
parent 709eaacadb
commit c9347b8d20
16 changed files with 243 additions and 30 deletions
+21
View File
@@ -0,0 +1,21 @@
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:1.27-alpine
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY docker/entrypoint.sh /entrypoint.sh
COPY --from=build /app/dist /usr/share/nginx/html
RUN sed -i 's/\r$//' /entrypoint.sh && chmod +x /entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]