Local Dual UI Setup

Install nginx

brew install nginx

Depending on your chipset (Apple/ Intel) you will end up with either of the following:

Document root for placing files is: /usr/local/var/www (Intel) OR /opt/homebrew/var/www (Apple)

Site configs go in /usr/local/etc/nginx/servers/ (Intel) OR /opt/homebrew/etc/nginx/servers/ (Apple)

This guide is based on the Apple default location. If you are using an Intel chipset then you will need to change the attached files to match your setup. i.e. replace /opt/homebrew/ with /usr/local/

Start nginx with brew services start nginx and stop it with brew services stop nginx

Add Hosts file entry

nano /etc/hosts

127.0.0.1 helium.stb.mezzanineware.com 127.0.0.1 app.stb.mezzanineware.com

You can add a domain of your choice but that will require changes to some of the attached files.

Configure Dual Setup

Copy the attached helium.conf file into /opt/homebrew/etc/nginx/includes/ (you might have to create the includes directory)

Copy the attached 001-helium.stb.mezzanineware.com & 002-app.stb.mezzanineware.com files into /opt/homebrew/etc/nginx/servers/

Create the following directory structure within /opt/homebrew/var/www/:

├── helium │   └── web-client └── helium-ui └── dist

Copy the web-client directory from the old ui project to the web-client directory you just created. Do the same for the new ui project by copying the dist directory. You will need to build both projects for production before you copy the contents, you can do so as follows:

Old UI - navigate into the frontend directory and run npm run test

New UI - navigate to the root directory and run npm run build

you can then use the following commands to copy the relevant directories:

Old UI - cp -R /path/to/project/appexec-dsl-web-ui/frontend/dist/web-client/ /opt/homebrew/var/www/helium/web-client/

New UI - cp -R /path/to/project/helium-ui/dist/ /opt/homebrew/var/www/helium-ui/dist/

Update heliums' docker-compose

Navigate to the docker-compose.yml file located in the root of the helium code base.

Update the backend ports from 8080:8080 to 8084:8080

Update Glassfish

Navigate to your Glassfish admin console at localhost:4848and select the server (Admin Server)menu on the left. From here select the Properties tab and update the helium.defaultHostName to helium.stb.mezzanineware.comif present. You can ignore this step if you do not have this property set.

Run Helium

Now that you are setup you can run your local helium setup as normal. Once it is fully up and running you will need to stop the UI container in docker desktop.

Once that has stopped you can start your local nginx.

Navigating to helium.stb.mezzanineware.com should now serve up the production compiled code from your local nginx setup.

Setup your FQDN

Once logged in to helium admin you can setup an app of your choice to use the FQDN which we set in your hosts file - app.stb.mezzanineware.com

Â