Initial commit for iiEasy: all files included
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Этап 1: Сборка
|
||||
FROM node:20-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Этап 2: Раздача через Nginx
|
||||
FROM nginx:stable-alpine
|
||||
|
||||
# 1. Копируем то, что собрал Vite (индекс, стили, основной JS)
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
# 2. Копируем твою папку js вручную (раз Vite её игнорирует)
|
||||
# Мы берем её из /app/js (где она оказалась после COPY . .)
|
||||
# и кладем в /usr/share/nginx/html/js
|
||||
COPY --from=build /app/js /usr/share/nginx/html/js
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user