Checkout the docker image
A very simple and basic frontend for the ADC middleware server, meant only for the demonstration of the middleware's access control capabilities.
The docker image hosts the SPA and it assumes that:
- Keycloak is hosted in the same domain as the SPA but on
/auth
- The middleware is hosted in the same domain as the SPA but on
/airr
- That Keycloak has been configured with a correct client with username
front-end
.
To setup the correct client in Keycloak, go to the admin dashboard and create a new client in the Clients
side panel tab: load (import) and save the client from the file config/front-end.json
.
- Install deps
yarn install
- Setup keycloak
Start keycloak and then create a new client in the Clients
side panel tab: load (import) and save the client from the file config/front-end.json
. Go to Installation
tab in the client and download the Keycloak OIDC JSON
format and place in public/keycloak.json
, you will need to replace the value's auth-server-url
host with with the front-ends's server value (e.g. cahnge to http://localhost:3000/auth/
).
If you run the middleware server or keycloak server in unexpected ports you need to update
.env
- Disable CORS in browser
For firefox you can use this extension
-
Run locally:
yarn start
-
Build:
yarn build
Build local image
docker build -t ros65536/adc-middleware-frontend .
Trigger Dockerhub image CI build:
git tag -a v<VERSION> -m <MESSAGE> # tag latest commit
git push origin --tags # This should trigger a build in dockerhub