structurizr / lite

Structurizr Lite
https://docs.structurizr.com/lite
MIT License
232 stars 28 forks source link

Problems with Docker behind SSL Terminating Reverse Proxy (Traefik) #3

Closed markusleitoldZBS closed 2 years ago

markusleitoldZBS commented 2 years ago

When deploying structurizrs docker image as a container behind an SSL terminating reverse proxy (like traefik) by docker-compose some static content like css and js files are not reachable as their URLs are generated with "http" not "https". Other URLs are correctly built with "https".

In this example when opening structurizr with the Base URL "https://struct.example.com" this is the result:

grafik

Design completely messed up cause of missing css/js. This can be found in DevTools network view:

grafik

Is there any way to configure structurizrs Base URL / Scheme (Env - var?) Couldn't find anything in the Docker regarding docs. Or could structurizr simply respect "X-Forwarded-Proto" Header for building URLs?

simonbrowndotje commented 2 years ago

I can't check/test this at the moment, but I have a feeling that adding a structurizr.properties file into your data directory (next to your workspace.dsl file), with a property named structurizr.url may resolve this:

structurizr.url=https://struct.example.com

(you'll need to restart the container for this change to become effective)

markusleitoldZBS commented 2 years ago

Thx a lot for the answer, this solved the issue. Just found the same answer right now in the docs here https://structurizr.com/help/on-premises/configuration

Perhaps the existance of "structurizr.properties" could be worth mentioning also in the Lite / Docker Docs here https://structurizr.com/share/76352/documentation/Structurizr%20Lite