mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
chore: 清理过时的 Python 遗留配置和文档
- .dockerignore 移除 Python 相关忽略规则和废弃的 dist 放行条目 - README 更新密钥生成为 shell 脚本,移除过时的 systemd 部署章节 - deploy.sh 从哈希计算中移除已删除的 entrypoint.sh
This commit is contained in:
@@ -1,26 +1,12 @@
|
|||||||
# Python
|
# Build artifacts
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
*$py.class
|
|
||||||
*.so
|
|
||||||
.Python
|
|
||||||
env/
|
|
||||||
venv/
|
|
||||||
ENV/
|
|
||||||
.venv
|
|
||||||
.uv/
|
|
||||||
*.egg-info/
|
|
||||||
dist/
|
|
||||||
!dist/aether-gateway-*
|
|
||||||
!dist/frontend/
|
|
||||||
!aether-hub/dist/aether-hub
|
|
||||||
build/
|
build/
|
||||||
|
*.so
|
||||||
*.egg
|
*.egg
|
||||||
|
*.egg-info/
|
||||||
|
|
||||||
# Frontend
|
# Frontend
|
||||||
frontend/node_modules/
|
frontend/node_modules/
|
||||||
frontend/.vite/
|
frontend/.vite/
|
||||||
# frontend/dist/ - 注释掉,因为我们需要预构建的dist文件
|
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
.git/
|
.git/
|
||||||
@@ -62,4 +48,4 @@ Dockerfile.*
|
|||||||
|
|
||||||
# Deployment
|
# Deployment
|
||||||
deploy/
|
deploy/
|
||||||
scripts/
|
scripts/
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -43,7 +43,7 @@ cd Aether
|
|||||||
|
|
||||||
# 2. 配置环境变量
|
# 2. 配置环境变量
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
python generate_keys.py # 生成密钥, 并将生成的密钥填入 .env
|
./generate_keys.sh # 生成密钥, 并将生成的密钥填入 .env
|
||||||
|
|
||||||
# 3. 部署 / 更新(自动执行数据库迁移)
|
# 3. 部署 / 更新(自动执行数据库迁移)
|
||||||
docker compose pull && docker compose up -d
|
docker compose pull && docker compose up -d
|
||||||
@@ -61,36 +61,13 @@ cd Aether
|
|||||||
|
|
||||||
# 2. 配置环境变量
|
# 2. 配置环境变量
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
python generate_keys.py # 生成密钥, 并将生成的密钥填入 .env
|
./generate_keys.sh # 生成密钥, 并将生成的密钥填入 .env
|
||||||
|
|
||||||
# 3. 部署 / 更新(自动构建、启动、迁移)
|
# 3. 部署 / 更新(自动构建、启动、迁移)
|
||||||
git pull
|
git pull
|
||||||
./deploy.sh
|
./deploy.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Systemd(二进制部署)
|
|
||||||
|
|
||||||
如果你希望 `aether-gateway` 作为宿主机服务运行,Docker 只保留 `Postgres` / `Redis`,可以使用仓库内置的 systemd 部署骨架:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 1. 构建 release 二进制和前端
|
|
||||||
cargo build --release -p aether-gateway
|
|
||||||
(cd frontend && npm ci && npm run build)
|
|
||||||
|
|
||||||
# 2. 准备环境变量
|
|
||||||
sudo mkdir -p /etc/aether
|
|
||||||
sudo cp deploy/systemd/aether-gateway.env.example /etc/aether/aether-gateway.env
|
|
||||||
# 安装脚本会拒绝 change-me / change-this 这类示例占位值
|
|
||||||
|
|
||||||
# 3. 启动数据服务(Docker only)
|
|
||||||
docker compose --env-file /etc/aether/aether-gateway.env -f deploy/docker-compose.data.yml up -d
|
|
||||||
|
|
||||||
# 4. 安装并启动 aether-gateway systemd 服务
|
|
||||||
sudo deploy/systemd/install-systemd.sh --env-file /etc/aether/aether-gateway.env
|
|
||||||
```
|
|
||||||
|
|
||||||
详细步骤见 [docs/deploy/systemd.md](docs/deploy/systemd.md)
|
|
||||||
|
|
||||||
### 本地开发
|
### 本地开发
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -98,7 +75,6 @@ sudo deploy/systemd/install-systemd.sh --env-file /etc/aether/aether-gateway.env
|
|||||||
docker compose -f docker-compose.build.yml up -d postgres redis
|
docker compose -f docker-compose.build.yml up -d postgres redis
|
||||||
|
|
||||||
# 后端
|
# 后端
|
||||||
uv sync
|
|
||||||
./dev.sh
|
./dev.sh
|
||||||
|
|
||||||
# 前端
|
# 前端
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ done
|
|||||||
calc_code_hash() {
|
calc_code_hash() {
|
||||||
{
|
{
|
||||||
cat Dockerfile.app.local 2>/dev/null
|
cat Dockerfile.app.local 2>/dev/null
|
||||||
cat Cargo.toml Cargo.lock entrypoint.sh 2>/dev/null
|
cat Cargo.toml Cargo.lock 2>/dev/null
|
||||||
find frontend/src -type f \( -name "*.vue" -o -name "*.ts" -o -name "*.tsx" -o -name "*.js" \) 2>/dev/null | sort | xargs cat 2>/dev/null
|
find frontend/src -type f \( -name "*.vue" -o -name "*.ts" -o -name "*.tsx" -o -name "*.js" \) 2>/dev/null | sort | xargs cat 2>/dev/null
|
||||||
find apps -type f \( -name "*.rs" -o -name "Cargo.toml" \) 2>/dev/null | sort | xargs cat 2>/dev/null
|
find apps -type f \( -name "*.rs" -o -name "Cargo.toml" \) 2>/dev/null | sort | xargs cat 2>/dev/null
|
||||||
find crates -type f \( -name "*.rs" -o -name "*.sql" -o -name "Cargo.toml" \) 2>/dev/null | sort | xargs cat 2>/dev/null
|
find crates -type f \( -name "*.rs" -o -name "*.sql" -o -name "Cargo.toml" \) 2>/dev/null | sort | xargs cat 2>/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user