Files
integral-shop/deploy/docker/step2-single-shop-byhlc112/docker-compose.yml
2026-05-29 09:19:30 +08:00

162 lines
4.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# =============================================================
# 步骤二积分商城single-shop-22独立部署
# 客户:宝应宏煜春商贸 byhlc112
# 包含服务redis · single-admin-api · single-front-api
# single-admin-web(Vue) · single-h5(uni-app)
# =============================================================
name: jifenmall-byhlc112
x-common: &common
restart: unless-stopped
environment:
TZ: ${TZ:-Asia/Shanghai}
logging:
driver: json-file
options:
max-size: "20m"
max-file: "5"
x-spring-common: &spring-common
<<: *common
environment:
TZ: ${TZ:-Asia/Shanghai}
MYSQL_HOST: ${RDS_HOST}
MYSQL_DATABASE: ${RDS_DB}
MYSQL_USERNAME: ${RDS_USER}
MYSQL_PASSWORD: ${RDS_PASSWORD}
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
SYNC_SOURCE_ID: ${SYNC_SOURCE_ID:-shop_16}
SYNC_TARGET_MER_ID: ${SYNC_TARGET_MER_ID:-16}
networks:
single-net:
driver: bridge
volumes:
single-redis-data:
services:
redis:
<<: *common
build:
context: .
dockerfile: redis.Dockerfile
image: jifenmall-byhlc112/redis:local
container_name: single-redis-byhlc112
command: ["--requirepass", "${REDIS_PASSWORD}", "--appendonly", "yes"]
volumes:
- single-redis-data:/data
networks: [single-net]
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 10s
timeout: 3s
retries: 5
single-front-api:
<<: *spring-common
build:
context: .
dockerfile: ../single-shop/front-api.Dockerfile
image: jifenmall-byhlc112/front-api:local
container_name: single-front-api-byhlc112
networks: [single-net]
ports:
- "127.0.0.1:30033:30033"
volumes:
- ${SINGLE_FRONT_JAR}:/app/app.jar:ro
- ${CRMEB_IMAGE_DIR}:/usr/local/crmeb/crmebimage
- ${SINGLE_FRONT_LOG_DIR}:/app/log
- ../single-shop/application-docker.yml:/config/application-docker.yml:ro
environment:
TZ: ${TZ:-Asia/Shanghai}
MYSQL_HOST: ${RDS_HOST}
MYSQL_DATABASE: ${RDS_DB}
MYSQL_USERNAME: ${RDS_USER}
MYSQL_PASSWORD: ${RDS_PASSWORD}
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
SYNC_SOURCE_ID: ${SYNC_SOURCE_ID:-shop_16}
SYNC_TARGET_MER_ID: ${SYNC_TARGET_MER_ID:-16}
SERVER_PORT: 30033
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:30033/actuator/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 90s
single-admin-api:
<<: *spring-common
build:
context: .
dockerfile: ../single-shop/admin-api.Dockerfile
image: jifenmall-byhlc112/admin-api:local
container_name: single-admin-api-byhlc112
networks: [single-net]
ports:
- "127.0.0.1:30032:30032"
volumes:
- ${SINGLE_ADMIN_JAR}:/app/app.jar:ro
- ${CRMEB_IMAGE_DIR}:/usr/local/crmeb/crmebimage
- ${SINGLE_ADMIN_LOG_DIR}:/app/log
- ../single-shop/application-docker.yml:/config/application-docker.yml:ro
environment:
TZ: ${TZ:-Asia/Shanghai}
MYSQL_HOST: ${RDS_HOST}
MYSQL_DATABASE: ${RDS_DB}
MYSQL_USERNAME: ${RDS_USER}
MYSQL_PASSWORD: ${RDS_PASSWORD}
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
SYNC_SOURCE_ID: ${SYNC_SOURCE_ID:-shop_16}
SYNC_TARGET_MER_ID: ${SYNC_TARGET_MER_ID:-16}
SERVER_PORT: 30032
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:30032/actuator/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 90s
single-admin-web:
<<: *common
build:
context: .
dockerfile: ../single-shop/admin-web.Dockerfile
image: jifenmall-byhlc112/admin-web:local
container_name: single-admin-web-byhlc112
networks: [single-net]
ports:
- "${SINGLE_ADMIN_PORT:-18081}:80"
volumes:
- ${SINGLE_ADMIN_WEB_DIR}:/usr/share/nginx/html
depends_on:
- single-admin-api
single-h5:
<<: *common
build:
context: .
dockerfile: ../single-shop/h5.Dockerfile
image: jifenmall-byhlc112/h5:local
container_name: single-h5-byhlc112
networks: [single-net]
ports:
- "${SINGLE_H5_PORT:-18082}:80"
volumes:
- ${SINGLE_H5_DIR}:/usr/share/nginx/html
depends_on:
- single-front-api