user web interface for docker registry (v2) based on angular
- common
npm install
bower install
- create dist
grunt dist --env=dist
- for developing
grunt serve
or
grunt serve --env=dev
all routes are described in app/scripts/fakeBackend.js
grunt serve --env=fake
that's it :)
nginx config
server {
listen localhost:9001;
root /home/artem/Develops/DockerWebUI/dist;
underscores_in_headers on;
location / {
root /home/artem/Develops/DockerWebUI/dist;
index index.html;
}
location /v2 {
proxy_set_header X-Real-IP $remote_addr;
add_header Access-Control-Allow-Origin *; #disable CORS
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:5000;
proxy_redirect off;
}
}
setup environment in config/env.js "dev" property
{
showVersionInfo: true,
siteUrl: 'http://0.0.0.0:9000',
apiUrl: 'http://localhost:9001', //here is api url, put in into nginx config and disable CORS (just add a header)
useHeaderAuth: false, //should be false if you are using local machine
useCookiesAuth: false,
useFakeAPIService: false, //you can use fake backend (fakeBackend.js file)
minimizeJs: false, // should be false if you are using "grunt serve"
minimizeCss: false, //the same as previous
generateSourceMaps: true
}
you can configure build process in env.js
nginx config file
server {
listen 10.10.1.58:9001; #listen for
root /home/artem/Develops/DockerWebUI/dist; #provide your dist location here
underscores_in_headers on;
location / { #map all static requests
root /home/artem/Develops/DockerWebUI/dist;
index index.html;
}
#map api calls to localhost:5000 (it's my registry daemon)
location /v2 {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:5000;
proxy_redirect off;
}
}