mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-30 21:21:09 -04:00 
			
		
		
		
	1. Generate a testing SQLite db on build 2. Optimize image layer caching 3. Fix permissions 4. Simplify nginx configuration 5. Fix nginx infinite redirect loop (couldn't access app folder)
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Nginx Configuration File
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Nginx Configuration File
		
	
	
	
	
	
| worker_processes  8;
 | |
| 
 | |
| error_log  /var/log/nginx/error.log warn;
 | |
| pid        /var/run/nginx.pid;
 | |
| 
 | |
| events {
 | |
|     worker_connections  4096;
 | |
| }
 | |
| 
 | |
| http {
 | |
|     include       /etc/nginx/mime.types;
 | |
|     default_type  application/octet-stream;
 | |
| 
 | |
|     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
 | |
|                       '$status $body_bytes_sent "$http_referer" '
 | |
|                       '"$http_user_agent" "$http_x_forwarded_for"';
 | |
| 
 | |
|     access_log  /var/log/nginx/access.log  main;
 | |
| 
 | |
|     sendfile        on;
 | |
| 
 | |
|     keepalive_timeout  65;
 | |
| 
 | |
|     server {
 | |
|         listen 80 default_server;
 | |
| 
 | |
|         root /app/public;
 | |
|         index index.php;
 | |
|         charset utf-8;
 | |
| 
 | |
|         access_log off;
 | |
| 
 | |
|         location / {
 | |
|             try_files $uri $uri/ /index.php?$query_string;
 | |
|         }
 | |
| 
 | |
|         location = /favicon.ico { access_log off; log_not_found off; }
 | |
|         location = /robots.txt  { access_log off; log_not_found off; }
 | |
| 
 | |
|         add_header X-Content-Type-Options nosniff;
 | |
|         add_header X-XSS-Protection "1; mode=block";
 | |
|         add_header X-Robots-Tag none;
 | |
|         add_header Content-Security-Policy "frame-ancestors 'self'";
 | |
| 
 | |
|         location ~ \.php$ {
 | |
|             fastcgi_pass php:9000;
 | |
|             fastcgi_index index.php;
 | |
|             include fastcgi_params;
 | |
|             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 | |
|             include /etc/nginx/fastcgi_params;
 | |
|         }
 | |
|     }
 | |
| }
 |