Skip to content

Commit

Permalink
Merge pull request #906 from ernestio/f-webui
Browse files Browse the repository at this point in the history
F webui
  • Loading branch information
purehyperbole authored Aug 1, 2018
2 parents 85617c6 + 5e3bfef commit 877776d
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
19 changes: 16 additions & 3 deletions config/nginx/ernest.licensed
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,22 @@ server {
ssl_certificate /etc/nginx/conf.d/ernest.crt;
ssl_certificate_key /etc/nginx/conf.d/ernest.key;

location / {
proxy_pass http://proxy/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location / {
proxy_pass http://webui;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}

location /api {
proxy_pass http://proxy;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}

location /auth {
proxy_pass http://proxy;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}

location /events {
Expand Down
6 changes: 6 additions & 0 deletions config/webui/app.globals.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const GlobalVariable = Object.freeze({
BASE_URL: 'ERNESTHOSTNAME',
BASE_API_URL: 'https://ERNESTHOSTNAME',
SESSION_LENGTH: 604800, //1 week
ENTERPRISE: true
});
10 changes: 10 additions & 0 deletions definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,3 +339,13 @@ repos:
environment:
NATS_URI: nats://nats:4222
restart: always

- name: webui
edition: enterprise
path: [email protected]:ernestio/webui.git
branch: master
networks:
- ernest
volumes:
- ./config/webui/app.globals.ts:/repo/src/app/app.globals.ts
restart: always
3 changes: 2 additions & 1 deletion setup
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ done

# license check
if [[ -f license.json ]]; then
printf "%s\n%s" "License found" "Validating... "
printf "\n%s\n%s" "License found" "Validating... "

wget https://s3-eu-west-1.amazonaws.com/ernest-tools/ernest-verifier-`uname` -O ernest-verifier &> /dev/null
chmod +x ernest-verifier
Expand Down Expand Up @@ -139,6 +139,7 @@ else
fi

sed -i.bak "s/ERNESTHOSTNAME/$ERNESTHOSTNAME/g" ./config/nginx/ernest.local && rm ./config/nginx/ernest.local.bak
sed -i.bak "s/ERNESTHOSTNAME/$ERNESTHOSTNAME/g" ./config/webui/app.globals.ts && rm ./config/webui/app.globals.ts.bak

# Setup a random JWT Token for api-gateway
if [[ -z $TOKEN ]]; then
Expand Down

0 comments on commit 877776d

Please sign in to comment.