testing and docker replacements

This commit is contained in:
Anthony Stirling
2025-07-16 23:09:26 +01:00
parent 2f977ff250
commit 3fd52ed564
25 changed files with 363 additions and 427 deletions

View File

@@ -4,13 +4,13 @@ FROM node:20-alpine AS build
WORKDIR /app
# Copy package files
COPY package*.json ./
COPY frontend/package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
COPY frontend .
# Build the application
RUN npm run build
@@ -22,8 +22,8 @@ FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
# Copy nginx configuration and entrypoint
COPY nginx.conf /etc/nginx/nginx.conf
COPY entrypoint.sh /entrypoint.sh
COPY docker/frontend/nginx.conf /etc/nginx/nginx.conf
COPY docker/frontend/entrypoint.sh /entrypoint.sh
# Make entrypoint executable
RUN chmod +x /entrypoint.sh

View File

@@ -17,6 +17,9 @@ http {
server_name _;
root /usr/share/nginx/html;
index index.html index.htm;
# Global settings for file uploads
client_max_body_size 100m;
# Handle client-side routing - support subpaths
location / {
@@ -32,6 +35,21 @@ http {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
# Additional headers for proper API proxying
proxy_set_header Connection '';
proxy_http_version 1.1;
proxy_buffering off;
proxy_cache off;
# Timeout settings for large file uploads
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
# Request size limits for file uploads
client_max_body_size 100m;
proxy_request_buffering off;
}
# Cache static assets