Files
sub2apipay/docker-compose.hub.yml
erio 149a08f1a3 docs: 完整中英双语 README + Docker Hub 发布 Compose 文件
- README.md:中文主文档(功能、环境变量、部署、集成说明)
- README.en.md:英文版本,内容与中文对应
- docker-compose.hub.yml:从 Docker Hub 拉取镜像,含自带 PostgreSQL
- docker-compose.app.yml:仅应用容器,适配外部数据库
- 镜像已发布至 touwaeriol/sub2apipay:latest
2026-03-01 20:50:42 +08:00

38 lines
1008 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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: