| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- #
- #
- services:
- #
- business-webapi:
- build:
- context: .
- dockerfile: Dockerfile
- no_cache: false
- args:
- - LFS_JAR=${LFS_JAR}
- labels:
- com.hzhs.description: "业务后台"
- com.hzhs.image:version: "1.0.0"
- com.hzhs.app.version: "1.0.0"
- image: business-webapi:${TAG}
- labels:
- - "traefik.enable=true"
- - "traefik.http.middlewares.gzip.compress=true"
- #- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- #
- # Web服务入口 - www
- - "traefik.http.routers.http-business-webapi.entryPoints=http" # 其它可能配置的名称是 web
- - "traefik.http.routers.http-business-webapi.middlewares=gzip"
- - "traefik.http.routers.http-business-webapi.rule=Host(`zjjhyiwuyq-api.hz3r.cn`) && PathPrefix(`/dev-api`)"
- - "traefik.http.routers.http-business-webapi.service=http-business-webapi"
- # 负载均衡配置。
- - "traefik.http.services.http-business-webapi.loadbalancer.server.port=8100"
- #
- environment:
- - "LOG_FILE=business-webapi"
- - "PROFILE=test"
- - "APP_JAR_NAME=business-webapi-1.0.0"
- - "API_PORT=8100"
- - "API_PATH=dev-api"
- #- "REDIS_ENABLED=false"
- #- "REDIS_HOST="
- #- "REDIS_PORT="
- #- "REDIS_PASSWD="
- #- "MYSQL_HOST="
- #- "MYSQL_PORT="
- #- "MYSQL_USER="
- #- "MYSQL_PASSWD="
- #- "LOCAL_OSS_DIRECTORY="
- #- "OSS_BUCKET_NAME=zjjhyiwuyq"
- #- "OSS_SERVER=http://172.16.10.100:9192/"
- #- "OSS_ACCESS_KEY=CMBoDkjkRb457oxCj7ys"
- #- "OSS_ACCESS_SECRET=8uJmULkUFORiTYNfDtj3VBXEwgAgBLNmIYOFi6sN"
- #- "OSS_PUBLIC_ENTRY=http://zjjhyiwuyq.hz3r.cn/"
- #- "ENABLE_TASK_PAYMENT=true"
- volumes:
- - "/var/log/service/:/var/log/app/"
- #- "./application-test.yml:/app/application-test.yml"
- #- "./business-webapi-1.0.0-2601231221.jar:/app/business-webapi-1.0.0-host.jar"
- expose:
- - "8100"
- ports:
- - "172.16.10.100::8100"
- networks:
- - "coolify"
- deploy:
- resources:
- limits:
- memory: 2G
- cpus: '3.00'
- #pids: 1
- reservations:
- cpus: '0.20'
- memory: 1G
- restart: unless-stopped
- healthcheck: # HEALTHCHECK --interval=5m --timeout=3s CMD curl -f http://localhost/ || exit 1
- test: [ "CMD-SHELL", "(curl --fail http://127.0.0.1:8100/dev-api/actuator/health | grep -e '\\\"status\\\"\\:[\\s]*\\\"[uU][pP]\\\"') || exit 1" ]
- start_period: "30s"
- interval: "15s"
- timeout: "15s"
- retries: 5
- #
- networks:
- coolify:
- external: true
- #
- #
|