fixing build and nginx
This commit is contained in:
@@ -38,6 +38,9 @@ LABEL stage="nginx-server"
|
|||||||
# Copy the build output from the 'build' stage to Nginx's html directory
|
# Copy the build output from the 'build' stage to Nginx's html directory
|
||||||
COPY --from=build /app/build /usr/share/nginx/html
|
COPY --from=build /app/build /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Replace default nginx config with one that handles SPA client-side routing
|
||||||
|
COPY nginx-docker.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
# Expose port 80 (Nginx default)
|
# Expose port 80 (Nginx default)
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user