docs: 完整中英双语 README + Docker Hub 发布 Compose 文件

- README.md:中文主文档(功能、环境变量、部署、集成说明)
- README.en.md:英文版本,内容与中文对应
- docker-compose.hub.yml:从 Docker Hub 拉取镜像,含自带 PostgreSQL
- docker-compose.app.yml:仅应用容器,适配外部数据库
- 镜像已发布至 touwaeriol/sub2apipay:latest
This commit is contained in:
erio
2026-03-01 20:50:42 +08:00
parent b4eebb0b1b
commit 149a08f1a3
4 changed files with 668 additions and 21 deletions

37
docker-compose.hub.yml Normal file
View File

@@ -0,0 +1,37 @@
# docker-compose.hub.yml
# 使用 Docker Hub 镜像部署(含自带 PostgreSQL
# 适合:全新服务器,无现有数据库
#
# 启动docker compose -f docker-compose.hub.yml up -d
# 更新docker compose -f docker-compose.hub.yml pull && docker compose -f docker-compose.hub.yml up -d
services:
app:
image: touwaeriol/sub2apipay:latest
ports:
- '${APP_PORT:-3001}:3000'
env_file: .env
environment:
- DATABASE_URL=postgresql://sub2apipay:${DB_PASSWORD:-password}@db:5432/sub2apipay
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: sub2apipay
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
POSTGRES_DB: sub2apipay
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U sub2apipay']
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
volumes:
pgdata: