When using dokku the static files (css, js, etc..) are typically served by nginx but by default nginx only gzip's html files. It's simple to change that, here's how.
/etc/nginx/nginx.conf file and find the
gzip section. gzip is on by default and the lines are already there, so just uncomment the following lines:
# Find and uncomment the following (adjust as needed)
gzip_buffers 16 8k;
There's more options that can be adjusted as needed. See the docs on the ngx_http_gzip_module for more details.
This simple change saved about 300kb for this site! Thank you to the nginx devs for making this so simple!