配置
This commit is contained in:
parent
63950b18d1
commit
cadee11ab9
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,3 +3,6 @@ node_modules/
|
||||
logs/
|
||||
.vercel
|
||||
package-lock.json
|
||||
|
||||
ecosystem.config.*.json
|
||||
docker-compose.*.yml
|
||||
@ -1,35 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# 即梦 API 服务
|
||||
jimeng-free-api:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: Dockerfile
|
||||
image: jimeng-free-api:latest
|
||||
container_name: jimeng-free-api
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- SERVICE_ID=${SERVICE_ID:-jimeng-free-api}
|
||||
- INSTANCE_ID=${INSTANCE_ID:-instance-1}
|
||||
- SERVICE_NAME=${SERVICE_NAME:-jimeng-free-api}
|
||||
- MONGODB_URL=${MONGODB_URL:-mongodb://localhost:27017/jimeng-api}
|
||||
- TOS_ACCESS_KEY_ID=${TOS_ACCESS_KEY_ID}
|
||||
- TOS_ACCESS_KEY_SECRET=${TOS_ACCESS_KEY_SECRET}
|
||||
- TOS_BUCKET_NAME=${TOS_BUCKET_NAME}
|
||||
- TOS_SELF_DOMAIN=${TOS_SELF_DOMAIN}
|
||||
- TOS_REGION=${TOS_REGION:-cn-beijing}
|
||||
- TOS_ENDPOINT=${TOS_ENDPOINT:-tos-cn-beijing.volces.com}
|
||||
- HEARTBEAT_ENABLED=${HEARTBEAT_ENABLED:-true}
|
||||
- HEARTBEAT_INTERVAL=${HEARTBEAT_INTERVAL:-30}
|
||||
ports:
|
||||
- "${API_PORT:-3302}:3302"
|
||||
volumes:
|
||||
- ./logs:/app/logs
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3302/ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
@ -1,148 +0,0 @@
|
||||
{
|
||||
"apps": [
|
||||
{
|
||||
"name": "jimeng-api-3302",
|
||||
"script": "dist/index.js",
|
||||
"instances": 1,
|
||||
"exec_mode": "cluster",
|
||||
"watch": false,
|
||||
"max_memory_restart": "500M",
|
||||
"env": {
|
||||
"NODE_ENV": "development",
|
||||
"SERVICE_ID": "jimeng-api-3302",
|
||||
"SERVICE_NAME": "jimeng-free-api-3302",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": 3302,
|
||||
"MONGODB_URL": "mongodb://localhost:27017/jimeng-api",
|
||||
"TOS_ACCESS_KEY_ID": "your_actual_access_key_id",
|
||||
"TOS_ACCESS_KEY_SECRET": "your_actual_access_key_secret",
|
||||
"TOS_BUCKET_NAME": "your_actual_bucket_name",
|
||||
"TOS_SELF_DOMAIN": "",
|
||||
"TOS_REGION": "cn-beijing",
|
||||
"TOS_ENDPOINT": "tos-cn-beijing.volces.com",
|
||||
"HEARTBEAT_ENABLED": true,
|
||||
"HEARTBEAT_INTERVAL": 30
|
||||
},
|
||||
"env_production": {
|
||||
"NODE_ENV": "production",
|
||||
"SERVICE_ID": "jimeng-api-3302-prod",
|
||||
"SERVICE_NAME": "jimeng-free-api-3302-prod",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": 3302,
|
||||
"MONGODB_URL": "mongodb://prod-server:27017/jimeng-api",
|
||||
"TOS_ACCESS_KEY_ID": "prod_access_key_id",
|
||||
"TOS_ACCESS_KEY_SECRET": "prod_access_key_secret",
|
||||
"TOS_BUCKET_NAME": "prod_bucket_name",
|
||||
"TOS_SELF_DOMAIN": "https://your-domain.com",
|
||||
"TOS_REGION": "cn-beijing",
|
||||
"TOS_ENDPOINT": "tos-cn-beijing.volces.com",
|
||||
"HEARTBEAT_ENABLED": true,
|
||||
"HEARTBEAT_INTERVAL": 30
|
||||
},
|
||||
"log_file": "./logs/combined-3302.log",
|
||||
"out_file": "./logs/out-3302.log",
|
||||
"error_file": "./logs/error-3302.log",
|
||||
"log_date_format": "YYYY-MM-DD HH:mm:ss Z",
|
||||
"merge_logs": true,
|
||||
"autorestart": true,
|
||||
"max_restarts": 10,
|
||||
"min_uptime": "10s"
|
||||
},
|
||||
{
|
||||
"name": "jimeng-api-3303",
|
||||
"script": "dist/index.js",
|
||||
"instances": 1,
|
||||
"exec_mode": "cluster",
|
||||
"watch": false,
|
||||
"max_memory_restart": "500M",
|
||||
"env": {
|
||||
"NODE_ENV": "development",
|
||||
"SERVICE_ID": "jimeng-api-3303",
|
||||
"SERVICE_NAME": "jimeng-free-api-3303",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": 3303,
|
||||
"MONGODB_URL": "mongodb://localhost:27017/jimeng-api",
|
||||
"TOS_ACCESS_KEY_ID": "your_actual_access_key_id",
|
||||
"TOS_ACCESS_KEY_SECRET": "your_actual_access_key_secret",
|
||||
"TOS_BUCKET_NAME": "your_actual_bucket_name",
|
||||
"TOS_SELF_DOMAIN": "",
|
||||
"TOS_REGION": "cn-beijing",
|
||||
"TOS_ENDPOINT": "tos-cn-beijing.volces.com",
|
||||
"HEARTBEAT_ENABLED": true,
|
||||
"HEARTBEAT_INTERVAL": 30
|
||||
},
|
||||
"env_production": {
|
||||
"NODE_ENV": "production",
|
||||
"SERVICE_ID": "jimeng-api-3303-prod",
|
||||
"SERVICE_NAME": "jimeng-free-api-3303-prod",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": 3303,
|
||||
"MONGODB_URL": "mongodb://prod-server:27017/jimeng-api",
|
||||
"TOS_ACCESS_KEY_ID": "prod_access_key_id",
|
||||
"TOS_ACCESS_KEY_SECRET": "prod_access_key_secret",
|
||||
"TOS_BUCKET_NAME": "prod_bucket_name",
|
||||
"TOS_SELF_DOMAIN": "https://your-domain.com",
|
||||
"TOS_REGION": "cn-beijing",
|
||||
"TOS_ENDPOINT": "tos-cn-beijing.volces.com",
|
||||
"HEARTBEAT_ENABLED": true,
|
||||
"HEARTBEAT_INTERVAL": 30
|
||||
},
|
||||
"log_file": "./logs/combined-3303.log",
|
||||
"out_file": "./logs/out-3303.log",
|
||||
"error_file": "./logs/error-3303.log",
|
||||
"log_date_format": "YYYY-MM-DD HH:mm:ss Z",
|
||||
"merge_logs": true,
|
||||
"autorestart": true,
|
||||
"max_restarts": 10,
|
||||
"min_uptime": "10s"
|
||||
},
|
||||
{
|
||||
"name": "jimeng-api-3304",
|
||||
"script": "dist/index.js",
|
||||
"instances": 1,
|
||||
"exec_mode": "cluster",
|
||||
"watch": false,
|
||||
"max_memory_restart": "500M",
|
||||
"env": {
|
||||
"NODE_ENV": "development",
|
||||
"SERVICE_ID": "jimeng-api-3304",
|
||||
"SERVICE_NAME": "jimeng-free-api-3304",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": 3304,
|
||||
"MONGODB_URL": "mongodb://localhost:27017/jimeng-api",
|
||||
"TOS_ACCESS_KEY_ID": "your_actual_access_key_id",
|
||||
"TOS_ACCESS_KEY_SECRET": "your_actual_access_key_secret",
|
||||
"TOS_BUCKET_NAME": "your_actual_bucket_name",
|
||||
"TOS_SELF_DOMAIN": "",
|
||||
"TOS_REGION": "cn-beijing",
|
||||
"TOS_ENDPOINT": "tos-cn-beijing.volces.com",
|
||||
"HEARTBEAT_ENABLED": true,
|
||||
"HEARTBEAT_INTERVAL": 30
|
||||
},
|
||||
"env_production": {
|
||||
"NODE_ENV": "production",
|
||||
"SERVICE_ID": "jimeng-api-3304-prod",
|
||||
"SERVICE_NAME": "jimeng-free-api-3304-prod",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": 3304,
|
||||
"MONGODB_URL": "mongodb://prod-server:27017/jimeng-api",
|
||||
"TOS_ACCESS_KEY_ID": "prod_access_key_id",
|
||||
"TOS_ACCESS_KEY_SECRET": "prod_access_key_secret",
|
||||
"TOS_BUCKET_NAME": "prod_bucket_name",
|
||||
"TOS_SELF_DOMAIN": "https://your-domain.com",
|
||||
"TOS_REGION": "cn-beijing",
|
||||
"TOS_ENDPOINT": "tos-cn-beijing.volces.com",
|
||||
"HEARTBEAT_ENABLED": true,
|
||||
"HEARTBEAT_INTERVAL": 30
|
||||
},
|
||||
"log_file": "./logs/combined-3304.log",
|
||||
"out_file": "./logs/out-3304.log",
|
||||
"error_file": "./logs/error-3304.log",
|
||||
"log_date_format": "YYYY-MM-DD HH:mm:ss Z",
|
||||
"merge_logs": true,
|
||||
"autorestart": true,
|
||||
"max_restarts": 10,
|
||||
"min_uptime": "10s"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user