akg-factor-bridge/docker-compose.yml

25 lines
1.2 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.

# akg-factor-bridge独立部署单元可落在任意能同时连通「基座PG/153/平台MySQL」的服务器。
# 容器常驻sleep infinity由宿主 cron 或平台 XXL-JOB 以 docker exec 触发 build
# 也可改 command 为一次性任务由外部调度拉起。
services:
akg-factor-bridge:
build: .
container_name: akg_factor_bridge
env_file: .env
restart: unless-stopped
command: sleep infinity
volumes:
- .:/app # 代码卷挂载:改码即生效,不用重构镜像(开发期)。冻结成 prod 镜像时删此行并 --build。
# 跨机部署(默认):.env 三处用 LAN IP默认 bridge 网络出网到 LAN 即可。
# 与 astock-kg 同机同网时,改用服务名连基座 PG——取消下面两行注释并填网络名
# networks: [default, akg_net]
# 触发示例(宿主 crontab每日 18:40
# 40 18 * * 1-5 docker exec akg_factor_bridge python run.py build all --mode daily
# 同机同网方案才需要:把 astock-kg 的 compose 网络作为 external 引入
# networks:
# akg_net:
# external: true
# name: <astock-kg 的网络名,用 `docker network ls` 查,通常形如 astock-kg_default>