mirror of
				https://github.com/chibicitiberiu/ytsm.git
				synced 2024-02-24 05:43:31 +00:00 
			
		
		
		
	Added docker support
This commit is contained in:
		
							
								
								
									
										31
									
								
								nginx/nginx.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								nginx/nginx.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
# nginx.conf
 | 
			
		||||
upstream djangoA {
 | 
			
		||||
   server web:8000 max_fails=3 fail_timeout=0;
 | 
			
		||||
}
 | 
			
		||||
server {
 | 
			
		||||
    include mime.types;
 | 
			
		||||
    # The port your site will be served on      
 | 
			
		||||
    listen 80;
 | 
			
		||||
    # the domain name it will serve for
 | 
			
		||||
    server_name 0.0.0.0;# substitute your machine's IP address or FQDN
 | 
			
		||||
    charset utf-8;
 | 
			
		||||
    #Max upload size
 | 
			
		||||
    client_max_body_size 512M;   # adjust to taste
 | 
			
		||||
    location /static {
 | 
			
		||||
      alias /www/static;
 | 
			
		||||
      expires 30d;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    location / {
 | 
			
		||||
      try_files $uri @proxy_to_app;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
   # Finally, send all non-media requests to the Django server.
 | 
			
		||||
   location @proxy_to_app {
 | 
			
		||||
     proxy_set_header X-Real-IP $remote_addr;
 | 
			
		||||
     proxy_redirect off;
 | 
			
		||||
     proxy_set_header Host $host;
 | 
			
		||||
     proxy_pass http://djangoA;
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user