erp-java/services/logistics-service/docker-compose.yml

54 lines
1.1 KiB
YAML

version: '3.8'
services:
logistics-service:
build:
context: .
dockerfile: Dockerfile
container_name: logistics-service
restart: unless-stopped
ports:
- "8086:8086"
environment:
# 数据库配置
- DB_HOST=111.229.80.149
- DB_PORT=3306
- DB_NAME=erp_db
- DB_USER=root
- DB_PASSWORD=nihao588+
# Redis配置
- REDIS_HOST=111.229.80.149
- REDIS_PORT=6379
- REDIS_PASSWORD=Y(@r5tGk9$Lp2
# Nacos配置
- NACOS_HOST=111.229.80.149
- NACOS_PORT=8848
- NACOS_NAMESPACE=public
# 服务端口
- LOGISTICS_SERVICE_PORT=8086
# JVM配置
- JAVA_OPTS=-Xms256m -Xmx512m
networks:
- erp-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8086/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
deploy:
resources:
limits:
memory: 768M
reservations:
memory: 256M
logging:
driver: json-file
options:
max-size: "100m"
max-file: "5"
networks:
erp-network:
external: true