diff --git a/config/nginx/ernest.licensed b/config/nginx/ernest.licensed index aeb6b66..20ad157 100644 --- a/config/nginx/ernest.licensed +++ b/config/nginx/ernest.licensed @@ -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 { diff --git a/config/webui/app.globals.ts b/config/webui/app.globals.ts new file mode 100644 index 0000000..8413a08 --- /dev/null +++ b/config/webui/app.globals.ts @@ -0,0 +1,6 @@ +export const GlobalVariable = Object.freeze({ + BASE_URL: 'ERNESTHOSTNAME', + BASE_API_URL: 'https://ERNESTHOSTNAME', + SESSION_LENGTH: 604800, //1 week + ENTERPRISE: true +}); diff --git a/definition.yml b/definition.yml index 956917b..324f61d 100644 --- a/definition.yml +++ b/definition.yml @@ -339,3 +339,13 @@ repos: environment: NATS_URI: nats://nats:4222 restart: always + + - name: webui + edition: enterprise + path: git@github.com:ernestio/webui.git + branch: master + networks: + - ernest + volumes: + - ./config/webui/app.globals.ts:/repo/src/app/app.globals.ts + restart: always diff --git a/setup b/setup index 1f26bba..a3aa861 100755 --- a/setup +++ b/setup @@ -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 @@ -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