Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up serving static files by serving them through ngnix and not application #10

Open
michaelwood opened this issue Jun 1, 2022 · 0 comments

Comments

@michaelwood
Copy link
Member

Serving the files via gunicorn is much slower than directly from the web server/ngnix

We optimised this in insights-ng. See example in insights-ng:

insights salt file:

dokku storage:ensure-directory insights_static
dokku storage:mount insights-ng /var/lib/dokku/data/storage/insights_static:/insights_static
insights_ngnix_static_conf:
  file.managed:
    - name: /home/dokku/insights/nginx.conf.d/static.conf
    - source: salt://nginx/insights_static.conf
    - require:
      - cmd: insights_create_app

static.conf:

location /static/ {
  alias /var/lib/dokku/data/storage/insights_static/;
}
@michaelwood michaelwood transferred this issue from ThreeSixtyGiving/registry-classic Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant