我对此很陌生。你能告诉我如何设置在 Docker 中运行的调试 Java 程序吗?
该项目是在 Maven 的帮助下构建的,之后使用 Docker*.war
来运行程序。据我了解,必须远程推送 IntelliJ 进行调试。
docker-compose.yml :
# myapp (Wildfly + Keycloak + myapp)
myapp-myapp:
image: myapp/wildfly-myapp:wf11
container_name: myapp-myapp
depends_on:
- myapp-postgres
- myapp-mailhog
environment:
TZ : Europe/Paris
KEYCLOAK_URL: http://localhost:8080/auth
WILDFLY_PROXY_ADDRESS_FORWARDING: "true"
JAVA_OPTS:
DB_CONNEXION_URL: jdbc:postgresql://myapp-postgres:5432/myapp_db
DB_CONNEXION_URL_DELIMITER: "|"
DB_HOST: myapp-postgres
DB_NAME: ${DB_NAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_USER: ${DB_USER}
KEYCLOAK_DB_CONNEXION_URL: jdbc:postgresql://myapp-postgres:5432/keycloak
KEYCLOAK_DB_CONNEXION_URL_DELIMITER: "|"
KEYCLOAK_DB_USER : keycloak
KEYCLOAK_DB_PASSWORD : keycloak
KEYCLOAK_DB_NAME : keycloak
KEYCLOAK_DB_HOST: postgres
APP_CLUSTER: "false"
JGROUPS_EXTERNAL_ADDRESS: 10.178.27.30
JGROUPS_TCP_EXTERNAL_PORT: 7600
JGROUPS_TCP_BIND_PORT: 7600
JGROUPS_DEFAULT_STACK: tcpping
JGROUPS_INITIAL_HOSTS: "10.178.27.30[7600]"
WILDFLY_CLUSTER_PASSWORD:
WILDFLY_NODE_NAME: myapp-master
SMTP_HOST: myapp-mailhog
SMTP_PORT: 1025
SMTP_FROM: ${SMTP_FROM}
SMTP_USERNAME: ""
SMTP_PASSWORD: ""
myapp_LOG_LEVEL: "ALL"
myapp_DEBUG_LEVEL: "ALL"
volumes:
- ./myapp/data:/opt/jboss/myappdata
- ./myapp/logs:/opt/jboss/wildfly/standalone/log
- ./myapp/deployments:/opt/jboss/wildfly/standalone/deployments
- ./myapp/configuration/myapp-admin.properties:/opt/jboss/wildfly/standalone/configuration/myapp-admin.properties
- ${ST_SRC}:/opt/jboss/myappdata/${PROVIDER_CODE}/frontend/st
- ${CC_SRC}:/opt/jboss/myappdata/${PROVIDER_CODE}/frontend/cc
- ${SC_SRC}:/opt/jboss/myappdata/${PROVIDER_CODE}/frontend/sc
ports:
- "8080:8080"
- "7600:7600"
交互式爱情
相关分类