Docker compose for Connectors

Hello.

I wanted to try the graphql connector in my test process. I added the template to modeler and could model the process but it hang up on the connector.
I figured it out I need to start up the container for it.
I use docker-compose on my local env.

According to this documentation:

I need to create another Dockerfile with 2 lines “FROM” and “ADD” …

So I did it (image name “connectors-graphql”):

FROM camunda/connectors:0.9.0
ADD https://repo1.maven.org/maven2/io/camunda/connector/connector-graphql/0.20.2/connector-graphql-0.20.2-with-dependencies.jar /opt/app/

and executed it in compose like this:

 connectors:
     image: connectors-graphql
     container_name: connectors
     ports:
       - "8085:8080"
     environment:
       - ZEEBE_CLIENT_BROKER_GATEWAY-ADDRESS=zeebe:26500
       - ZEEBE_CLIENT_SECURITY_PLAINTEXT=true
       - ZEEBE_GATEWAY_SECURITY_AUTHENTICATION_MODE=none
       - CAMUNDA_CONNECTOR_POLLING_ENABLED=false
       - CAMUNDA_CONNECTOR_WEBHOOK_ENABLED=false
       - SPRING_MAIN_WEB-APPLICATION-TYPE=none
       - OPERATE_CLIENT_ENABLED=false
     depends_on:
       - zeebe
       - operate

Unfortunatelly it is starting only the logo of Spring and hang up there…
If I try to connect to OPERATE it at least throws exception it cannot be connected which is also strange because I used

ZEEBE_CLIENT_SECURITY_PLAINTEXT=true

so the authorization should not be concern.

What am I missing here?

How should I add the jar with connector and be able to start the container with it?

Best regards
Dominik

You are missing

networks:
  - camunda-platform

And optionally:

env_file: connector-secrets.txt

You can also remove the depency on operate.

Hint: to add a protected resource in the dockerfile you can use the following command:

RUN curl --user "<username>:<password>" --output-dir /opt/app/ "<url_to_jar>"
1 Like

Thank you @cma

If I use the default network for all my services started by this docker-compose do I need the camunda-platform network either way?

How can I switch off the camunda platform communication to be encrypted and use just the plaintext? Or is it not possible and I am forced to use the secrets?

If so, then the credentials for self managed are those I created for the Saas on the online platform?
I could not download the file with env vars as documentation suggested ;(

The secrets have nothing to do with the communication. You can put secrets (name value pairs) in that file and then you can use them in fields that support secrets.

Well yes, I guess you could use the default network for everything, but why would you make Camunda’s templates worse? I actually use the Camunda template and build the connector runtime myself (spring-zeebe-connector-runtime) then I can include a connector just by adding its dependency. You can also add other stuff like configuration, secrets, processes, dmns, deserializers, …

Thank you @cma

Your usage is great. What I was looking for is to use existing imaage of camunda/connectors and just add one needed connector.
It looks simple on the “getting started” page but it is not working for me and I’m searching for the cause.

What template you refere to? Template of the connector or the docker compose? If docker then please provide me which one so I can try myself with it :slight_smile:

Here you
Dominik

I think I used the following docker compose template with some customizations camunda-8-lowcode-ui-template/docker-compose.yaml at main · camunda-community-hub/camunda-8-lowcode-ui-template · GitHub

You can create a docker image like you did, that should be fine. I just never tried it like that because I build the connector runtime with maven (spring-zeebe-connector-runtime is the artefact on which it depends) and then I build the docker image from that. Either way should work. There might be a template for that too but couldn’t find it.