You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chajia/deploy/docker-compose.bt-host-mysq...

112 lines
2.7 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 查价中台 — 宝塔宿主机 MySQL + Docker 内 Redis无容器 MySQL
# 服务器192.168.2.14 代码目录:/home/project/chajia 对外端口30325
#
# 用法(在项目根目录 /home/project/chajia
# cp deploy/.env.bt-host-mysql.example .env # 若根目录尚无 .env
# bash deploy/install-bt-host-mysql.sh
name: chajia-bt
services:
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
networks:
- internal
next-app:
build:
context: ..
dockerfile: Dockerfile
args:
NEXT_PUBLIC_EMBED_DEMO_SERVICE_TOKEN: ${NEXT_PUBLIC_EMBED_DEMO_SERVICE_TOKEN:-chajia-neibu-2026}
NEXT_PUBLIC_EMBED_DEMO_CUSTOMER_ID: ${NEXT_PUBLIC_EMBED_DEMO_CUSTOMER_ID:-CUST_001}
NEXT_PUBLIC_FLOCK_POLL_TIMEOUT_MS: ${NEXT_PUBLIC_FLOCK_POLL_TIMEOUT_MS:-210000}
restart: unless-stopped
env_file:
- ../.env
environment:
NODE_ENV: production
REDIS_URL: redis://redis:6379
RPA_AUTO_BOOTSTRAP_STORAGE: "false"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- rpa_state:/app/.rpa
ports:
- "0.0.0.0:30325:3000"
depends_on:
redis:
condition: service_healthy
healthcheck:
test:
[
"CMD-SHELL",
"node -e \"require('http').get('http://127.0.0.1:3000',(r)=>process.exit(r.statusCode<500?0:1)).on('error',()=>process.exit(1))\"",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 90s
networks:
- internal
rpa-worker:
build:
context: ..
dockerfile: Dockerfile.worker
restart: unless-stopped
env_file:
- ../.env
environment:
NODE_ENV: production
REDIS_URL: redis://redis:6379
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- rpa_state:/app/.rpa
depends_on:
redis:
condition: service_healthy
next-app:
condition: service_started
shm_size: "2gb"
networks:
- internal
scheduler:
build:
context: ..
dockerfile: Dockerfile.worker
restart: unless-stopped
command: ["npm", "run", "worker:scheduler"]
env_file:
- ../.env
environment:
NODE_ENV: production
REDIS_URL: redis://redis:6379
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
redis:
condition: service_healthy
networks:
- internal
volumes:
redis_data:
rpa_state:
networks:
internal:
driver: bridge