96 lines
3.1 KiB
YAML
96 lines
3.1 KiB
YAML
|
|
# =============================================================
|
|||
|
|
# 步骤一:寄卖商城(integral-resell)独立部署
|
|||
|
|
# 客户:池州雷蕾商贸 czleilei240
|
|||
|
|
# 包含服务:redis · integral-houtai(webman) · integral-h5(Nginx)
|
|||
|
|
# =============================================================
|
|||
|
|
|
|||
|
|
name: resell-czleilei240
|
|||
|
|
|
|||
|
|
x-common: &common
|
|||
|
|
restart: unless-stopped
|
|||
|
|
environment:
|
|||
|
|
TZ: ${TZ:-Asia/Shanghai}
|
|||
|
|
logging:
|
|||
|
|
driver: json-file
|
|||
|
|
options:
|
|||
|
|
max-size: "20m"
|
|||
|
|
max-file: "5"
|
|||
|
|
|
|||
|
|
networks:
|
|||
|
|
integral-net:
|
|||
|
|
driver: bridge
|
|||
|
|
|
|||
|
|
volumes:
|
|||
|
|
integral-redis-data:
|
|||
|
|
integral-runtime:
|
|||
|
|
|
|||
|
|
services:
|
|||
|
|
# ---------- Redis ----------
|
|||
|
|
redis:
|
|||
|
|
<<: *common
|
|||
|
|
build:
|
|||
|
|
context: .
|
|||
|
|
dockerfile: redis.Dockerfile
|
|||
|
|
image: resell-czleilei240/redis:local
|
|||
|
|
container_name: integral-redis
|
|||
|
|
command: ["--requirepass", "${REDIS_PASSWORD}", "--appendonly", "yes"]
|
|||
|
|
volumes:
|
|||
|
|
- integral-redis-data:/data
|
|||
|
|
networks: [integral-net]
|
|||
|
|
healthcheck:
|
|||
|
|
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
|
|||
|
|
interval: 10s
|
|||
|
|
timeout: 3s
|
|||
|
|
retries: 5
|
|||
|
|
|
|||
|
|
# ---------- Webman 后端 ----------
|
|||
|
|
integral-houtai:
|
|||
|
|
<<: *common
|
|||
|
|
build:
|
|||
|
|
context: ../../../integral-resell/houtai
|
|||
|
|
dockerfile: ../../deploy/docker/integral-resell/houtai.Dockerfile
|
|||
|
|
image: resell-czleilei240/houtai:latest
|
|||
|
|
container_name: integral-houtai
|
|||
|
|
networks: [integral-net]
|
|||
|
|
ports:
|
|||
|
|
# 宝塔 Nginx 直连 webman API(webman.bin 写死监听 8785)
|
|||
|
|
- "${RESELL_API_PORT:-18085}:8785"
|
|||
|
|
volumes:
|
|||
|
|
# 整个应用目录挂到宿主机 /www/wwwroot/leileiadmin.czchunfang.com/
|
|||
|
|
# FTP 上传新 webman.bin / public/ 后 docker compose restart integral-houtai 即可生效
|
|||
|
|
- ${RESELL_HOUTAI_DIR}:/app
|
|||
|
|
# .env 单独挂入(覆盖宿主机目录里的 .env),避免明文密码出现在 wwwroot
|
|||
|
|
- ./houtai.env:/app/.env:ro
|
|||
|
|
# runtime 使用命名卷(日志/session/pid 不受 FTP 覆盖影响)
|
|||
|
|
- integral-runtime:/app/runtime
|
|||
|
|
depends_on:
|
|||
|
|
redis:
|
|||
|
|
condition: service_healthy
|
|||
|
|
|
|||
|
|
# ---------- H5 静态站 ----------
|
|||
|
|
integral-h5:
|
|||
|
|
<<: *common
|
|||
|
|
build:
|
|||
|
|
context: ../../../integral-resell/h5
|
|||
|
|
dockerfile: ../../deploy/docker/integral-resell/h5.Dockerfile
|
|||
|
|
image: resell-czleilei240/h5:latest
|
|||
|
|
container_name: integral-h5
|
|||
|
|
networks: [integral-net]
|
|||
|
|
environment:
|
|||
|
|
TZ: ${TZ:-Asia/Shanghai}
|
|||
|
|
INTEGRAL_TITLE: ${INTEGRAL_TITLE}
|
|||
|
|
INTEGRAL_API_PUBLIC_URL: ${INTEGRAL_API_PUBLIC_URL}
|
|||
|
|
INTEGRAL_IMG_PUBLIC_URL: ${INTEGRAL_IMG_PUBLIC_URL}
|
|||
|
|
INTEGRAL_H5_PUBLIC_URL: ${INTEGRAL_H5_PUBLIC_URL}
|
|||
|
|
INTEGRAL_SN_ID: ${INTEGRAL_SN_ID}
|
|||
|
|
INTEGRAL_APP_STR: ${INTEGRAL_APP_STR}
|
|||
|
|
INTEGRAL_CONTRACT_PAGE: ${INTEGRAL_CONTRACT_PAGE}
|
|||
|
|
volumes:
|
|||
|
|
# H5 静态文件目录挂到宿主机,手动更新 JS/configs.js 直接生效,无需重建镜像
|
|||
|
|
# 子目录 crmebimage/ 同时由步骤二 Java 后端写入(PDF/图片),Nginx 直接对外提供访问
|
|||
|
|
- ${RESELL_H5_DIR}:/usr/share/nginx/html
|
|||
|
|
ports:
|
|||
|
|
- "${INTEGRAL_H5_PORT:-18080}:80"
|
|||
|
|
depends_on:
|
|||
|
|
- integral-houtai
|