mirror of
https://github.com/jointakahe/takahe.git
synced 2025-01-09 05:35:26 +00:00
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
2 changed files with 3 additions and 2 deletions
1
docker/.gitignore
vendored
Normal file
1
docker/.gitignore
vendored
Normal file
|
@ -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 a new issue