Fix API port conflict default 23568, bcrypt registration, clearer login errors.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
# 部署目录默认:/opt/secondary-school-grade-archive
|
# 部署目录默认:/opt/secondary-school-grade-archive
|
||||||
|
|
||||||
WEB_PORT=23566
|
WEB_PORT=23566
|
||||||
API_PORT=8000
|
API_PORT=23568
|
||||||
API_TARGET=http://127.0.0.1:8000
|
API_TARGET=http://127.0.0.1:23568
|
||||||
|
|
||||||
SECRET_KEY=请替换为随机字符串
|
SECRET_KEY=请替换为随机字符串
|
||||||
POSTGRES_USER=gradeapp
|
POSTGRES_USER=gradeapp
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ set -euo pipefail
|
|||||||
REPO_URL="${REPO_URL:-https://git.bz121.com/dekun/secondary-school-grade-archive.git}"
|
REPO_URL="${REPO_URL:-https://git.bz121.com/dekun/secondary-school-grade-archive.git}"
|
||||||
INSTALL_DIR="${INSTALL_DIR:-/opt/secondary-school-grade-archive}"
|
INSTALL_DIR="${INSTALL_DIR:-/opt/secondary-school-grade-archive}"
|
||||||
WEB_PORT="${WEB_PORT:-23566}"
|
WEB_PORT="${WEB_PORT:-23566}"
|
||||||
API_PORT="${API_PORT:-8000}"
|
API_PORT="${API_PORT:-23568}"
|
||||||
BRANCH="${BRANCH:-main}"
|
BRANCH="${BRANCH:-main}"
|
||||||
NODE_MAJOR="${NODE_MAJOR:-20}"
|
NODE_MAJOR="${NODE_MAJOR:-20}"
|
||||||
PIP_MIRROR="${PIP_MIRROR:-https://pypi.tuna.tsinghua.edu.cn/simple}"
|
PIP_MIRROR="${PIP_MIRROR:-https://pypi.tuna.tsinghua.edu.cn/simple}"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ function loadEnv() {
|
|||||||
|
|
||||||
const env = loadEnv()
|
const env = loadEnv()
|
||||||
const webPort = env.WEB_PORT || '23566'
|
const webPort = env.WEB_PORT || '23566'
|
||||||
const apiPort = env.API_PORT || '8000'
|
const apiPort = env.API_PORT || '23568'
|
||||||
const venvPython = path.join(root, 'backend', 'venv', 'bin', 'python')
|
const venvPython = path.join(root, 'backend', 'venv', 'bin', 'python')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if (fs.existsSync(envPath)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const PORT = Number(process.env.WEB_PORT || 23566)
|
const PORT = Number(process.env.WEB_PORT || 23566)
|
||||||
const API_TARGET = process.env.API_TARGET || 'http://127.0.0.1:8000'
|
const API_TARGET = process.env.API_TARGET || 'http://127.0.0.1:23568'
|
||||||
const STATIC_ROOT = path.join(__dirname, '../../frontend/dist')
|
const STATIC_ROOT = path.join(__dirname, '../../frontend/dist')
|
||||||
|
|
||||||
const app = express()
|
const app = express()
|
||||||
|
|||||||
Reference in New Issue
Block a user