I'm trying to build a system in Docker, but it doesn't respond. From the log, I see that when starting, it connects to the database and does not show any errors. However, I don't know if it needs any additional configuration. I'm using the wildfly-jar-maven-plugin and when I run the jar directly, it works normally. However, when placing the jar inside Docker, it does not respond. I would like to know if there is anything else that needs to be done. Below are docker configurations:
Dockerfile:
FROM openjdk:17-jdk-slim-buster
RUN mkdir -p /opt
COPY target/*.jar /opt/comercial-nfe-bootable.jar
EXPOSE 8080
CMD java -Xms${JAVA_XMS:-512m} -Xmx${JAVA_XMX:-3072m} -jar /opt/comercial-nfe-bootable.jar
version: '3.1'
services:
api:
image: comercial-2apex
build: .
environment:
- POSTGRESQL_USER=postgres
- POSTGRESQL_PASSWORD=${POSTGRES_PASSWORD:-12345678}
- POSTGRESQL_DATABASE=adriano
- POSTGRESQL_DATASOURCE=comercialDS
- POSTGRESQL_SERVICE_PORT=5432
- POSTGRESQL_HOST=192.168.18.78
ports:
- 8080:8080
networks:
- comercial-2apex-network
container_name: comercial-2apex
networks:
comercial-2apex-network:
driver: bridge