115 lines
3.5 KiB
YAML
115 lines
3.5 KiB
YAML
|
|
# 导入独立配置文件
|
||
|
|
x-common-variables: &common-variables
|
||
|
|
env_file: .env
|
||
|
|
|
||
|
|
include:
|
||
|
|
- docker/postgres.yml
|
||
|
|
- docker/redis.yml
|
||
|
|
- docker/minio.yml
|
||
|
|
# - docker/elasticsearch.yml
|
||
|
|
- docker/networks.yml
|
||
|
|
# - docker/oracle.yml
|
||
|
|
- docker/pgadmin.yml
|
||
|
|
|
||
|
|
# services:
|
||
|
|
# # Web前端应用
|
||
|
|
# web:
|
||
|
|
# <<: *common-variables
|
||
|
|
# # build:
|
||
|
|
# # context: .
|
||
|
|
# # dockerfile: Dockerfile.web
|
||
|
|
# # args:
|
||
|
|
# # - NODE_ENV=${NODE_ENV:-production}
|
||
|
|
# # - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
||
|
|
# # - NEXT_PUBLIC_DEFAULT_LOCALE=${NEXT_PUBLIC_DEFAULT_LOCALE:-zh-CN}
|
||
|
|
# # - NEXT_PUBLIC_AG_GRID_LICENSE_KEY=${NEXT_PUBLIC_AG_GRID_LICENSE_KEY}
|
||
|
|
# image: fenghuo-web:latest
|
||
|
|
# container_name: fenghuo-web
|
||
|
|
# ports:
|
||
|
|
# - "${WEB_PORT:-3000}:3000"
|
||
|
|
# environment:
|
||
|
|
# - NODE_ENV=${NODE_ENV:-production}
|
||
|
|
# - NEXT_TELEMETRY_DISABLED=${NEXT_TELEMETRY_DISABLED:-1}
|
||
|
|
# - PORT=3000
|
||
|
|
# - DATABASE_URL=${DATABASE_URL}
|
||
|
|
# - NEXT_PUBLIC_DEFAULT_LOCALE=${NEXT_PUBLIC_DEFAULT_LOCALE:-zh-CN}
|
||
|
|
# - NEXT_PUBLIC_AG_GRID_LICENSE_KEY=${NEXT_PUBLIC_AG_GRID_LICENSE_KEY}
|
||
|
|
# - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
||
|
|
# volumes:
|
||
|
|
# # 挂载上传目录,确保持久化存储
|
||
|
|
# - ../apps/web/public:/app/apps/web/public
|
||
|
|
# depends_on:
|
||
|
|
# db:
|
||
|
|
# condition: service_healthy
|
||
|
|
# server:
|
||
|
|
# condition: service_started
|
||
|
|
# networks:
|
||
|
|
# - nice-net
|
||
|
|
# restart: unless-stopped
|
||
|
|
# healthcheck:
|
||
|
|
# test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health", "||", "exit", "1"]
|
||
|
|
# interval: 30s
|
||
|
|
# timeout: 10s
|
||
|
|
# retries: 3
|
||
|
|
# start_period: 40s
|
||
|
|
# deploy:
|
||
|
|
# resources:
|
||
|
|
# limits:
|
||
|
|
# memory: 512M
|
||
|
|
# cpus: '0.5'
|
||
|
|
|
||
|
|
# # 后端API服务
|
||
|
|
# server:
|
||
|
|
# <<: *common-variables
|
||
|
|
# # build:
|
||
|
|
# # context: .
|
||
|
|
# # dockerfile: Dockerfile.server
|
||
|
|
# # args:
|
||
|
|
# # - NODE_ENV=${NODE_ENV:-production}
|
||
|
|
# image: fenghuo-server:latest
|
||
|
|
# container_name: fenghuo-server
|
||
|
|
# ports:
|
||
|
|
# - "${SERVER_PORT:-3001}:3001"
|
||
|
|
# environment:
|
||
|
|
# - NODE_ENV=${NODE_ENV:-production}
|
||
|
|
# - PORT=3001
|
||
|
|
# - DATABASE_URL=${DATABASE_URL}
|
||
|
|
# - REDIS_URL=${REDIS_URL}
|
||
|
|
# - REDIS_HOST=${REDIS_HOST:-redis}
|
||
|
|
# - REDIS_PORT=${REDIS_PORT:-6379}
|
||
|
|
# - REDIS_PASSWORD=${REDIS_PASSWORD}
|
||
|
|
# - MINIO_ENDPOINT=${MINIO_ENDPOINT}
|
||
|
|
# - MINIO_PORT=${MINIO_PORT:-9000}
|
||
|
|
# - MINIO_USE_SSL=${MINIO_USE_SSL:-false}
|
||
|
|
# - MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
|
||
|
|
# - MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
|
||
|
|
# - ELASTICSEARCH_NODE=${ELASTICSEARCH_NODE}
|
||
|
|
# - ELASTICSEARCH_USER=${ELASTICSEARCH_USER}
|
||
|
|
# - ELASTICSEARCH_PASSWORD=${ELASTICSEARCH_PASSWORD}
|
||
|
|
# - UPLOAD_DIR=${UPLOAD_DIR}
|
||
|
|
# - CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001,http://localhost,http://localhost:80,http://27.57.72.38:9011
|
||
|
|
|
||
|
|
# volumes:
|
||
|
|
# - ./volumes/uploads:/app/apps/backend/uploads
|
||
|
|
# depends_on:
|
||
|
|
# db:
|
||
|
|
# condition: service_healthy
|
||
|
|
# redis:
|
||
|
|
# condition: service_started
|
||
|
|
# minio:
|
||
|
|
# condition: service_started
|
||
|
|
# networks:
|
||
|
|
# - nice-net
|
||
|
|
# restart: unless-stopped
|
||
|
|
# healthcheck:
|
||
|
|
# test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/health", "||", "exit", "1"]
|
||
|
|
# interval: 30s
|
||
|
|
# timeout: 10s
|
||
|
|
# retries: 3
|
||
|
|
# start_period: 40s
|
||
|
|
# deploy:
|
||
|
|
# resources:
|
||
|
|
# limits:
|
||
|
|
# memory: 1G
|
||
|
|
# cpus: '1.0'
|