Skip to content

Commit c8eff34

Browse files
committed
chore: update readme
1 parent f19b038 commit c8eff34

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ mkdir -p sub2api-deploy && cd sub2api-deploy
150150
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/docker-deploy.sh | bash
151151

152152
# Start services
153-
docker-compose -f docker-compose.local.yml up -d
153+
docker-compose up -d
154154

155155
# View logs
156-
docker-compose -f docker-compose.local.yml logs -f sub2api
156+
docker-compose logs -f sub2api
157157
```
158158

159159
**What the script does:**
160-
- Downloads `docker-compose.local.yml` and `.env.example`
160+
- Downloads `docker-compose.local.yml` (saved as `docker-compose.yml`) and `.env.example`
161161
- Generates secure credentials (JWT_SECRET, TOTP_ENCRYPTION_KEY, POSTGRES_PASSWORD)
162162
- Creates `.env` file with auto-generated secrets
163163
- Creates data directories (uses local directories for easy backup/migration)

README_CN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ mkdir -p sub2api-deploy && cd sub2api-deploy
154154
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/docker-deploy.sh | bash
155155

156156
# 启动服务
157-
docker-compose -f docker-compose.local.yml up -d
157+
docker-compose up -d
158158

159159
# 查看日志
160-
docker-compose -f docker-compose.local.yml logs -f sub2api
160+
docker-compose logs -f sub2api
161161
```
162162

163163
**脚本功能:**
164-
- 下载 `docker-compose.local.yml` `.env.example`
164+
- 下载 `docker-compose.local.yml`(本地保存为 `docker-compose.yml``.env.example`
165165
- 自动生成安全凭证(JWT_SECRET、TOTP_ENCRYPTION_KEY、POSTGRES_PASSWORD)
166166
- 创建 `.env` 文件并填充自动生成的密钥
167167
- 创建数据目录(使用本地目录,便于备份和迁移)

deploy/docker-deploy.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# - Creates necessary data directories
99
#
1010
# After running this script, you can start services with:
11-
# docker-compose -f docker-compose.local.yml up -d
11+
# docker-compose up -d
1212
# =============================================================================
1313

1414
set -e
@@ -65,7 +65,7 @@ main() {
6565
fi
6666

6767
# Check if deployment already exists
68-
if [ -f "docker-compose.local.yml" ] && [ -f ".env" ]; then
68+
if [ -f "docker-compose.yml" ] && [ -f ".env" ]; then
6969
print_warning "Deployment files already exist in current directory."
7070
read -p "Overwrite existing files? (y/N): " -r
7171
echo
@@ -75,17 +75,17 @@ main() {
7575
fi
7676
fi
7777

78-
# Download docker-compose.local.yml
79-
print_info "Downloading docker-compose.local.yml..."
78+
# Download docker-compose.local.yml and save as docker-compose.yml
79+
print_info "Downloading docker-compose.yml..."
8080
if command_exists curl; then
81-
curl -sSL "${GITHUB_RAW_URL}/docker-compose.local.yml" -o docker-compose.local.yml
81+
curl -sSL "${GITHUB_RAW_URL}/docker-compose.local.yml" -o docker-compose.yml
8282
elif command_exists wget; then
83-
wget -q "${GITHUB_RAW_URL}/docker-compose.local.yml" -O docker-compose.local.yml
83+
wget -q "${GITHUB_RAW_URL}/docker-compose.local.yml" -O docker-compose.yml
8484
else
8585
print_error "Neither curl nor wget is installed. Please install one of them."
8686
exit 1
8787
fi
88-
print_success "Downloaded docker-compose.local.yml"
88+
print_success "Downloaded docker-compose.yml"
8989

9090
# Download .env.example
9191
print_info "Downloading .env.example..."
@@ -144,7 +144,7 @@ main() {
144144
print_warning "Please keep them secure and do not share publicly!"
145145
echo ""
146146
echo "Directory structure:"
147-
echo " docker-compose.local.yml - Docker Compose configuration"
147+
echo " docker-compose.yml - Docker Compose configuration"
148148
echo " .env - Environment variables (generated secrets)"
149149
echo " .env.example - Example template (for reference)"
150150
echo " data/ - Application data (will be created on first run)"
@@ -154,10 +154,10 @@ main() {
154154
echo "Next steps:"
155155
echo " 1. (Optional) Edit .env to customize configuration"
156156
echo " 2. Start services:"
157-
echo " docker-compose -f docker-compose.local.yml up -d"
157+
echo " docker-compose up -d"
158158
echo ""
159159
echo " 3. View logs:"
160-
echo " docker-compose -f docker-compose.local.yml logs -f sub2api"
160+
echo " docker-compose logs -f sub2api"
161161
echo ""
162162
echo " 4. Access Web UI:"
163163
echo " http://localhost:8080"

0 commit comments

Comments
 (0)