mirror of
https://github.com/2930134478/AI-CS.git
synced 2026-06-15 00:44:30 +08:00
feat: 添加 frontend 容器安全配置
This commit is contained in:
+18
-2
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
services:
|
||||
# MySQL 数据库
|
||||
mysql:
|
||||
@@ -65,6 +63,24 @@ services:
|
||||
networks:
|
||||
- ai-cs-network
|
||||
restart: unless-stopped
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- NET_BIND_SERVICE
|
||||
read_only: true # 只读文件系统(防止写入恶意文件)
|
||||
tmpfs:
|
||||
- /tmp
|
||||
- /var/tmp
|
||||
- /app/.next/cache # Next.js 需要缓存目录
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 2G
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
|
||||
volumes:
|
||||
mysql_data:
|
||||
|
||||
Reference in New Issue
Block a user