Skip to content

Commit 4733161

Browse files
committed
Fix nginx configuration by delegating to the react router
1 parent 6320f18 commit 4733161

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

ui/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ RUN npm run build
1010
FROM nginx:alpine
1111
COPY --from=builder /app/dist /usr/share/nginx/html
1212
COPY public/images /usr/share/nginx/html/images
13+
COPY nginx.conf /etc/nginx/conf.d/default.conf
1314
COPY nginx-entrypoint.sh /usr/local/bin/nginx-entrypoint.sh
1415

1516
EXPOSE 80

ui/nginx.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
server {
2+
listen 80;
3+
server_name _;
4+
5+
root /usr/share/nginx/html;
6+
7+
location / {
8+
try_files $uri $uri/ /index.html;
9+
}
10+
11+
location /images/ {
12+
try_files $uri $uri/ =404;
13+
}
14+
}
15+

0 commit comments

Comments
 (0)