statianzo / que-web

A web interface for the Que queue
BSD 3-Clause "New" or "Revised" License
88 stars 50 forks source link

Precompile assets #24

Open hanshenrik opened 7 years ago

hanshenrik commented 7 years ago

Is there a way to precomile the assets used by que-web (jQuery, Font Awesome, etc.), perhaps to a specific path?

I'm having a hard time getting que-web to load its assets from the right place when running my app in Docker at a relative path (not at the root) in a cluster that uses HAProxy to do the routing. That is, at my.cluster.com/my-app. Works fine when running at a relative root locally, and at a relative path in Docker on my machine.

statianzo commented 7 years ago

Try setting the SCRIPT_NAME environment variable to your url path, "my-app".

hanshenrik commented 7 years ago

Didn't work unfortunately. Tried both with SCRIPT_NAME=my-app and SCRIPT_NAME=/my-app.

I'm running the app with Passenger/Nginx, so I made sure to tell Nginx to preserve this environment variable, as specified in https://github.com/phusion/passenger-docker#setting-environment-variables-in-nginx