feat(deploy): 在同一台机器上接入继续教育和 Dify
4 核 8G 同时跑协会站点、PlayEdu 和估价智能体,并让门户专家页底色透出页面背景。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
1b33361209
commit
a8e2e741d1
24 files changed
+1035
-85
No files matched your search
@@ -18,6 +18,7 @@ services:
|
||||
MYSQL_USER: ${MYSQL_USER}
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||||
PLAYEDU_DB_PASSWORD: ${PLAYEDU_DB_PASSWORD}
|
||||
TZ: Asia/Shanghai
|
||||
command:
|
||||
- --character-set-server=utf8mb4
|
||||
@@ -25,7 +26,8 @@ services:
|
||||
volumes:
|
||||
- ${DATA_ROOT}/mysql:/var/lib/mysql
|
||||
- ./mysql/my.cnf:/etc/mysql/conf.d/gsfdc.cnf:ro
|
||||
shm_size: 256m
|
||||
- ./mysql/init:/docker-entrypoint-initdb.d:ro
|
||||
shm_size: 128m
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -p\"$$MYSQL_ROOT_PASSWORD\" --silent"]
|
||||
interval: 10s
|
||||
@@ -35,7 +37,7 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 1400M
|
||||
memory: 1024M
|
||||
networks:
|
||||
- gsfdc
|
||||
|
||||
@@ -50,7 +52,7 @@ services:
|
||||
- --appendonly
|
||||
- "yes"
|
||||
- --maxmemory
|
||||
- 128mb
|
||||
- 64mb
|
||||
- --maxmemory-policy
|
||||
- allkeys-lru
|
||||
- --requirepass
|
||||
@@ -68,7 +70,7 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 192M
|
||||
memory: 128M
|
||||
networks:
|
||||
- gsfdc
|
||||
|
||||
@@ -88,7 +90,7 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 384M
|
||||
memory: 256M
|
||||
networks:
|
||||
- gsfdc
|
||||
|
||||
@@ -125,6 +127,10 @@ services:
|
||||
CORS_ORIGINS: ${CORS_ORIGINS}
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
FIELD_AES_KEY: ${FIELD_AES_KEY}
|
||||
DIFY_PUBLIC_URL: ${DIFY_PUBLIC_URL}
|
||||
DIFY_API_BASE: http://dify-nginx/v1
|
||||
DIFY_SSO_SECRET: ${DIFY_SSO_SECRET}
|
||||
DIFY_VALUATION_API_KEY: ${DIFY_VALUATION_API_KEY:-}
|
||||
UVICORN_WORKERS: "1"
|
||||
TZ: Asia/Shanghai
|
||||
depends_on:
|
||||
@@ -143,7 +149,7 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 768M
|
||||
memory: 512M
|
||||
networks:
|
||||
- gsfdc
|
||||
|
||||
@@ -159,7 +165,7 @@ services:
|
||||
NITRO_HOST: 0.0.0.0
|
||||
NITRO_PORT: "3000"
|
||||
NODE_ENV: production
|
||||
NODE_OPTIONS: --max-old-space-size=384
|
||||
NODE_OPTIONS: --max-old-space-size=320
|
||||
NUXT_API_BASE: http://server:8000/api/site
|
||||
NUXT_PUBLIC_API_BASE: /api/site
|
||||
TZ: Asia/Shanghai
|
||||
@@ -175,7 +181,7 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 640M
|
||||
memory: 512M
|
||||
networks:
|
||||
- gsfdc
|
||||
|
||||
@@ -206,7 +212,41 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 128M
|
||||
memory: 64M
|
||||
networks:
|
||||
- gsfdc
|
||||
|
||||
playedu:
|
||||
image: gsfdc-playedu:${IMAGE_TAG}
|
||||
container_name: gsfdc-playedu
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
logging: *logging
|
||||
environment:
|
||||
DB_HOST: mysql
|
||||
DB_PORT: "3306"
|
||||
DB_NAME: playedu
|
||||
DB_USER: playedu
|
||||
DB_PASS: ${PLAYEDU_DB_PASSWORD}
|
||||
DB_POOL_MIN_IDLE: "1"
|
||||
DB_POOL_MAX_SIZE: "4"
|
||||
SA_TOKEN_IS_CONCURRENT: "false"
|
||||
SA_TOKEN_JWT_SECRET_KEY: ${PLAYEDU_JWT_KEY}
|
||||
DEMO_MODE: "false"
|
||||
TZ: Asia/Shanghai
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/127.0.0.1/9898'"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
start_period: 90s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
networks:
|
||||
- gsfdc
|
||||
|
||||
|
||||
Reference in new issue
Block a user