Wirecloud / docker-wirecloud

🐳 Docker Official Image packaging for WireCloud https://conwet.fi.upm.es/wirecloud
Other
8 stars 15 forks source link

wirecloud deployment in subdirectory - Docker (nginx, wirecloud) #57

Closed MRROOX closed 3 years ago

MRROOX commented 4 years ago

Hi, everybody,

I'm trying to deploy wirecloud in a subdirectory so that the url looks like this:

http://mydomain.com/wirecloud/

The problems I have are the following:

  1. Wirecloud serves static content in the '/static' subdirectory:

  2. Wirecloud consumes services through the use of APIs in the /api url

From Nginx I can't find a way to send the queries through a subdirectory, because when I ask for some static element, wirecloud does the query in http://mydomain.com/static not in http://mydomain.com/wirecloud/static . The same applies to the APIs http://mydomain.com/api , not http://mydomain.com/wirecloud/api

Is there currently a way to do this?

Thanks!

aarranz commented 4 years ago

Hi @MRROOX,

Sorry for the late response. This can be fixed by using the FORCE_SCRIPT_NAME setting from Django but, currently, this setting cannot be changed using environment variables. I've created PR #59 to solve this. Once merge, you should be able to fix it by setting /wirecloud/ as the value for the FORCE_SCRIPT_NAME environment variable.

aarranz commented 3 years ago

Sorry, I forget to close this issue, but the PR was merged.