Adding camunda-license.txt to Enterprise docker-container

Hi guys,
I have a possibly quick question. We are using Camunda Enterprise and we came accross the problem, that Camunda doesn’t find the camunda-license.txt in the resource-folder, when we are trying to deploy it as docker container. We are using Camunda 7 at the moment

Adding the license in the embedded-version works fine, also adding it via the UI, we now wanted to see if we can get a “ready-to-go” enterprise-container with the license aleady being active when deploying, so it does NOT have to be added via he UI manually.

We have tried adding it just as before into the resource-folder, but it was not recognized correctly. Is this possible? Or does it have to be different when using docker?

Look in the docs where the licese file is searched for. It is definitely possible to create a container with the liceense file.

That is what we did, we tried most of what is written here: Camunda License Keys | docs.camunda.org
Is there any other documentation we can check?

One thing I forgot to mention, we are not using the internal H2 but a Postgres that is running in its own container. Might this be a problem, that the DB-connection has some issue? Although it would be a little strange, because everything else regarding the DB is working

I see two possible reasons for this:

  1. You don’t have the permission to set the key. There are some restrictions. But I’m not sure where they are relevant at startup (when the key is initially checked for).

  2. The key file is not found. Did you set the current working directory properly for the k8s container? Where did you put the file?

We haven’t run into any issue regarding permissions. We are able to copy a file in any directory on the system. This is where we are inside of our container:

grafik

And we are not using Kubernetes, we have separate containers being put together by docker compose. This is the part for Camunda:

# ------------------------- CAMUNDA ----------------
backend:
    container_name: camunda-bpm-ee-7-16-0   
    build: camunda-bpm-run-ee-7.16.0-ee/
    links:
        - email-worker-app  
        - postgresDB   
    environment:
        - DB_DRIVER=org.postgresql.Driver
        - DB_URL=jdbc:postgresql://postgresDB:5432/camunda_engine_db
        - DB_USERNAME=camunda
        - DB_PASSWORD=camunda
        - WAIT_FOR=postgresDB:5432          
    ports:         
        - "8051:8080"
    volumes:         
        - camunda-logs:/camunda/logs/                                
    depends_on: 
        - postgresDB

Based on the link previously shared in the thread, you’ll need to work out exactly which user within the container (and where that user’s home directory is) runs Camunda

It looks like you’re using the Camunda built container, so I would probably cheat a little bit, by adding a volume in your volume maps

- ./license.txt:<INFORMATION NEEDED HERE!>/.camunda/license.txt

it looks like Caumnda is running as root within your container, so the <INFORMATION NEEDED HERE!> will likely be /root (specifically)

- ./license.txt:/root/.camunda/license.txt

You would then put your license.txt file right next to your Docker Compose file

With “permissions” I meant permissions within camunda, not within the file system. But, as I said, they should not be of importance here. As @GotnOGuts wrote, it’s crucial to know what is the current directory when the container is run. The correct location of the license file depends on that.

Alright guys, we have it :slight_smile:
What @GotnOGuts said was the key. We added the license-file on its own into the volumes using

volumes:

  • ./camunda-license/license.txt:/root/.camunda/license.txt

and now it is found. Thx for you help :+1: