mirror of
https://github.com/2930134478/AI-CS.git
synced 2026-06-15 00:44:30 +08:00
45 lines
1.7 KiB
Bash
45 lines
1.7 KiB
Bash
# ============================================
|
||
# AI-CS 系统 Docker 部署配置模板
|
||
# ============================================
|
||
# 使用方法:
|
||
# 1. 复制此文件为 .env:cp .env.example .env
|
||
# 2. 编辑 .env 文件,修改以下配置
|
||
# 3. .env 文件不要提交到 Git!
|
||
|
||
# ============================================
|
||
# MySQL 数据库配置
|
||
# ============================================
|
||
MYSQL_ROOT_PASSWORD=rootpassword
|
||
MYSQL_DATABASE=ai_cs
|
||
MYSQL_USER=ai_cs_user
|
||
MYSQL_PASSWORD=ai_cs_password
|
||
MYSQL_PORT=3306
|
||
|
||
# ============================================
|
||
# 后端服务配置
|
||
# ============================================
|
||
BACKEND_PORT=8080
|
||
ADMIN_USERNAME=admin
|
||
ADMIN_PASSWORD=admin123
|
||
GIN_MODE=release
|
||
|
||
# 加密密钥(用于加密 AI API Keys)
|
||
# 生成方式:
|
||
# - Linux/Mac: openssl rand -hex 32
|
||
# - Windows PowerShell: -join ((48..57) + (97..102) | Get-Random -Count 64 | ForEach-Object {[char]$_})
|
||
# - 在线工具: https://www.random.org/strings/?num=1&len=64&digits=on&upperalpha=off&loweralpha=on&unique=off&format=html&rnd=new
|
||
ENCRYPTION_KEY=changeme_please_use_random_hex_32_bytes_here
|
||
|
||
# ============================================
|
||
# 前端服务配置
|
||
# ============================================
|
||
FRONTEND_PORT=3000
|
||
# 前端访问后端的地址(Docker 内部使用容器名,外部访问使用 localhost)
|
||
NEXT_PUBLIC_API_BASE_URL=http://localhost:8080
|
||
|
||
# ============================================
|
||
# 生产版镜像配置(仅用于 docker-compose.prod.yml)
|
||
# ============================================
|
||
# 如果使用预构建镜像,可以指定镜像名称(可选)
|
||
# BACKEND_IMAGE=2930134478/ai-cs-backend:latest
|
||
# FRONTEND_IMAGE=2930134478/ai-cs-frontend:latest |