feat(client): add nginx config for SPA routing and API proxy
- add try_files fallback to serve index.html for all non-asset paths - proxy /api/ requests to the server container to avoid HTML being returned by nginx for API calls when using full route paths
This commit is contained in:
@@ -15,5 +15,6 @@ RUN npm run -w client build
|
||||
FROM nginx:alpine AS runtime
|
||||
|
||||
COPY --from=builder /app/client/dist /usr/share/nginx/html
|
||||
COPY client/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user