Skip to content

Commit

Permalink
Serve static assets by nginx
Browse files Browse the repository at this point in the history
Resolves #56
  • Loading branch information
sebschrader committed Feb 5, 2018
1 parent 17f605a commit 1569066
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion configure.mk
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ $(call add_substitution, pkgdatadir, $(datadir)/$(PACKAGE_NAME))
$(call add_substitution, pkglogdir, $(logdir)/$(PACKAGE_NAME))

# Additional directories
$(call add_substitution, assetdir, $(pkgdatadir)/assests)
$(call add_substitution, pythonsitedir, $(shell python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"))
$(call add_substitution, assetdir, $(pythonsitedir)/hades/portal/assets)
$(call add_substitution, systemdenvfile, /etc/default/hades)
$(call add_substitution, templatedir, $(pkgdatadir)/templates)
$(call add_substitution, venvdir, $(NULL))
Expand Down
4 changes: 4 additions & 0 deletions templates/nginx/sites-available/default.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ server {
include uwsgi_params;
uwsgi_pass unix:{{ constants.PORTAL_UWSGI_SOCKET }};
}

location /assets {
alias {{ constants.assetdir }};
}
}

0 comments on commit 1569066

Please sign in to comment.