Files
web/docker-compose.yml
2026-03-17 01:00:11 +08:00

64 lines
1.3 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.
# 域名与 HTTPS 由 Nginx Proxy Manager 统一配置: https://npm.yuxindazhineng.com/nginx/proxy
# 本 compose 只暴露 9527(api)、9528(web)、9529(admin),由 NPM 反向代理到对外域名
version: "3.8"
services:
api:
build:
context: .
dockerfile: server/Dockerfile
image: yh_web-api:latest
container_name: yh_api
environment:
- PORT=9527
- MONGODB_URI=${MONGODB_URI:-mongodb://mongo:27017}
- MONGODB_DB=${MONGODB_DB:-yxd-agent-testing}
- GIN_MODE=release
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-https://yuheng.yuxindazhineng.com}
depends_on:
- mongo
networks:
- yh_net
ports:
- "9527:9527"
web:
build:
context: ./web
dockerfile: Dockerfile
image: yh_web-web:latest
container_name: yh_web
networks:
- yh_net
ports:
- "9528:80"
admin:
build:
context: ./admin
dockerfile: Dockerfile
image: yh_web-admin:latest
container_name: yh_admin
networks:
- yh_net
ports:
- "9529:80"
mongo:
image: mongo:7
container_name: yh_mongo
volumes:
- mongo_data:/data/db
networks:
- yh_net
# 仅内网不暴露端口API 容器内用 mongo:27017
# ports:
# - "27017:27017"
networks:
yh_net:
driver: bridge
volumes:
mongo_data: