Coder Social home page Coder Social logo

dockerwebui's Introduction

DockerWebUI

user web interface for docker registry (v2) based on angular

Main things

  • common
npm install
bower install
  • create dist
grunt dist --env=dist
  • for developing
grunt serve

or

grunt serve --env=dev

Using fake backend api

all routes are described in app/scripts/fakeBackend.js

grunt serve --env=fake

that's it :)

if you want use real registry api allocated on your local machine

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

}

All configs are in config folder

you can configure build process in env.js

How I can configure it for Nginx

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;
    	}
}

dockerwebui's People

Contributors

artemijan avatar

Watchers

James Cloos avatar Alexander Beskrovny avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.