File tree Expand file tree Collapse file tree 3 files changed +14
-18
lines changed
Expand file tree Collapse file tree 3 files changed +14
-18
lines changed Original file line number Diff line number Diff line change 1+ # Сборка
12FROM node:20-alpine AS builder
2- WORKDIR /app
33
4+ WORKDIR /app
45COPY package*.json ./
5-
66RUN npm install
77
88COPY . .
99
10- RUN npm run build
10+ RUN npm run build && npm run export
1111
12+ # Продакшн
1213FROM nginx:stable-alpine
13- COPY --from=builder /app/build /usr/share/nginx/html
1414
15+ COPY --from=builder /app/out /usr/share/nginx/html
1516COPY nginx.conf /etc/nginx/conf.d/default.conf
1617
1718EXPOSE 80
18-
19- CMD ["nginx" , "-g" , "daemon off;" ]
19+ CMD ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change 11server {
22 listen 80 ;
3-
43 server_name localhost;
54
65 root /usr/share/nginx/html;
7- index index .html;
86
97 location / {
10- try_files $uri /index .html;
8+ try_files $uri $uri / /index .html;
119 }
12-
13- error_page 404 /index .html;
14- }
10+ }
Original file line number Diff line number Diff line change 33 "version" : " 0.1.0" ,
44 "private" : true ,
55 "scripts" : {
6- "dev" : " next dev" ,
7- "build" : " next build" ,
8- "export " : " next export " ,
9- "start " : " next start -p 3000 " ,
10- "lint" : " next lint"
11- },
6+ "dev" : " next dev" ,
7+ "build" : " next build" ,
8+ "start " : " next start " ,
9+ "export " : " next export " ,
10+ "lint" : " next lint"
11+ },
1212
1313 "dependencies" : {
1414 "@hello-pangea/dnd" : " ^17.0.0" ,
You can’t perform that action at this time.
0 commit comments