Skip to content

Commit

Permalink
Moved gzip configs from uwsgi.conf to start_ckan.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
twdbben committed Apr 16, 2024
1 parent a04d16b commit 20869d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion docker/ckan/setup/app/start_ckan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ then
fi

# Set the common uwsgi options
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid ckan --gid ckan --http :5000 --master --enable-threads --wsgi-file /srv/app/wsgi.py --module wsgi:application --lazy-apps --gevent 2000 -p 2 -L --gevent-early-monkey-patch --vacuum --harakiri 50 --callable application --single-interpreter --need-app --disable-logging --log-4xx --log-5xx --log-slow 5000"
UWSGI_OPTS="--socket /tmp/uwsgi.sock --uid ckan --gid ckan --http :5000 --master --enable-threads --wsgi-file /srv/app/wsgi.py --module wsgi:application --lazy-apps --gevent 2000 -p 2 -L --gevent-early-monkey-patch --vacuum --harakiri 50 --callable application --single-interpreter --need-app --disable-logging --log-4xx --log-5xx --log-slow 5000 --http-keepalive 1 --http-auto-gzip --collect-header Content-Type RESPONSE_CONTENT_TYPE --response-route-if equal:${RESPONSE_CONTENT_TYPE};application/json addheader:uWSGI-Encoding: gzip --response-route-if startswith:${RESPONSE_CONTENT_TYPE};text/html addheader:uWSGI-Encoding: gzip"


# Run the prerun script to init CKAN and create the default admin user
python prerun.py || { echo '[CKAN prerun] FAILED. Exiting...' ; exit 1; }
Expand Down
7 changes: 0 additions & 7 deletions docker/ckan/setup/app/uwsgi.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
[uwsgi]
route = ^(?!/api).*$ basicauth:Restricted,/srv/app/.htpasswd

http-keepalive = 1
http-auto-gzip = true
collect-header Content-Type RESPONSE_CONTENT_TYPE
response-route-if = equal:${RESPONSE_CONTENT_TYPE};application/json addheader:uWSGI-Encoding: gzip
response-route-if = startswith:${RESPONSE_CONTENT_TYPE};text/html addheader:uWSGI-Encoding: gzip

0 comments on commit 20869d5

Please sign in to comment.