Skip to content

Commit

Permalink
fix merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
loganhz committed Apr 13, 2017
1 parent 41707d3 commit bfffd29
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .roadhogrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const endpoint = process.env.LONGHORN_ORC_IP || 'http://54.223.25.181:9500/';
const endpoint = process.env.LONGHORN_MANAGER_IP || 'http://54.223.25.181:9500/';
export default {
"entry": "src/index.js",
"disableCSSModules": false,
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY . /web
WORKDIR /web

EXPOSE 8000
ENV LONGHORN_ORC_IP http://localhost:9500
ENV LONGHORN_MANAGER_IP http://localhost:9500
RUN npm run build

CMD ["/bin/bash", "-c", "envsubst '${LONGHORN_ORC_IP}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;'"]
CMD ["/bin/bash", "-c", "envsubst '${LONGHORN_MANAGER_IP}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;'"]
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,47 @@
# longhorn-ui
# Longhorn UI
--------

Admin UI for Longhorn Manger

## Usage

Prerequisites:
* [Git](http://git-scm.com/)
* [Node.js](http://nodejs.org/) (with NPM)

Setup:
```bash

git clone 'https://github.com/rancher/longhron-ui'
cd 'longhron-ui'
npm install
npm run dev
```
Run development server pointed at some Longhron Manger API
```bash
LONGHORN_MANAGER_IP="http://longhorn:9500/" npm run dev
```
Compiling for distribution
```bash
npm run build
```

Build and run a docker image
```bash
make
make LONGHORN_MANAGER_IP=http://longhorn:9500 run
```

License
=======
Copyright (c) 2014-2016 [Rancher Labs, Inc.](http://rancher.com)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
3 changes: 2 additions & 1 deletion nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ http {
proxy_temp_file_write_size 64k;

location /v1 {
proxy_pass ${LONGHORN_ORC_IP};
proxy_pass ${LONGHORN_MANAGER_IP};
}

location / {
root /web/dist;
index index.html;
add_header Cache-Control "max-age=0";
try_files $uri $uri/ /index.html =404;
}
}
Expand Down

0 comments on commit bfffd29

Please sign in to comment.