Skip to content

Commit 562b6b4

Browse files
Add nginx.conf to use SPA-routing
1 parent 6a213e5 commit 562b6b4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ RUN npm run build
1010

1111
FROM nginx:latest
1212

13-
COPY --from=build /usr/local/yolol/dist/yolol-v2 /usr/share/nginx/html
13+
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
14+
COPY --from=build /usr/local/yolol/dist/yolol-v2 /usr/share/nginx:w/html
1415

1516
EXPOSE 80

nginx.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
server {
2+
listen 80;
3+
location / {
4+
root /usr/share/nginx:w/html;
5+
index index.html index.htm;
6+
try_files $uri $uri/ /index.html =404;
7+
}
8+
}

0 commit comments

Comments
 (0)