forked from trent_larson/crowd-funder-for-time-pwa
Fix Docker build issues and SQL worker configuration
- Fix .dockerignore to allow dist directory for Docker builds - Add uint8arrays dependency for crypto operations - Configure Vite for proper SQL worker bundling with absurd-sql - Update Dockerfile with build context documentation - Fix Nginx configuration for non-root user permissions - Remove conflicting backend proxy configuration - Add SQL worker polyfills to vite.config.common.mts Resolves Docker build failures and ensures proper SQL database functionality in containerized environment.
This commit is contained in:
@@ -54,14 +54,16 @@ server {
|
||||
}
|
||||
|
||||
# Handle API requests (if needed)
|
||||
location /api/ {
|
||||
limit_req zone=api burst=20 nodelay;
|
||||
proxy_pass http://backend:3000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
# Note: Backend API is not currently deployed
|
||||
# Uncomment and configure when backend service is available
|
||||
# location /api/ {
|
||||
# limit_req zone=api burst=20 nodelay;
|
||||
# proxy_pass http://backend:3000;
|
||||
# proxy_set_header Host $host;
|
||||
# proxy_set_header X-Real-IP $remote_addr;
|
||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# }
|
||||
|
||||
# Handle health check
|
||||
location /health {
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
# - Static file caching optimization
|
||||
# - Security hardening
|
||||
|
||||
user nginx;
|
||||
# user nginx; # Commented out - nginx runs as non-root user in container
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
pid /tmp/nginx.pid; # Use /tmp for PID file to avoid permission issues
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
|
||||
@@ -54,14 +54,16 @@ server {
|
||||
}
|
||||
|
||||
# Handle API requests (if needed)
|
||||
location /api/ {
|
||||
limit_req zone=api burst=20 nodelay;
|
||||
proxy_pass http://backend:3000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
# Note: Backend API is not currently deployed
|
||||
# Uncomment and configure when backend service is available
|
||||
# location /api/ {
|
||||
# limit_req zone=api burst=20 nodelay;
|
||||
# proxy_pass http://backend:3000;
|
||||
# proxy_set_header Host $host;
|
||||
# proxy_set_header X-Real-IP $remote_addr;
|
||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# }
|
||||
|
||||
# Handle health check
|
||||
location /health {
|
||||
|
||||
Reference in New Issue
Block a user