# ============================================================ # OpenMind Frontend Dockerfile # Static file server with nginx # ============================================================ FROM nginx:alpine # Copy frontend files COPY frontend/ /usr/share/nginx/html/ # Custom nginx config for SPA routing RUN echo 'server { \ listen 80; \ root /usr/share/nginx/html; \ index index.html; \ location / { \ try_files $uri $uri/ /index.html; \ } \ location /v1/ { \ proxy_pass http://api:8000; \ proxy_http_version 1.1; \ proxy_set_header Upgrade $http_upgrade; \ proxy_set_header Connection "upgrade"; \ proxy_set_header Host $host; \ proxy_buffering off; \ proxy_cache off; \ } \ location /health { \ proxy_pass http://api:8000; \ } \ }' > /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]