2022-12-18 20:26:42 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Set up cache size
|
|
|
|
CACHE_SIZE="${TAKAHE_NGINX_CACHE_SIZE:-1g}"
|
2022-12-26 09:40:37 -08:00
|
|
|
sed s/__CACHESIZE__/${CACHE_SIZE}/g /takahe/docker/nginx.conf > /takahe/docker/nginx.rendered.conf
|
2022-12-18 20:26:42 -08:00
|
|
|
|
|
|
|
# Run nginx and gunicorn
|
2022-12-26 09:40:37 -08:00
|
|
|
nginx -c "/takahe/docker/nginx.rendered.conf" &
|
2022-12-22 13:28:28 -08:00
|
|
|
|
2022-12-26 09:42:02 -08:00
|
|
|
gunicorn takahe.wsgi:application -b 0.0.0.0:8001 $GUNICORN_EXTRA_CMD_ARGS &
|
2022-12-18 20:26:42 -08:00
|
|
|
|
|
|
|
# Wait for any process to exit
|
|
|
|
wait -n
|
|
|
|
|
|
|
|
# Exit with status of process that exited first
|
|
|
|
exit $?
|