Running cavemo locally

Hi, i’m trying to run cavemo locally to test some features of 7.14 release. I’m following this guide:


I have downloaded docker-compose.yml and added some services to run it on single instance (mailhog, postgre), now it looks like this:
---
version: '3'

services:
  postgres_db:
image: postgres:12.2
container_name: cawemo-postgres
restart: always
ports:
  - 5432
environment:
  - POSTGRES_DB=cawemo
  - POSTGRES_USER=cawemo
  - POSTGRES_PASSWORD=cawemo
expose:
  - 5432
  smtp-fake:
image: mailhog/mailhog
container_name: cawemo-mailhog
restart: always
ports:
  - 1025:1025
  - 8025:8025
  apiserver:
image: registry.camunda.cloud/cawemo-ee/cawemo-apiserver:1.4.0
container_name: cawemo-apiserver
restart: always
labels:
  - 'cawemo'
environment:
  - JAVA_OPTIONS=-Xmx256m
  - PRODUCT_CONTEXT=enterprise
  - CAWEMO_DB_HOST=${DB_HOST}
  - CAWEMO_DB_PORT=${DB_PORT}
  - CAWEMO_DB_NAME=${DB_NAME}
  - CAWEMO_DB_USER=${DB_USER}
  - CAWEMO_DB_PASSWORD=${DB_PASSWORD}
  - CAWEMO_MAIL_HOST=${SMTP_HOST}
  - CAWEMO_MAIL_PORT=${SMTP_PORT}
  - CAWEMO_MAIL_USER=${SMTP_USER}
  - CAWEMO_MAIL_PASSWORD=${SMTP_PASSWORD}
  - CAWEMO_MAIL_ENABLE_TLS=${SMTP_ENABLE_TLS}
  - CAWEMO_MAIL_FROM_ADDRESS=${SMTP_FROM_ADDRESS}
  - CAWEMO_MAIL_FROM_NAME=${SMTP_FROM_NAME}
  - CAWEMO_MIGRATION_MIGRATE=true
  - CAWEMO_PUSHER_APP_ID=1
  - CAWEMO_PUSHER_KEY=1
  - CAWEMO_PUSHER_SECRET=${WEBSOCKET_SECRET}
  - CAWEMO_PUSHER_HOST=garufa
  - CAWEMO_SERVER_CACHE_TEMPLATES=true
  - CAWEMO_SERVER_SHUTDOWN_TIMEOUT=9000
  - CAWEMO_SERVER_URL=${SERVER_URL}
  - CLIENT_THEME_COLORS_PRIMARY=${THEME_COLOR_PRIMARY}
  - CLIENT_THEME_COLORS_SECONDARY=${THEME_COLOR_SECONDARY}
  - CLIENT_THEME_COLORS_ACCENT=${THEME_COLOR_ACCENT}
  - LICENSE_FILE_PATH=/config.key
volumes:
  - ${HOST_LICENSE_FILE_PATH}:/config.key
expose:
  - '8080'
links:
  - garufa:garufa
command: classpath:///apiserver-enterprise.toml

  restapi:
image: registry.camunda.cloud/cawemo-ee/cawemo-restapi:1.4.0
container_name: cawemo-restapi
restart: always
labels:
  - 'cawemo'
environment:
  - JAVA_OPTIONS=-Xmx256m
  - CAWEMO_DB_HOST=${DB_HOST}
  - CAWEMO_DB_PORT=${DB_PORT}
  - CAWEMO_DB_NAME=${DB_NAME}
  - CAWEMO_DB_USER=${DB_USER}
  - CAWEMO_DB_PASSWORD=${DB_PASSWORD}
  - CAWEMO_MAIL_HOST=${SMTP_HOST}
  - CAWEMO_MAIL_PORT=${SMTP_PORT}
  - CAWEMO_MAIL_USER=${SMTP_USER}
  - CAWEMO_MAIL_PASSWORD=${SMTP_PASSWORD}
  - CAWEMO_MAIL_ENABLE_TLS=${SMTP_ENABLE_TLS}
  - CAWEMO_MAIL_FROM_ADDRESS=${SMTP_FROM_ADDRESS}
  - CAWEMO_MAIL_FROM_NAME=${SMTP_FROM_NAME}
  - CAWEMO_MIGRATION_MIGRATE=true
  - CAWEMO_PUSHER_APP_ID=1
  - CAWEMO_PUSHER_KEY=1
  - CAWEMO_PUSHER_SECRET=${WEBSOCKET_SECRET}
  - CAWEMO_PUSHER_HOST=garufa
  - CAWEMO_PUSHER_PORT=8060
  - CAWEMO_SERVER_CACHE_TEMPLATES=true
  - CAWEMO_SERVER_SHUTDOWN_TIMEOUT=9000
  - CAWEMO_SERVER_URL=${SERVER_URL}
  - CLIENT_THEME_COLORS_PRIMARY=${THEME_COLOR_PRIMARY}
  - CLIENT_THEME_COLORS_SECONDARY=${THEME_COLOR_SECONDARY}
  - CLIENT_THEME_COLORS_ACCENT=${THEME_COLOR_ACCENT}
expose:
  - '8081'
