2
0

feat: docker compose debug yaml

This commit is contained in:
zhangsz
2025-02-14 19:50:58 +08:00
parent 68a82a2439
commit 4be82e0838

View File

@@ -4,6 +4,9 @@ services:
container_name: ${MYSQL_SERVICE_NAME} container_name: ${MYSQL_SERVICE_NAME}
build: build:
context: ./mysql context: ./mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- TZ=${TZ}
ports: ports:
- "${MYSQL_SERVICE_PORT}:${MYSQL_SERVICE_PORT}" - "${MYSQL_SERVICE_PORT}:${MYSQL_SERVICE_PORT}"
networks: networks:
@@ -14,8 +17,6 @@ services:
- ./mysql/logs:/opt/wfc/mysql/logs - ./mysql/logs:/opt/wfc/mysql/logs
- ./mysql/data:/var/lib/mysql - ./mysql/data:/var/lib/mysql
- ./mysql/tmp:/tmp - ./mysql/tmp:/tmp
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
healthcheck: healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -u root -p'${MYSQL_ROOT_PASSWORD}'"] test: ["CMD-SHELL", "mysqladmin ping -u root -p'${MYSQL_ROOT_PASSWORD}'"]
interval: 10s interval: 10s
@@ -28,6 +29,8 @@ services:
container_name: wfc-redis container_name: wfc-redis
build: build:
context: ./redis context: ./redis
environment:
- TZ=${TZ}
ports: ports:
- "${REDIS_PORT}:${REDIS_PORT}" - "${REDIS_PORT}:${REDIS_PORT}"
networks: networks:
@@ -62,6 +65,7 @@ services:
- NACOS_SERVER_IP=${NACOS_SERVER_IP} - NACOS_SERVER_IP=${NACOS_SERVER_IP}
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT} - NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/home/nacos/conf/ - SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/home/nacos/conf/
- TZ=${TZ}
volumes: volumes:
- ./nacos/logs/:/home/nacos/logs - ./nacos/logs/:/home/nacos/logs
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties - ./nacos/conf/application.properties:/home/nacos/conf/application.properties
@@ -77,8 +81,8 @@ services:
healthcheck: healthcheck:
test: ["CMD-SHELL", "curl -f http://${NACOS_SERVER_IP}:${NACOS_SERVER_PORT}/nacos/v1/console/health/liveness || exit 1"] test: ["CMD-SHELL", "curl -f http://${NACOS_SERVER_IP}:${NACOS_SERVER_PORT}/nacos/v1/console/health/liveness || exit 1"]
interval: 30s interval: 30s
timeout: 30s timeout: 10s
retries: 10 retries: 5
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
wfc-gateway: wfc-gateway:
@@ -108,10 +112,11 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT} - NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- GATEWAY_SERVER_PORT=${GATEWAY_SERVER_PORT} - GATEWAY_SERVER_PORT=${GATEWAY_SERVER_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/ - SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
healthcheck: healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${GATEWAY_SERVER_PORT}/actuator/health || exit 1"] test: ["CMD-SHELL", "curl -f http://localhost:${GATEWAY_SERVER_PORT}/actuator/health || exit 1"]
interval: 30s interval: 30s
timeout: 30s timeout: 10s
retries: 10 retries: 10
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
@@ -144,10 +149,11 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT} - NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- AUTH_SERVER_PORT=${AUTH_SERVER_PORT} - AUTH_SERVER_PORT=${AUTH_SERVER_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/ - SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
healthcheck: healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${AUTH_SERVER_PORT}/actuator/health || exit 1"] test: ["CMD-SHELL", "curl -f http://localhost:${AUTH_SERVER_PORT}/actuator/health || exit 1"]
interval: 30s interval: 30s
timeout: 30s timeout: 10s
retries: 10 retries: 10
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
@@ -182,6 +188,7 @@ services:
- WFC_SYSTEM_PORT=${WFC_SYSTEM_PORT} - WFC_SYSTEM_PORT=${WFC_SYSTEM_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/ - SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5005 # 调试参数 - JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5005 # 调试参数
- TZ=${TZ}
healthcheck: healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_SYSTEM_PORT}/actuator/health || exit 1"] test: ["CMD-SHELL", "curl -f http://localhost:${WFC_SYSTEM_PORT}/actuator/health || exit 1"]
interval: 30s interval: 30s
@@ -220,6 +227,7 @@ services:
- WFC_USER_PORT=${WFC_USER_PORT} - WFC_USER_PORT=${WFC_USER_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/ - SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5006 # 调试参数 - JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5006 # 调试参数
- TZ=${TZ}
healthcheck: healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_USER_PORT}/actuator/health || exit 1"] test: ["CMD-SHELL", "curl -f http://localhost:${WFC_USER_PORT}/actuator/health || exit 1"]
interval: 30s interval: 30s
@@ -254,6 +262,7 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT} - NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- WFC_FILE_PORT=${WFC_FILE_PORT} - WFC_FILE_PORT=${WFC_FILE_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/ - SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
wfc-modules-job: wfc-modules-job:
@@ -283,6 +292,7 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT} - NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- WFC_JOB_PORT=${WFC_JOB_PORT} - WFC_JOB_PORT=${WFC_JOB_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/ - SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
wfc-modules-payment: wfc-modules-payment:
@@ -315,6 +325,7 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT} - NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- WFC_PAYMENT_PORT=${WFC_PAYMENT_PORT} - WFC_PAYMENT_PORT=${WFC_PAYMENT_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/ - SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
wfc-nginx: wfc-nginx:
@@ -342,6 +353,7 @@ services:
- GATEWAY_SERVER_PORT=${GATEWAY_SERVER_PORT} - GATEWAY_SERVER_PORT=${GATEWAY_SERVER_PORT}
- WFC_SERVER_IP=${WFC_SERVER_IP} - WFC_SERVER_IP=${WFC_SERVER_IP}
- WFC_SERVER_PORT=${WFC_SERVER_PORT} - WFC_SERVER_PORT=${WFC_SERVER_PORT}
- TZ=${TZ}
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
networks: networks: