While deploying Oclmap and Oclapi2 using the readme files in my VM docker, Do I need to create and .env.local file?

I am unable to deploy the oclmap using the readme files. I’m on a VM docker and trying to deploy standalone and not SSO. Do I have to change any variables or create .env.local file?

What I did -

  1. cloned repos into my vm docker and started docker compose up and build.
  2. changed port mapping to 80:4004 for oclmap.
  3. My browser can’t connect to the server.

What’s your docker-compose.yml?

Please check the following screenshots of my oclmap docker-compose.yml file:

I changed the port to 80 which was originally 4004:4004

Could you please tell me what changes I need to make in the docker-compose.yml for oclmap or oclapi2 to be able to deploy the mapper? I’m using a VM. Thanks.

@pranathipulavarthy Do you have a GA_ACCOUNT_ID?
Sorry, Google stuff is unavailable here.
@Sny and @jamlung Any suggestions? Thanks

GA_ACCOUNT_ID is optional.

1 Like

WEB_PORT should remain 4004, the only change required to bind host’s 80 port is

ports:

  • “80:4004”

Also please make sure OCL API is running at port 8000.

1 Like

Hi @Sny, I created env-config.js file and inserted window.env = {
API_URL: ‘http://my vm ip number here:8080’,
NODE_ENV: ‘production’,
LOGIN_REDIRECT_URL: ‘http://my vm ip number here/’,
OIDC_RP_CLIENT_ID: ‘’,
OIDC_RP_CLIENT_SECRET: ‘’,
GA_ACCOUNT_ID: ‘UA-000000-01’,
HOTJAR_ID: ‘’,
ERRBIT_URL: ‘’,
ERRBIT_KEY: ‘’,
};

because I was getting the error shown in the pic.

And then I did : grep -rl “process.env” src/ | xargs sed -i ‘s/process.env.(NODE_ENV)/process.env.\1/g; s/process.env./window.env./g’

And I can now load the frontend but when i click on sign-up or sign in, it shows 404 error.

Also, this is what safari shows me.

oclmap currently only works with SSO auth. That you can setup using keycloak (check API and oclmap readme for this).

LOGIN_REDIRECT_URL should be the URL of client (oclmap - http://localhost:4004 or change to whats the URL in your case).

Once you setup SSO with KeyClock you will need to pass OIDC_RP_CLIENT_ID and OIDC_RP_CLIENT_SECRET.

Without SSO the oclmap UI will take you to /accounts/login. This functionality works for oclweb2 but not yet developed for oclweb3 and oclmap.

2 Likes