Skip to content

Custom domain - environmental variable being ignored #327

@kdnguyen16

Description

@kdnguyen16

We are running cbomkit off a separate host/server. This was working pre-Christmas however lately we've noticed the system is not honouring our environment variables so the browser on the client sends requests to local host instead of the server.

http://localhost:8081/api/v1/cbom/last/5
ws://localhost:8081/v1/scan/7d0ef84c-a46c-4b10-b08f-27a3bcdc9c9c

Returns: net:ERR_CONNECTION_REFUSE

Docker Compose file below:

services:
backend:
image: ghcr.io/cbomkit/cbomkit:${CBOMKIT_VERSION}
depends_on:
- db
environment:
CBOMKIT_DB_TYPE: postgresql
CBOMKIT_DB_JDBC_URL: jdbc:postgresql://db:5432/postgres
CBOMKIT_PORT: 8081
CBOMKIT_DB_USERNAME: ${POSTGRESQL_AUTH_USERNAME}
CBOMKIT_DB_PASSWORD: ${POSTGRESQL_AUTH_PASSWORD}
CBOMKIT_FRONTEND_URL_CORS: "http://aumelsrv96:8001"

CBOMKIT_REGULATOR_API_BASE: "http://regulator:8080"

CBOMKIT_QS_EXPLORER_API_BASE: "http://aumelsrv96:8000/api/v1/scan"

ports:
  - "8081:8081"
volumes:
  - cbomkit-volume:/home/user/.cbomkit
restart: always
deploy:
  resources:
    reservations:
      memory: 16g
profiles:
  - prod
  - ext-compliance
  - dev-frontend

frontend:
image: ghcr.io/cbomkit/cbomkit-frontend:${CBOMKIT_VERSION}
environment:
VUE_APP_HTTP_API_BASE: "http://aumelsrv96:8081"
VUE_APP_WS_API_BASE: "ws://aumelsrv96:8081"
VUE_APP_TITLE: "CBOMkit"
VUE_APP_VIEWER_ONLY: ${CBOMKIT_VIEWER}
ports:
- "8001:8000"
restart: always
profiles:
- prod
- ext-compliance
- dev-backend
- viewer
db:
image: docker.io/library/postgres:16-alpine
user: postgres
environment:
POSTGRES_DB: postgres
POSTGRES_USER: ${POSTGRESQL_AUTH_USERNAME}
POSTGRES_PASSWORD: ${POSTGRESQL_AUTH_PASSWORD}
ports:
- "5432:5432"
healthcheck:
test: [ "CMD", "pg_isready -U ${POSTGRESQL_AUTH_USERNAME} -d postgres" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- "pg-volume:/var/lib/postgresql/data/"
restart: always
profiles:
- prod
- ext-compliance
- dev
- dev-backend
- dev-frontend
regulator:
image: ibm-regulator
environment:
OPA_BASE_URL: "http://opa:8181"
ports:
- "8080:8080"
profiles:
- ext-compliance
opa:
image: docker.io/openpolicyagent/opa:0.66.0
command:
- "run"
- "--addr=0.0.0.0:8181"
- "--server"
ports:
- "8181:8181"
profiles:
- ext-compliance
volumes:
cbomkit-volume:
pg-volume:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions