deploy: remove local build compose path

This commit is contained in:
fawney19
2026-05-14 14:40:25 +08:00
parent a7e71624e3
commit d2831ec6f0
10 changed files with 33 additions and 615 deletions

View File

@@ -4,7 +4,6 @@ import {
Server,
Key,
Container,
Code,
Shield,
Monitor,
Check,
@@ -44,38 +43,11 @@ const productionSteps = [
}
]
const localBuildSteps = [
{
title: '克隆代码',
code: 'git clone https://github.com/fawney19/Aether.git\ncd Aether',
icon: Code
},
{
title: '配置环境变量',
note: '生成密钥并填入 .env',
code: 'cp .env.example .env\npython generate_keys.py',
icon: Key
},
{
title: '构建',
note: '自动构建、启动、迁移',
code: './deploy.sh',
icon: Container
},
{
title: '更新',
note: '需要拉取最新代码',
code: 'git pull origin main',
icon: Code,
optional: true
}
]
const developmentSteps = [
{
title: '启动依赖',
note: 'PostgreSQL + Redis',
code: 'docker compose -f docker-compose.build.yml up -d postgres redis',
code: 'docker compose up -d postgres redis',
icon: Container
},
{
@@ -133,7 +105,6 @@ function copyStep(stepId: string, code: string) {
<button
v-for="(tab, idx) in [
{ icon: Container, label: 'Docker 预构建镜像' },
{ icon: Code, label: '本地代码构建' },
{ icon: Monitor, label: '本地开发' }
]"
:key="idx"
@@ -200,58 +171,9 @@ function copyStep(stepId: string, code: string) {
</div>
</div>
<!-- 本地构建步骤 -->
<div
v-show="activeDeployTab === 1"
class="p-5 space-y-3"
>
<div
v-for="(step, idx) in localBuildSteps"
:key="idx"
class="group rounded-xl border border-[#e5e4df] dark:border-[rgba(227,224,211,0.12)] overflow-hidden transition-colors"
:class="step.optional ? 'border-dashed opacity-80' : ''"
>
<div class="flex items-center gap-3 px-4 py-3">
<span class="w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0 bg-[#cc785c] text-white">
{{ idx + 1 }}
</span>
<div class="flex-1 min-w-0">
<div class="flex items-center gap-2">
<span class="text-sm font-medium text-[#262624] dark:text-[#f1ead8]">{{ step.title }}</span>
<span
v-if="step.optional"
class="text-[10px] px-1.5 py-0.5 rounded-full bg-[#e5e4df] dark:bg-[rgba(227,224,211,0.12)] text-[#666663] dark:text-[#a3a094]"
>
更新时
</span>
</div>
<span
v-if="step.note"
class="text-xs text-[#91918d] dark:text-[#a3a094]/80"
>{{ step.note }}</span>
</div>
<button
class="flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs text-[#666663] dark:text-[#a3a094] hover:bg-[#f0f0eb] dark:hover:bg-[#3a3731] transition-colors shrink-0"
@click="copyStep(`build-${idx}`, step.code)"
>
<Check
v-if="copiedStep === `build-${idx}`"
class="h-3.5 w-3.5 text-green-500"
/>
<Copy
v-else
class="h-3.5 w-3.5"
/>
{{ copiedStep === `build-${idx}` ? '已复制' : '复制' }}
</button>
</div>
<pre class="px-4 pb-3 text-[13px] font-mono text-[#262624] dark:text-[#f1ead8] overflow-x-auto leading-relaxed border-t border-[#e5e4df]/50 dark:border-[rgba(227,224,211,0.06)] pt-3 mx-4 mb-1"><code>{{ step.code }}</code></pre>
</div>
</div>
<!-- 开发环境步骤 -->
<div
v-show="activeDeployTab === 2"
v-show="activeDeployTab === 1"
class="p-5 space-y-3"
>
<div

View File

@@ -20,28 +20,11 @@ docker compose pull && docker compose up -d
docker compose exec postgres pg_dump -U postgres aether | gzip > backup_$(date +%Y%m%d_%H%M%S).sql.gz
```
### 2. 本地代码构建镜像 (Docker Compose)
```markdown
# 1. 克隆代码
git clone https://github.com/fawney19/Aether.git
cd Aether
# 2. 配置环境变量
cp .env.example .env
./generate_keys.sh # 生成密钥, 并将生成的密钥填入 .env
# 3. 构建(自动构建、启动、迁移)
./deploy.sh
# 4. 更新需要拉取最新代码
git pull origin main
```
### 3. 本地开发
### 2. 本地开发
依赖 Docker、uv、nodejs
```markdown
# 启动数据库
docker compose -f docker-compose.build.yml up -d postgres redis
docker compose up -d postgres redis
# 后端
uv sync