Initial commit: proxy management platform

This commit is contained in:
2026-06-10 21:52:17 +00:00
commit 1a00a87024
47 changed files with 6747 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#
# .env
#
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=proxy_platform
# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
#
SERVER_HOST=0.0.0.0
SERVER_PORT=8080
SOCKS5_HOST=0.0.0.0
SOCKS5_PORT=1080
#
LOG_LEVEL=info
LOG_OUTPUT=stdout
# JWT Token
JWT_SECRET=your-jwt-secret-key-change-this-in-production
#
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin123
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# 数据库迁移脚本
set -e
echo "开始数据库迁移..."
# 检查数据库连接
echo "检查数据库连接..."
until PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -c '\q'; do
echo "数据库未就绪,等待中..."
sleep 2
done
echo "数据库连接成功!"
# 运行初始化脚本
echo "运行初始化脚本..."
PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -f /app/scripts/init.sql
echo "数据库迁移完成!"