From 90919ce2a835a08a05c17b8ff94080d01307db3c Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 5 Jul 2021 13:54:12 +0200 Subject: [PATCH] Use a variable to set the unicorn workers in nginx. --- templates/nginx_unicorn.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/nginx_unicorn.conf.j2 b/templates/nginx_unicorn.conf.j2 index 4756bb8..9d4df22 100644 --- a/templates/nginx_unicorn.conf.j2 +++ b/templates/nginx_unicorn.conf.j2 @@ -7,7 +7,7 @@ upstream unicorn { # server unix:/tmp/.sock fail_timeout=0; # for TCP setups, point these to your backend servers - {% for i in 0, 4 %} + {% for i in 0, {{ unicorn_worker_processes - 1 }} %} server 127.0.0.1:{{ unicorn_listen_port + i }} fail_timeout=0; {% endfor %} }