Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
1 Star 0 Fork 0

神月恭平/Python-cloud-disk

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
master
Branches (1)
Tags (2)
master
v1.01
v1.0
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
The license selected for the repository is subject to the license used by the main branch of the repository.
master
Branches (1)
Tags (2)
master
v1.01
v1.0
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
master
Branches (1)
Tags (2)
master
v1.01
v1.0
python-cloud-disk
/
deploy.sh
python-cloud-disk
/
deploy.sh
deploy.sh 2.11 KB
Copy Edit Raw Blame History
Cloud Disk Admin authored 2026年06月21日 19:30 +08:00 . Initial commit: 云盘系统 v1.0
#!/bin/bash
# 云盘系统部署脚本
APP_NAME="cloud-disk"
APP_DIR="/opt/cloud-disk"
VENV_DIR="/opt/cloud-disk/venv"
SERVICE_NAME="cloud-disk"
echo "=========================================="
echo " 云盘系统部署脚本"
echo "=========================================="
# 检查Python
echo "[1/6] 检查Python环境..."
if ! command -v python3 &> /dev/null; then
echo "安装Python3..."
apt-get update && apt-get install -y python3 python3-pip python3-venv
fi
echo "Python版本: $(python3 --version)"
# 创建目录
echo "[2/6] 创建应用目录..."
mkdir -p $APP_DIR
mkdir -p $APP_DIR/uploads
# 创建虚拟环境
echo "[3/6] 创建Python虚拟环境..."
if [ ! -d "$VENV_DIR" ]; then
python3 -m venv $VENV_DIR
fi
source $VENV_DIR/bin/activate
# 安装依赖
echo "[4/6] 安装Python依赖..."
pip install --upgrade pip
pip install -r $APP_DIR/requirements.txt
# 创建systemd服务
echo "[5/6] 配置系统服务..."
cat > /etc/systemd/system/$SERVICE_NAME.service <<EOF
[Unit]
Description=Cloud Disk Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=$APP_DIR
Environment="PATH=$VENV_DIR/bin"
ExecStart=$VENV_DIR/bin/gunicorn -w 4 -b 0.0.0.0:5000 --timeout 120 run:app
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
# 启动服务
echo "[6/6] 启动服务..."
systemctl daemon-reload
systemctl enable $SERVICE_NAME
systemctl restart $SERVICE_NAME
# 检查状态
sleep 2
if systemctl is-active --quiet $SERVICE_NAME; then
echo ""
echo "=========================================="
echo " 部署成功!"
echo "=========================================="
echo "服务名称: $SERVICE_NAME"
echo "访问地址: http://$(hostname -I | awk '{print 1ドル}'):5000"
echo "默认账号: admin / Admin@123456"
echo ""
echo "常用命令:"
echo " 查看状态: systemctl status $SERVICE_NAME"
echo " 查看日志: journalctl -u $SERVICE_NAME -f"
echo " 重启服务: systemctl restart $SERVICE_NAME"
echo " 停止服务: systemctl stop $SERVICE_NAME"
else
echo "部署失败,请检查日志: journalctl -u $SERVICE_NAME -n 50"
fi
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

一个基于 Flask + SQLite + Bootstrap 的轻量级云盘系统,支持文件上传下载、分享、会员管理、WebDAV、FTP 等功能。
Cancel

Releases (2)

All

Contributors

All

Language(Optional)

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fs529/python-cloud-disk.git
git@gitee.com:fs529/python-cloud-disk.git
fs529
python-cloud-disk
Python-cloud-disk
master
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /