From ee760fcbbe3dfbb4a4f5d4aa9c15975a0cc82e95 Mon Sep 17 00:00:00 2001 From: Roman Vynar Date: Mon, 12 Sep 2016 18:26:25 +0300 Subject: [PATCH] Switched nginx master process to root. --- Dockerfile | 5 +---- nginx.conf | 1 + supervisord.conf | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index dc82ca2a8..3fc1fe4d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,10 +58,7 @@ RUN curl -s -LO https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_a # ##### # COPY nginx.conf nginx-ssl.conf /etc/nginx/ -RUN touch /etc/nginx/.htpasswd && \ - touch /run/nginx.pid && \ - chown -R www-data:www-data /var/lib/nginx /run/nginx.pid && \ - setcap cap_net_bind_service=+ep /usr/sbin/nginx +RUN touch /etc/nginx/.htpasswd # ########################### # # Supervisor and landing page # diff --git a/nginx.conf b/nginx.conf index aa7278816..d8ae35ad0 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,3 +1,4 @@ +user www-data; worker_processes 4; pid /run/nginx.pid; daemon off; diff --git a/supervisord.conf b/supervisord.conf index 8c4583ab8..932c070b3 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -44,7 +44,6 @@ autorestart = true [program:nginx] priority = 4 -user = www-data command = nginx stdout_logfile = /var/log/nginx.log stderr_logfile = /var/log/nginx.log