Hello to all!
I’m nearing the end of my camunda-client project. For it, I wanted to put everything inside a docker-compose container, here is its definition:
version: '3'
services:
postgres:
image: postgres:12.4-alpine
container_name: postgres-db-23
volumes:
- $PWD/postgres-data:/var/lib/postgresql/data
- /Users/Elio/Desktop/Magistrale/Thesis/Codice/camunda-frontend/utilities/camundaDB.sql:/docker-entrypoint-initdb.d/camundaDB.sql
environment:
- POSTGRES_PASSWORD=demodue
- POSTGRES_USER=camunda
- POSTGRES_DB=camunda
ports:
- "6000:5432"
pgAdmin:
image: dpage/pgadmin4
container_name: pgAdmin-23
volumes:
- /Users/Elio/Desktop/Magistrale/Thesis/Codice/camunda-frontend/utilities/servers.json:/pgadmin4/servers.json
ports:
- "5050:5050"
environment:
- PGADMIN_DEFAULT_EMAIL=user@domain.com
- PGADMIN_DEFAULT_PASSWORD=supersecret
- PGADMIN_LISTEN_PORT=5050
camunda:
image: camunda/camunda-bpm-platform:latest
container_name: camunda-bpm-23
ports:
- "7000:8080"
environment:
- DB_DRIVER=org.postgresql.Driver
- DB_USERNAME=camunda
- DB_PASSWORD=demodue
- DB_URL=jdbc:postgresql://postgres:5432/camunda
volumes:
- /Users/Elio/Desktop/Magistrale/Thesis/Codice/docker-camunda-test/webapps/camunda-invoice:/camunda/webapps/camunda-invoice
- /Users/Elio/Desktop/Magistrale/Thesis/Codice/camunda-frontend/utilities/web.xml:/camunda/webapps/engine-rest/WEB-INF/web.xml
command: bash -c "sleep 60 && /sbin/tini -- ./camunda.sh"
depends_on:
- "postgres"
application:
image: pythonode-test:latest
container_name: pythonode-test-23
build: .
volumes:
- /Users/Elio/Desktop/Magistrale/Thesis/Codice/camunda-frontend:/home/camunda-frontend
ports:
- "7001:80"
command: bash -c "python3 utilities/parseXML.py && sleep 60 && utilities/deployments.sh && /etc/init.d/nginx start && tail -F anything"
depends_on:
- "camunda"
I have successfully deployed 9 BPMN process definitions through the deployments.sh
file using the cURL
command. Once I deploy the app, though, it cannot connect to the APIs, giving me an Unknown HTTP Error and returning a 0 code.
I have checked pretty much everything, as I previously modified the web.xml
CORS filters to allow every incoming connection.
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<async-supported>true</async-supported>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.methods</param-name>
<param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.headers</param-name>
<param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
</init-param>
<init-param>
<param-name>cors.exposed.headers</param-name>
<param-value>Access-Control-Allow-Origin</param-value>
</init-param>
<!--
<init-param>
<param-name>cors.support.credentials</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>cors.preflight.maxage</param-name>
<param-value>10</param-value>
</init-param>
-->
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
I thought that I used the wrong hostname, but the cURL
deployments work just fine.
Also, I must say that I’m hosting my Angular App through nginx, I don’t know if this can cause a problem to the app networking.
If anyone could help me with this issue, I would greatly appreciate it. Of course I can give you more information about the code if needed.
Thank you in advance guys