Render the Nginx config to a separate file (#273)
When writing the cache size to nginx config, write it to a separate file so it doesn't confuse git status/commit. By using a rendered file, we can ignore the output completely.
This commit is contained in:
parent
b53504fe64
commit
a590427160
|
@ -0,0 +1 @@
|
|||
nginx.rendered.conf
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
# Set up cache size
|
||||
CACHE_SIZE="${TAKAHE_NGINX_CACHE_SIZE:-1g}"
|
||||
sed -i s/__CACHESIZE__/${CACHE_SIZE}/g /takahe/docker/nginx.conf
|
||||
sed s/__CACHESIZE__/${CACHE_SIZE}/g /takahe/docker/nginx.conf > /takahe/docker/nginx.rendered.conf
|
||||
|
||||
# Run nginx and gunicorn
|
||||
nginx -c "/takahe/docker/nginx.conf" &
|
||||
nginx -c "/takahe/docker/nginx.rendered.conf" &
|
||||
|
||||
gunicorn takahe.wsgi:application -b 0.0.0.0:8001 &
|
||||
|
||||
|
|
Loading…
Reference in New Issue