mirror of
				https://git.lapiole.org/dani/ansible-roles.git
				synced 2025-10-30 18:31:28 +01:00 
			
		
		
		
	Update to 2023-07-20 14:00
This commit is contained in:
		
							
								
								
									
										46
									
								
								roles/odoo/templates/nginx.conf.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								roles/odoo/templates/nginx.conf.j2
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| server { | ||||
|   listen 443 ssl http2; | ||||
|   server_name {{ odoo_public_url | default('https://_/') | urlsplit('hostname') }}; | ||||
|  | ||||
|   root /usr/share/nginx; | ||||
|  | ||||
|   location /websocket { | ||||
|     proxy_pass http://localhost:{{ odoo_longpolling_port }}; | ||||
|     proxy_set_header Upgrade $http_upgrade; | ||||
|     proxy_set_header Connection "upgrade"; | ||||
|     proxy_set_header X-Forwarded-Host $host; | ||||
|     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||||
|     proxy_set_header X-Forwarded-Proto $scheme; | ||||
|     proxy_set_header X-Real-IP $remote_addr; | ||||
|   } | ||||
|  | ||||
|   location /web/filestore { | ||||
|     internal; | ||||
|     alias {{ odoo_root_dir }}/filestore; | ||||
|   } | ||||
|  | ||||
|   location @odoo { | ||||
|     proxy_set_header X-Forwarded-Host $host; | ||||
|     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||||
|     proxy_set_header X-Forwarded-Proto $scheme; | ||||
|     proxy_set_header X-Real-IP $remote_addr; | ||||
|     proxy_redirect off; | ||||
|     proxy_pass http://localhost:{{ odoo_http_port }}; | ||||
|   } | ||||
|  | ||||
|   location ~ ^/[^/]+/static/.+$ { | ||||
|     root {{ odoo_root_dir }}/app/addons; | ||||
|     try_files {{ odoo_root_dir }}/enterprise$uri {{ odoo_root_dir }}/app/addons$uri {{ odoo_root_dir }}/app/odoo/addons$uri @odoo; | ||||
|     expires 24h; | ||||
|   } | ||||
|  | ||||
|   location / { | ||||
|     proxy_set_header X-Forwarded-Host $host; | ||||
|     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||||
|     proxy_set_header X-Forwarded-Proto $scheme; | ||||
|     proxy_set_header X-Real-IP $remote_addr; | ||||
|     proxy_redirect off; | ||||
|     proxy_pass http://localhost:{{ odoo_http_port }}; | ||||
|   } | ||||
| } | ||||
|  | ||||
| @@ -1,10 +1,12 @@ | ||||
| [options] | ||||
| db_name = {{ odoo_db_name }} | ||||
| db_host = {{ odoo_db_server }} | ||||
| db_port = {{ odoo_db_port }} | ||||
| db_user = {{ odoo_db_user }} | ||||
| db_password = {{ odoo_db_pass }} | ||||
| addons_path = {{ odoo_root_dir }}/app/odoo/addons | ||||
| addons_path = {{ odoo_root_dir }}/enterprise, {{ odoo_root_dir }}/app/odoo/addons, {{ odoo_root_dir }}/app/addons | ||||
| workers = {{ odoo_workers }} | ||||
| max_cron_threads = 1 | ||||
| http_port = {{ odoo_http_port }} | ||||
| longpolling_port = {{ odoo_longpolling_port }} | ||||
| email_from = {{ odoo_email }} | ||||
| @@ -12,3 +14,4 @@ smtp_server = localhost | ||||
| data_dir = {{ odoo_root_dir }}/data | ||||
| without_demo = ALL | ||||
| init = base | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Berteaud
					Daniel Berteaud