Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
jason8668
Course_Scheduling_System
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
Course_Scheduling_System
/
deploy-server.sh
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
44 lines (39 loc) · 1.72 KB
main
Breadcrumbs
Course_Scheduling_System
/
deploy-server.sh
Copy path
Top
File metadata and controls
Code
Blame
44 lines (39 loc) · 1.72 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# 排课系统部署脚本(Jason 的 fork 简体版 · 源码构建)— 草案,待探针结果微调
# 用法:在服务器 VNC 终端整体粘贴执行。出错停在出错处,截图回传即可定位。
set -euo pipefail
echo '===== 1/5 安装 Docker + git ====='
sudo apt-get update
sudo apt-get install -y docker.io docker-compose-plugin git
sudo systemctl enable --now docker
echo '===== 2/5 配置镜像加速(拉 Docker Hub 兜底) ====='
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json >/dev/null <<'JSON'
{"registry-mirrors":["https://docker.m.daocloud.io","https://docker.1panel.live"]}
JSON
sudo systemctl restart docker
docker --version; docker compose version
echo '===== 3/5 拉取代码(他的 fork,已含简体改动) ====='
[ -d ~/Course_Scheduling_System ] || git clone --depth 1 https://github.com/jason8668/Course_Scheduling_System.git ~/Course_Scheduling_System
cd ~/Course_Scheduling_System
echo '===== 4/5 生成 .env(管理员密码随机生成,记好下面的输出) ====='
if [ ! -f .env ]; then
ADMIN_PW="$(openssl rand -base64 12 | tr -d '/+=' | head -c 16)"
cat > .env <<EOF
ADMIN_USERNAME=admin
ADMIN_PASSWORD=$ADMIN_PW
SCHOOL_NAME=示范学校
TZ=Asia/Shanghai
SECRET_KEY=$(openssl rand -hex 32)
HTTP_PORT=80
IMAGE_TAG=latest
EOF
echo ">>> 管理员账号: admin"
echo ">>> 管理员初始密码: $ADMIN_PW (首次登录会强制改密码)"
fi
echo '===== 5/5 构建并启动(源码构建,切勿用 pull 的官方繁体镜像) ====='
sudo docker compose up -d --build
sudo docker compose ps
sleep 10
curl -s -o /dev/null -w '健康检查 HTTP:%{http_code}\n' http://localhost/api/health || true
echo '完成:浏览器打开 http://36.133.38.128'
You can’t perform that action at this time.