Files
evolution-api/nginx.conf
yurii 5dd18451ea fix(docker): fix docker-compose startup failures for fresh installs
- Remove dokploy-network external network dependency that breaks
  docker-compose up on fresh installs without the network pre-created
- Fix evolution-manager frontend crash by adding nginx.conf with
  corrected gzip_proxied directive (removes invalid must-revalidate value)
- Add missing POSTGRES_DATABASE, POSTGRES_USERNAME, POSTGRES_PASSWORD
  to .env.example (required by docker-compose postgres service)
- Fix DATABASE_CONNECTION_URI hostname from postgres to evolution-postgres
  to match the docker-compose service name

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:44:31 +01:00

52 lines
1.3 KiB
Nginx Configuration File

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied expired no-cache no-store private auth;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/javascript
application/xml+rss
application/json;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
# Handle client routing
location / {
try_files $uri $uri/ /index.html;
}
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Cache HTML files for a shorter period
location ~* \.html$ {
expires 1h;
add_header Cache-Control "public";
}
# Health check endpoint
location /health {
access_log off;
return 200 "healthy\n";
add_header Content-Type text/plain;
}
}