links:
  - garufa:garufa

  webapp:
image: registry.camunda.cloud/cawemo-ee/cawemo-webapp:1.4.0
container_name: cawemo-webapp
restart: always
labels:
  - 'cawemo'
environment:
  - NODE_ENV=production
  - NODE_OPTIONS=--max-old-space-size=128
  - PRODUCT_CONTEXT=enterprise
  - BACKEND_API_URL=http://apiserver:8080
  - REST_API_URL=http://restapi:8081
  - CLIENT_PUSHER_KEY=1
  - CLIENT_PUSHER_HOST=${BROWSER_WEBSOCKET_HOST}
  - CLIENT_PUSHER_PORT=${BROWSER_WEBSOCKET_PORT}
  - CLIENT_PUSHER_FORCETLS=${BROWSER_WEBSOCKET_FORCETLS}
  - CLIENT_THEME_COLORS_PRIMARY=${THEME_COLOR_PRIMARY}
  - CLIENT_THEME_COLORS_SECONDARY=${THEME_COLOR_SECONDARY}
  - CLIENT_THEME_COLORS_ACCENT=${THEME_COLOR_ACCENT}
  - CLIENT_THEME_LOGOPATH=${THEME_LOGO_URL}
  - NODE_SESSION_COOKIE_SECRET=${SERVER_SESSION_COOKIE_SECRET}
  - PUSHER_APP_ID=1
  - PUSHER_KEY=1
  - PUSHER_HOST=garufa
  - PUSHER_SECRET=${WEBSOCKET_SECRET}
  - SERVER_HTTPS_ONLY=${SERVER_HTTPS_ONLY}
  - SERVER_HOST=${SERVER_HOST}
ports:
  - '8080:8070'
links:
  - apiserver:apiserver
  - restapi:restapi
  - garufa:garufa

  garufa:
image: registry.camunda.cloud/cawemo-ee/cawemo-garufa:1.4.0
container_name: cawemo-garufa
restart: always
labels:
  - 'cawemo'
environment:
  - APP_ID=1
  - APP_KEY=1
  - SECRET=${WEBSOCKET_SECRET}
ports:
  - '8060:8060'

i have also created .env file, and filled it like this:

##########
# CAWEMO #
##########
SERVER_URL=localhost
SERVER_HOST=localhost
SERVER_HTTPS_ONLY=false
SERVER_SESSION_COOKIE_SECRET=67DX5O8WAWCDEJM9RIJ1ILM0Y4PYAF4B

############
# DATABASE #
############
DB_HOST=localhost:5432
DB_NAME=cawemo
DB_USER=cawemo
DB_PASSWORD=cawemo

#########
# EMAIL #
#########
SMTP_HOST=localhost
SMTP_PORT=1025
SMTP_USER=cawemo
SMTP_PASSWORD=cawemo
SMTP_ENABLE_TLS=false
SMTP_FROM_ADDRESS=cawemo@your-company.com
SMTP_FROM_NAME=Cawemo

##############
# WEBSOCKETS #
##############
BROWSER_WEBSOCKET_HOST=localhost
BROWSER_WEBSOCKET_PORT=8060
BROWSER_WEBSOCKET_FORCETLS=false
WEBSOCKET_SECRET=67DX5O8WAWCDEJM9RIJ1ILM0Y4PYAF4B

################################
# FRONTEND STYLE CUSTOMIZATION #
################################
THEME_COLOR_PRIMARY=#2875cc
THEME_COLOR_SECONDARY=#00bfa5
THEME_COLOR_ACCENT=#343434
# A PNG file of 134px width and 20px height is recommended
THEME_LOGO_URL=/img/cawemo-enterprise-default.min.svg

###########
# LICENSE #
###########
HOST_LICENSE_FILE_PATH=/home/user/testProject/

However, upon startup i receive the following stacktrace from apiserver:

 ERROR com.cawemo.crosscutting.Main - Unable to read configuration
cawemo-apiserver | java.lang.NumberFormatException: For input string: ""
cawemo-apiserver | 	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
cawemo-apiserver | 	at java.base/java.lang.Integer.parseInt(Integer.java:662)
cawemo-apiserver | 	at java.base/java.lang.Integer.valueOf(Integer.java:983)
cawemo-apiserver | 	at java.base/java.util.Optional.map(Optional.java:265)
cawemo-apiserver | 	at com.cawemo.crosscutting.configuration.AppConfiguration.mergeWithEnvironment(AppConfiguration.java:237)
cawemo-apiserver | 	at com.cawemo.crosscutting.configuration.AppConfiguration.loadAppConfigurationMergeWithDefaultsAndEnvironment(AppConfiguration.java:112)
cawemo-apiserver | 	at com.cawemo.crosscutting.configuration.AppConfiguration.fromTomlMergedWithDefaultsAndEnvironment(AppConfiguration.java:75)
cawemo-apiserver | 	at com.cawemo.crosscutting.Main.getAppConfiguration(Main.java:80)
cawemo-apiserver | 	at com.cawemo.crosscutting.Main.main(Main.java:29)

What did i miss here?

nevermind, got it to work, turns out HOST_LICENSE_FILE_PATH needs to be full path to file, not catalog

1 Like