"backend/internal/git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "afd72abc6ed765cda52e2c6e5876df5d28e5e5ee"
Commit 53767866 authored by yangjianbo's avatar yangjianbo
Browse files

chore(配置): 提升容器文件描述符上限到10万

调整原因:
- 防止高并发下出现 "too many open files" 错误
- 统一测试与生产环境的 ulimits 配置

改动内容:
- 为 sub2api、postgres、redis 设置 nofile
- 软硬限制均为 100000

测试: 未运行
parent 8cb2d3b3
...@@ -19,6 +19,10 @@ services: ...@@ -19,6 +19,10 @@ services:
image: sub2api:latest image: sub2api:latest
container_name: sub2api container_name: sub2api
restart: unless-stopped restart: unless-stopped
ulimits:
nofile:
soft: 100000
hard: 100000
ports: ports:
- "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-8080}:8080" - "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-8080}:8080"
volumes: volumes:
...@@ -107,6 +111,10 @@ services: ...@@ -107,6 +111,10 @@ services:
image: postgres:18-alpine image: postgres:18-alpine
container_name: sub2api-postgres container_name: sub2api-postgres
restart: unless-stopped restart: unless-stopped
ulimits:
nofile:
soft: 100000
hard: 100000
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
environment: environment:
...@@ -132,6 +140,10 @@ services: ...@@ -132,6 +140,10 @@ services:
image: redis:7-alpine image: redis:7-alpine
container_name: sub2api-redis container_name: sub2api-redis
restart: unless-stopped restart: unless-stopped
ulimits:
nofile:
soft: 100000
hard: 100000
volumes: volumes:
- redis_data:/data - redis_data:/data
command: > command: >
......
...@@ -19,6 +19,10 @@ services: ...@@ -19,6 +19,10 @@ services:
image: weishaw/sub2api:latest image: weishaw/sub2api:latest
container_name: sub2api container_name: sub2api
restart: unless-stopped restart: unless-stopped
ulimits:
nofile:
soft: 100000
hard: 100000
ports: ports:
- "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-8080}:8080" - "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-8080}:8080"
volumes: volumes:
...@@ -107,6 +111,10 @@ services: ...@@ -107,6 +111,10 @@ services:
image: postgres:18-alpine image: postgres:18-alpine
container_name: sub2api-postgres container_name: sub2api-postgres
restart: unless-stopped restart: unless-stopped
ulimits:
nofile:
soft: 100000
hard: 100000
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
environment: environment:
...@@ -132,6 +140,10 @@ services: ...@@ -132,6 +140,10 @@ services:
image: redis:7-alpine image: redis:7-alpine
container_name: sub2api-redis container_name: sub2api-redis
restart: unless-stopped restart: unless-stopped
ulimits:
nofile:
soft: 100000
hard: 100000
volumes: volumes:
- redis_data:/data - redis_data:/data
command: > command: >
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment