Skip to content

Commit 1519c7d

Browse files
committed
fix: nginx SPA
1 parent d23a64b commit 1519c7d

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Dockerfile_devnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ FROM nginx:alpine
1616

1717
COPY --from=builder /app/dist /usr/share/nginx/html
1818

19+
RUN sed -i '/index index\.html index\.htm;/a\ try_files \$uri \$uri/ /index.html;' \
20+
/etc/nginx/conf.d/default.conf
21+
1922
EXPOSE 80
2023
CMD ["nginx", "-g", "daemon off;"]

Dockerfile_mainnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@ FROM nginx:alpine
2121

2222
COPY --from=builder /app/dist /usr/share/nginx/html
2323

24+
RUN sed -i '/index index\.html index\.htm;/a\ try_files \$uri \$uri/ /index.html;' \
25+
/etc/nginx/conf.d/default.conf
26+
2427
EXPOSE 80
2528
CMD ["nginx", "-g", "daemon off;"]

Dockerfile_testnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@ FROM nginx:alpine
2121

2222
COPY --from=builder /app/dist /usr/share/nginx/html
2323

24+
RUN sed -i '/index index\.html index\.htm;/a\ try_files \$uri \$uri/ /index.html;' \
25+
/etc/nginx/conf.d/default.conf
26+
2427
EXPOSE 80
2528
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)