2
0
Эх сурвалжийг харах

web: add ability to configure the nginx resolver

Saúl Ibarra Corretgé 4 жил өмнө
parent
commit
81103362b5

+ 1 - 0
docker-compose.yml

@@ -68,6 +68,7 @@ services:
             - INVITE_SERVICE_URL
             - JICOFO_AUTH_USER
             - MICROSOFT_API_APP_CLIENT_ID
+            - NGINX_RESOLVER
             - P2P_USE_STUN_TURN
             - PEOPLE_SEARCH_URL
             - RESOLUTION

+ 2 - 0
web/rootfs/defaults/nginx.conf

@@ -26,6 +26,8 @@ http {
 
 	client_max_body_size 0;
 
+	resolver {{ .Env.NGINX_RESOLVER | default "127.0.0.11" }};
+
  	include /etc/nginx/mime.types;
 	types {
 		# add support for wasm MIME type, that is required by specification and it is not part of default mime.types file

+ 1 - 3
web/rootfs/etc/cont-init.d/10-config

@@ -52,9 +52,7 @@ if [[ $DISABLE_HTTPS -ne 1 ]]; then
 fi
 
 # copy config files
-if [[ ! -f /config/nginx/nginx.conf ]]; then
-    cp /defaults/nginx.conf /config/nginx/nginx.conf
-fi
+tpl /defaults/nginx.conf > /config/nginx/nginx.conf
 
 if [[ ! -f /config/nginx/meet.conf ]]; then
     tpl /defaults/meet.conf > /config/nginx/meet.conf