[IMP]Odoo nginx configurable ports

This commit is contained in:
Fabien BOURGEOIS 2017-07-01 15:19:11 +02:00
parent bd37033b85
commit 74c4b99c81
2 changed files with 4 additions and 2 deletions

View File

@ -7,13 +7,13 @@ upstream ${ODOO_SERVICE}longpoll {
} }
server { server {
listen 80; listen ${ODOO_NGINX_PORT};
server_name ${ODOO_SERVER_NAMES}; server_name ${ODOO_SERVER_NAMES};
return 301 https://${DOLLSIGN}host${DOLLSIGN}request_uri; return 301 https://${DOLLSIGN}host${DOLLSIGN}request_uri;
} }
server { server {
listen 443 ssl; listen ${ODOO_NGINX_SSL_PORT} ssl;
server_name ${ODOO_SERVER_NAMES}; server_name ${ODOO_SERVER_NAMES};
client_max_body_size 200M; client_max_body_size 200M;
gzip on; gzip on;

View File

@ -7,6 +7,8 @@ services:
NGINX_HOST: localhost 127.0.0.1 NGINX_HOST: localhost 127.0.0.1
ODOO_SERVICE: odoo ODOO_SERVICE: odoo
ODOO_SERVER_NAMES: localodoo odoo ocb ODOO_SERVER_NAMES: localodoo odoo ocb
ODOO_NGINX_PORT: 80
ODOO_NGINX_SSL_PORT: 443
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"