Cannot able to Access Camunda Rest api from docker-compose

Hi,

Iam using a spring boot application for currency booking service integrated with camunda bpm on top of it. I could not able to access rest api of camunda when am starting that with docker-compose…
Note:
Camunda Bpm is deployed as War file.

Hi There,

We need a lot more details before we can properly answer this. Please read the Style Guide.

Please explain exactly what you’ve done. Exactly what happened and exactly what you expected would happen.

Hi Niall,

I have created a Spring boot camunda application and i had dockerized it as below:

Dockerfile

FROM tomcat:8.0.51-jre8-alpine
EXPOSE 8111
RUN rm -rf /usr/local/tomcat/webapps/*
COPY ./target/*.war /usr/local/tomcat/webapps/bookingservice-bpm.war
CMD [“catalina.sh”,“run”]

in a Dockerfile.

This is my docker-compose file:

version: ‘3.7’
services:
mysql:
image: mysql:5.7
ports:
- “3309:3306”
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_PASSWORD: dummypassword
MYSQL_USER: todos-user
MYSQL_PASSWORD: dummytodos
MYSQL_DATABASE: todos
networks:
- bookingservice-custom-network
volumes:
- mysql-database-data-volume:/var/lib/mysql

currency-exchange-service:
image: 801196/currency-exchange:12.0.0-RELEASE
ports:
- “8000:8000”
restart: always
depends_on:
- mysql
environment:
RDS_HOSTNAME: mysql
RDS_PORT: 3306
RDS_DB_NAME: todos
RDS_USERNAME: todos-user
RDS_PASSWORD: dummytodos
networks:
- bookingservice-custom-network

currency-conversion-service:
image: 801196/currency-conversion:16.0.0-RELEASE
ports:
- “8100:8100”
restart: always
depends_on:
- mysql
- currency-exchange-service
environment:
CURRENCY_EXCHANGE_URI: http://currency-exchange-service:8000/currency-exchange
BPM_HOST_URL: http://bookingservice-bpm-service:8111/bookingservice-bpm/engine-rest
RDS_HOSTNAME: mysql
RDS_PORT: 3306
RDS_DB_NAME: todos
RDS_USERNAME: todos-user
RDS_PASSWORD: dummytodos
networks:
- bookingservice-custom-network

bookingservice-bpm-service:
image: 801196/bookingservice-bpm:18.0.0.0-SNAPSHOT
ports:
- “8111:8080”
restart: always
depends_on:
- mysql
environment:
- DB_DRIVER=com.mysql.jdbc.Driver
- DB_URL=jdbc:mysql://mysql:3306/todos
- DB_USERNAME=todos-user
- DB_PASSWORD=dummytodos
networks:
- bookingservice-custom-network

networks:
bookingservice-custom-network:

Volumes

volumes:
mysql-database-data-volume:

And this is my application.yaml

server:
port: 8111
spring:
datasource:
driverClassName: ${DB_DRIVER:com.mysql.jdbc.Driver}
url: ${DB_URL:jdbc:mysql://localhost:3306/todos}
username: ${DB_USERNAME:root}
password: ${DB_PASSWORD:root}
jpa:
hibernate.ddl-auto: update
generate-ddl: true
show-sql: true
jersey:
application-path: /engine-rest

camunda.bpm.admin-user:
id: admin
password: admin

when am trying to run docker-compose i could able to login but i cannot able to consume rest-api’s given by camunda in to my spring boot project and am getting connection refused.
Please find the attachment for your reference

@Niall, Awaiting for your reply…
Please help me out in this problem.

HI @SAI_MANOJ ,
I am new to using docker and was trying to build a docker-compose for the same.
I am not able to deploy the war files needed… and nor the connection to the MYSQL db is getting reflected.

Following is my docker compose file
Am i missing something?

version: ‘3’
services:
mysql:
image: mysql:5.7
container_name: camunda_mysqlDB
environment:
- MYSQL_PASSWORD=camunda
- MYSQL_DATABASE=camunda
- MYSQL_ROOT_PASSWORD=camunda
ports:
- “3310:3306”
restart: unless-stopped

camunda:
  image: camunda/camunda-bpm-platform:run-latest
  container_name: camunda-bpm
  volumes: 
        - ./test.war:/camunda/webapps/test.war
  environment:
      - DB_DRIVER=com.mysql.cj.jdbc.Driver
      - DB_URL=jdbc:mysql://mysql:3306/camunda?sendFractionalSeconds=false&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
      - DB_USERNAME=root
      - DB_PASSWORD=SmarTECHS@123
      # - WAIT_FOR= mysql:3306
      # - WAIR_FOR_TIMEOUT= 120
  depends_on: 
    - "mysql"
  ports:
      - "8051:8080"
  restart: unless-stopped

I am getting the following error
JAXBContext implementation could not be found. WADL feature is disabled tomcat