mirror of
https://github.com/chartdb/chartdb.git
synced 2025-11-01 12:33:51 +00:00
fix(dockerfile): support SPA refresh to resolve nginx return 404 (#384)
* feat(dockerfile): support SPA refresh to resolve nginx return 404 * remove comments & set server_name to default --------- Co-authored-by: Guy Ben-Aharon <guybenah@gmail.com>
This commit is contained in:
@@ -16,6 +16,7 @@ RUN npm run build
|
||||
FROM nginx:stable-alpine AS production
|
||||
|
||||
COPY --from=builder /usr/src/app/dist /usr/share/nginx/html
|
||||
COPY ./default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Expose the default port for the Nginx web server
|
||||
EXPOSE 80
|
||||
|
||||
15
default.conf
Normal file
15
default.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user