rdmorganiser / rdmo-docker-compose

RDMO running in different docker images held together by docker compose
Apache License 2.0
3 stars 12 forks source link

BASE_URL not configurable (for proxy_pass with subdirectories) #8

Closed suchmaske closed 4 years ago

suchmaske commented 4 years ago

I am currently trying to deploy rdmo via rdmo-docker-compose. I have successfully managed to start the app via docker, however it is not usable when trying to deploy it under a subroute like example.com/rdmo.

Here is my nginx snippet for forwarding rdmo:

location /rdmo/ {
  proxy_pass http://localhost:8484/;
}

When accessing the app via example.com/rdmo/ all relative links are not generated correctly and assets are not beingloaded. As I have seen in rdmo, there is the possibility to configure the BASE_URL in config/settings/local.py.

Could you make BASE_URL configurable in the variables.env in rdmo-docker-compose? That would be a great help.

jochenklar commented 4 years ago

Hi, the problem is the apache config which we need to adjust as well. Otherwise the SCRIPT_NAME env is wrong for rdmo and internal links will not work.

jochenklar commented 4 years ago

It is generally easier to proxy_pass /rdmo -> http://localhost:8484/rdmo. But then the apache2.conf needs to be templated as well. I'm afraid we need to wait untill @triole is back.

funkyfuture commented 4 years ago

i recommend to run a wsgi server in the container where rdmo is installed. the Apache container is ballast in this very opinionated setup proposal anyway.

jochenklar commented 4 years ago

I agree, but since the collegue, who mainly maintains this repo is on leave, I will not make drastic changes to the setup. A container running gunicorn would be more lightweight.

triole commented 4 years ago

A subpath setting in the RDMO docker compose setup will be supported with the next RDMO release. This is because a function from the RDMO core is used to sanitize the BASE_URL setting.

As soon as this feature is available the branch configurable_base_url will be merged into master.