feat(#11): Database Layer - PostgreSQL + Redis + MariaDB + pgAdmin + Redis Commander#303
Closed
HuiNeng6 wants to merge 1 commit intoillbnm:masterfrom
Closed
feat(#11): Database Layer - PostgreSQL + Redis + MariaDB + pgAdmin + Redis Commander#303HuiNeng6 wants to merge 1 commit intoillbnm:masterfrom
HuiNeng6 wants to merge 1 commit intoillbnm:masterfrom
Conversation
…min + Redis Commander Implements shared database layer for HomeLab stack. ## Services - PostgreSQL 16.4-alpine (multi-tenant) - Redis 7.4.0-alpine (with DB allocation) - MariaDB 11.5.2 (MySQL-compatible) - pgAdmin 8.11 (PostgreSQL management UI) - Redis Commander 0.9.0 (Redis management UI) ## Features - Idempotent init-databases.sh script - Backup script with retention (7 days) - Health checks for all services - Network isolation (databases not exposed to host) - Management UIs via Traefik - Resource limits configured - Complete README with connection strings ## Verification - All services use pinned versions (no latest tags) - Database services on internal network only - Management UIs on proxy network with TLS Generated with: claude-opus-4-6
Author
|
Closing duplicate PR - see #306 for the main implementation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关闭 Issue #11
实现共享数据库层,供 Nextcloud、Outline、Gitea、Authentik、Grafana 等服务共用。
服务清单
postgres:16.4-alpineredis:7.4.0-alpinemariadb:11.5.2dpage/pgadmin4:8.11rediscommander/redis-commander:0.9.0实现内容
1. 多租户 PostgreSQL (
initdb/01-init-databases.sh)2. Redis 多数据库分配
3. 备份集成 (
scripts/backup-databases.sh)pg_dumpall备份所有 PostgreSQL 数据库redis-cli BGSAVE触发 Redis 持久化mariadb-dump备份 MariaDB.tar.gz,保留最近 7 天4. 健康检查
所有数据库容器都有严格的健康检查,其他 Stack 可通过
depends_on: condition: service_healthy等待。5. 网络隔离
proxy网络databases内部网络6. 文档
stacks/databases/README.md包含:验收标准
init-databases.sh运行后所有数据库和用户创建成功init-databases.sh重复运行不报错 (幂等)backup-databases.sh生成有效的.tar.gz备份latesttag)文件变更
Generated/reviewed with: claude-opus-4-6
钱包地址 (FNDRY):
0x742d35Cc6634C0532925a3b844Bc454e4438f44e