Skip to content

feat(databases): add pgadmin4, redis-commander, init scripts (#11 $100)#356

Open
achievefibromyalgia-lgtm wants to merge 4 commits intoillbnm:masterfrom
achievefibromyalgia-lgtm:feature/databases-stack-11
Open

feat(databases): add pgadmin4, redis-commander, init scripts (#11 $100)#356
achievefibromyalgia-lgtm wants to merge 4 commits intoillbnm:masterfrom
achievefibromyalgia-lgtm:feature/databases-stack-11

Conversation

@achievefibromyalgia-lgtm
Copy link
Copy Markdown

@achievefibromyalgia-lgtm achievefibromyalgia-lgtm commented Mar 26, 2026

实现 Databases Stack(共享数据库栈)

服务清单

服务 镜像版本 说明
PostgreSQL postgres:16-alpine 共享关系数据库(Gitea、Outline 等)
Redis redis:7-alpine 缓存和 Session 存储(Outline 等)
MariaDB mariadb:11.4 MySQL 兼容数据库(Nextcloud 等)
pgAdmin4 dpage/pgadmin4:8.11 PostgreSQL 管理界面
Redis Commander rediscommander/redis-commander:latest Redis 管理界面

变更内容

1. stacks/databases/docker-compose.yml

  • 添加 pgAdmin4 服务(Traefik + SSO)
  • 添加 Redis Commander 服务(Redis Web UI)
  • Traefik 路由:pgadmin.${DOMAIN}、redis-commander.${DOMAIN}
  • 健康检查完善(postgres/redis/mariadb/pgadmin/redis-commander)

2. scripts/init-databases.sh(新增)

  • 幂等初始化脚本(可重复执行,不重置已有数据)
  • 支持 --postgres / --mariadb / --all 参数
  • 自动创建所有服务的数据库和用户

3. config/databases/backup-postgres.sh(新增)

  • GPG 加密 PostgreSQL 备份脚本,支持保留期管理

4. config/databases/backup-mariadb.sh(新增)

  • GPG 加密 MariaDB 备份脚本,支持保留期管理

5. scripts/backup-databases.sh(新增)

  • 统一备份脚本,支持 --postgres / --redis / --mariadb / --all

6. stacks/databases/README.md(新增)

  • 完整文档:pgAdmin/Redis Commander 使用、备份恢复、环境变量参考

7. .env.example

  • 添加 PGADMIN_EMAIL/PASSWORD
  • 添加 POSTGRES_BACKUP_PASSWORD、MARIADB_BACKUP_PASSWORD

8. README.md

  • 目录添加 Databases 行

验收标准覆盖

标准 状态
init-databases.sh 运行后所有数据库和用户创建成功
init-databases.sh 重复运行不报错
pgAdmin 可访问并连接 PostgreSQL
Redis Commander 可访问并连接 Redis
其他 Stack (Gitea/Nextcloud) 可通过内部 hostname 连接数据库
数据库容器不暴露到公网
backup-databases.sh 生成有效备份
README 包含各服务连接字符串示例

赏金认领

#11

…llbnm#11 )

## Changes
- Add phpMyAdmin service with Traefik routing (phpmyadmin.${DOMAIN})
- Add GPG-encrypted backup scripts for PostgreSQL and MariaDB
- Add stacks/databases/README.md with full documentation
- Update stacks/databases/.env.example with backup passwords
- Update root .env.example (POSTGRES_ROOT_PASSWORD, backup vars)
- Fix README.md catalog: add Databases row, correct Notifications issue #

## Services
- PostgreSQL 16-alpine (shared, internal)
- Redis 7-alpine (shared, internal)
- MariaDB 11.4 (shared, internal)
- phpMyAdmin 5.2.1 (admin UI, public)
@zhuzhushiwojia
Copy link
Copy Markdown

Claim! 我认领这个 Bounty!我有相关经验,可以完成。钱包地址:TMLkvEDrjvHEUbWYU1jfqyUKmbLNZkx6T1 (USDT TRC20)

@zhuzhushiwojia
Copy link
Copy Markdown

Claiming this $130 bounty! Experienced with phpMyAdmin, database management, and backup automation. Ready to start. USDT TRC20: TMLkvEDrjvHEUbWYU1jfqyUKmbLNZkx6T1

Achieve07 Bot added 2 commits March 27, 2026 10:53
Fixes GPG batch mode compatibility in Docker/non-interactive environments.
GPG_TTY=not a tty is unnecessary with --batch mode and can cause failures.
--pinentry-mode loopback avoids pinentry dialog issues.
… bounty amount

## Major Fixes
- Add pgadmin4 (dpage/pgadmin4:8.11) — replaces phpMyAdmin (pgAdmin required per Issue illbnm#11)
- Add Redis Commander (rediscommander/redis-commander:latest)
- Add scripts/init-databases.sh — idempotent init script for all databases
- Update stacks/databases/README.md to reflect admin UIs
- Add PGADMIN_EMAIL/PASSWORD to .env.example

## Minor Fixes
- postgres image: postgres:16-alpine (actual version matches 16.4)
- mariadb:11.4 (matches requirement)
- Fix bounty title:  USDT (matches issue body)
@achievefibromyalgia-lgtm achievefibromyalgia-lgtm changed the title feat(databases): add phpMyAdmin, GPG backup scripts (#11 $130) feat(databases): add pgadmin4, redis-commander, init scripts (#11 $100) Mar 27, 2026
…v vars

- Add Authentik DB to init-postgres() (conditional on AUTHENTIK_DB_PASSWORD)
- Add Redis multi-DB isolation: DB 0-4 for Authentik/Outline/Gitea/Nextcloud/Grafana
- Update redis-commander REDIS_HOSTS with per-db URLs
- Add AUTHENTIK_DB_PASSWORD to .env.example
- Update README with Authentik DB and Redis ?db=N isolation table
@achievefibromyalgia-lgtm
Copy link
Copy Markdown
Author

Status Update — All requested fixes have been committed:

Ready for review.

@zhuzhushiwojia
Copy link
Copy Markdown

🦞 Bounty Claim - Database Stack

Developer: 大眼 (bigeye)
Wallet: TMLkvEDrjvHEUbWYU1jfqyUKmbLNZkx6T1 (USDT TRC20)

Claim: I claim this $100 Database Stack bounty! I have experience with pgAdmin4, Redis Commander, and database management.

Ready to start immediately! 🚀

@zhuzhushiwojia
Copy link
Copy Markdown

🚀 Claiming this bounty!

I will work on the database stack implementation. Ready to start immediately!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants