Closed bchanan03 closed 8 years ago
when trying curl http://myweb.com/registry/ it should have proxy pass to container running the docker registry web but it failed to load .css .js files
+1
This worked for me:
location /registry {
rewrite /registry/(.*) /$1 break;
rewrite /registry / break;
proxy_pass http://registry-web;
}
location /assets {
proxy_pass http://registry-web;
}
I would like it if the assets directory was added as a relative path. It looks like grails is opinionated about turning relative paths into absolute paths when using the asset pipeline. There is probably a way to override this, or to pass in a base path using an environment variable, but I couldn't find it in my first 30 minutes of looking.
Edit: I spoke too soon. It fixed the stylesheets, but all the links were still broken. Sad.
I'd added environment variable CONTEXT_PATH
to access registry-web with prefix.
Simply run registry-web with -e CONTEXT_PATH=/app
and registry will be available on url http://hostname/app/
Just tested the new image from docker hub. Works perfectly with nginx.conf
location /registry {
proxy_pass http://registry-web;
}
and docker run with:
-e CONTEXT_PATH=/registry
Thank you!!
Great!
Hi, I tried placing nginx proxy pass to to the docker registry ui adding a new sub-folder 'registry' the page is loaded but the resources .css .js failed to load.
Here is the nginx configuration: location ~ ^/registry/._$ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_set_header Connection "Keep-Alive"; proxy_set_header Proxy-Connection "Keep-Alive"; proxy_http_version 1.1; proxypass http://secure-registry-web.saas.lab:8080; rewrite ^/registry/(.) /$1 break; }