File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -25,5 +25,7 @@ FROM nginx:1.27.2-alpine AS prod
25
25
26
26
ARG APP_PATH_DEFAULT
27
27
28
+ COPY --from=builder ${APP_PATH_DEFAULT}/nginx.conf /etc/nginx/conf.d/default.conf
29
+
28
30
COPY --from=builder ${APP_PATH_DEFAULT}/build /usr/share/nginx/html/docs
29
31
COPY --from=builder ${APP_PATH_DEFAULT}/static/img/favicon.svg /usr/share/nginx/html/docs
Original file line number Diff line number Diff line change
1
+ server {
2
+ listen 80 ;
3
+ listen [::]:80;
4
+ server_name localhost;
5
+
6
+ # This location serves index.html as the homepage
7
+ location / {
8
+ root /usr/share/nginx/html/; # Adjust path if your files are in a different location
9
+ index /docs/index.html; # Ensure index.html is set as the default index
10
+ try_files $uri $uri / /docs/index.html; # Fallback to index.html for any unknown path
11
+ }
12
+
13
+ # Handle 404 errors
14
+ error_page 404 = /docs/index.html; # Redirect 404 errors to index.html
15
+
16
+ # Handle server errors
17
+ error_page 500 502 503 504 /50x.html;
18
+ location = /50x.html {
19
+ root /usr/share/nginx/html;
20
+ }
21
+ }
22
+
You can’t perform that action at this time.
0 commit comments