314 lines
6.9 KiB
YAML
314 lines
6.9 KiB
YAML
# ============================================================
|
|
# 红动未来 - Go 微服务
|
|
# ============================================================
|
|
# 配合中间件启动:
|
|
# docker compose -f deploy/docker-compose-infra-main.yml -f deploy/docker-compose-app.yml up -d
|
|
# 仅应用(需要 infra 网络已存在):
|
|
# docker compose -f deploy/docker-compose-app.yml up -d
|
|
# 构建后启动:
|
|
# docker compose -f deploy/docker-compose-app.yml build
|
|
# docker compose -f deploy/docker-compose-infra-main.yml -f deploy/docker-compose-app.yml up -d
|
|
# ============================================================
|
|
|
|
name: redfuture
|
|
|
|
networks:
|
|
redfuture-net:
|
|
driver: bridge
|
|
|
|
services:
|
|
|
|
gateway:
|
|
build:
|
|
context: ../gateway
|
|
dockerfile: Dockerfile
|
|
container_name: gateway
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ../gateway/config.yml:/build/config.yml
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
consul:
|
|
condition: service_started
|
|
networks:
|
|
- redfuture-net
|
|
|
|
admin-go:
|
|
build:
|
|
context: ../admin-go
|
|
dockerfile: Dockerfile
|
|
container_name: admin-go
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8808:8808"
|
|
volumes:
|
|
- ../admin-go/config.yaml:/build/manifest/config/config.yaml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- redfuture-net
|
|
|
|
ai-agent:
|
|
build:
|
|
context: ../ai-agent
|
|
dockerfile: Dockerfile
|
|
container_name: ai-agent
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ../ai-agent/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- redfuture-net
|
|
|
|
assets:
|
|
build:
|
|
context: ../assets
|
|
dockerfile: Dockerfile
|
|
container_name: assets
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3003:3003"
|
|
volumes:
|
|
- ../assets/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
nats:
|
|
condition: service_started
|
|
networks:
|
|
- redfuture-net
|
|
|
|
cid:
|
|
build:
|
|
context: ../cid
|
|
dockerfile: Dockerfile
|
|
container_name: cid
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3001:3001"
|
|
volumes:
|
|
- ../cid/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- redfuture-net
|
|
|
|
customer-server:
|
|
build:
|
|
context: ../customer-server
|
|
dockerfile: Dockerfile
|
|
container_name: customer-server
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3012:3012"
|
|
volumes:
|
|
- ../customer-server/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
mongodb:
|
|
condition: service_started
|
|
nats:
|
|
condition: service_started
|
|
rabbitmq:
|
|
condition: service_started
|
|
networks:
|
|
- redfuture-net
|
|
|
|
data-engine:
|
|
build:
|
|
context: ../data-engine
|
|
dockerfile: Dockerfile
|
|
container_name: data-engine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3013:3013"
|
|
volumes:
|
|
- ../data-engine/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- redfuture-net
|
|
|
|
erp:
|
|
build:
|
|
context: ../erp
|
|
dockerfile: Dockerfile
|
|
container_name: erp
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3011:3011"
|
|
volumes:
|
|
- ../erp/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- redfuture-net
|
|
|
|
media:
|
|
build:
|
|
context: ../media
|
|
dockerfile: Dockerfile
|
|
container_name: media
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3010:3010"
|
|
volumes:
|
|
- ../media/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- redfuture-net
|
|
|
|
model-gateway:
|
|
build:
|
|
context: ../model-gateway
|
|
dockerfile: Dockerfile
|
|
container_name: model-gateway
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3004:3004"
|
|
volumes:
|
|
- ../model-gateway/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- redfuture-net
|
|
|
|
order:
|
|
build:
|
|
context: ../order
|
|
dockerfile: Dockerfile
|
|
container_name: order
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3002:3002"
|
|
volumes:
|
|
- ../order/config.yml:/build/config.yml
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
mongodb:
|
|
condition: service_started
|
|
networks:
|
|
- redfuture-net
|
|
|
|
oss:
|
|
build:
|
|
context: ../oss
|
|
dockerfile: Dockerfile
|
|
container_name: oss
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3008:3008"
|
|
volumes:
|
|
- ../oss/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_started
|
|
networks:
|
|
- redfuture-net
|
|
|
|
prompts-core:
|
|
build:
|
|
context: ../prompts-core
|
|
dockerfile: Dockerfile
|
|
container_name: prompts-core
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3009:3009"
|
|
volumes:
|
|
- ../prompts-core/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- redfuture-net
|
|
|
|
rag:
|
|
build:
|
|
context: ../rag
|
|
dockerfile: Dockerfile
|
|
container_name: rag
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3006:3006"
|
|
volumes:
|
|
- ../rag/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
meilisearch:
|
|
condition: service_started
|
|
networks:
|
|
- redfuture-net
|
|
|
|
shop-user-trade:
|
|
build:
|
|
context: ../shop-user-trade
|
|
dockerfile: Dockerfile
|
|
container_name: shop-user-trade
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3007:3007"
|
|
volumes:
|
|
- ../shop-user-trade/config.yml:/build/config.yml
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- redfuture-net
|
|
|
|
video-factory:
|
|
build:
|
|
context: ../video-factory
|
|
dockerfile: Dockerfile
|
|
container_name: video-factory
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3015:3006"
|
|
volumes:
|
|
- ../video-factory/config.yml:/build/config.yml
|
|
- ../data/video-factory:/build/data
|
|
networks:
|
|
- redfuture-net
|