feat(byhlc112): add project deployment configuration
This commit is contained in:
161
deploy/docker/step2-single-shop-byhlc112/docker-compose.yml
Normal file
161
deploy/docker/step2-single-shop-byhlc112/docker-compose.yml
Normal file
@@ -0,0 +1,161 @@
|
||||
# =============================================================
|
||||
# 步骤二:积分商城(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
|
||||
Reference in New Issue
Block a user