update organizr to use postgres-shared instead of sqlite
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Application Stacks │
|
||||
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
|
||||
│ │Authentik │ │ Gitea │ │ Future │ │ Future │ │
|
||||
│ │ │ │ │ │ Stack │ │ Stack │ │
|
||||
│ │Authentik │ │ Gitea │ │ Organizr │ │ Future │ │
|
||||
│ │ │ │ │ │ │ │ Stack │ │
|
||||
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
|
||||
│ │ │ │ │ │
|
||||
└───────┼─────────────┼──────────────┼──────────────┼─────────┘
|
||||
@@ -33,7 +33,8 @@
|
||||
│ Databases:│ │ DB 0: Cache │
|
||||
│ - auth │ │ DB 1: Auth │
|
||||
│ - gitea │ │ DB 2: Gitea │
|
||||
│ - future │ │ DB 3-15: .. │
|
||||
│ - organizr│ │ DB 3-15: .. │
|
||||
│ - future │ │ │
|
||||
└───────────┘ └─────────────┘
|
||||
```
|
||||
|
||||
@@ -77,6 +78,7 @@
|
||||
|---------------|-------------|------|---------|
|
||||
| `authentik` | Authentik | `authentik_user` | User/group/policy storage |
|
||||
| `gitea` | Gitea | `gitea_user` | Git repos, users, issues |
|
||||
| `organizr` | Organizr | `organizr_user` | Dashboard configuration and user data |
|
||||
| `future_app1` | TBD | `app1_user` | Reserved |
|
||||
| `future_app2` | TBD | `app2_user` | Reserved |
|
||||
|
||||
|
||||
@@ -46,19 +46,21 @@ PostgreSQL Shared is a centralized PostgreSQL 17 database server providing isola
|
||||
| **Resource Limits** | None |
|
||||
| **GPU Required** | No |
|
||||
| **Dependencies** | docker-dataplane network |
|
||||
| **Databases** | `authentik` (Authentik SSO), `gitea` (Git hosting), `postgres` (default/admin) |
|
||||
| **Database Users** | `authentik_user`, `gitea_user`, `postgres` (superuser) |
|
||||
| **Databases** | `authentik` (Authentik SSO), `gitea` (Git hosting), `organizr` (Organizr dashboard), `postgres` (default/admin) |
|
||||
| **Database Users** | `authentik_user`, `gitea_user`, `organizr_user`, `postgres` (superuser) |
|
||||
| **Health Check** | `pg_isready -U postgres` (30s interval) |
|
||||
| **Backup Strategy** | `/backups` volume for pg_dump exports |
|
||||
|
||||
**Initialization**: Databases and users are created manually after first deployment:
|
||||
```bash
|
||||
docker exec -i postgres-shared psql -U postgres <<'EOF'
|
||||
CREATE DATABASE authentik;
|
||||
CREATE USER authentik_user WITH PASSWORD '<password>';
|
||||
GRANT ALL PRIVILEGES ON DATABASE authentik TO authentik_user;
|
||||
EOF
|
||||
```
|
||||
**Initialization**: Databases and users for `authentik` and `gitea` are created by the `postgres-init.sh` script.
|
||||
|
||||
**Adding Organizr Database**:
|
||||
|
||||
1. **Generate a secure password** for the `organizr_user`.
|
||||
2. **In Portainer, navigate to the `postgres-shared` service.**
|
||||
3. **Go to the "Env" tab and add a new environment variable:**
|
||||
* **Name:** `ORGANIZR_DB_PASSWORD`
|
||||
* **Value:** *Your generated password*
|
||||
4. **Redeploy the `postgres-shared` service.** This will trigger the `postgres-init.sh` script to create the `organizr` database and user.
|
||||
|
||||
---
|
||||
|
||||
@@ -241,15 +243,27 @@ Organizr serves as a comprehensive unified dashboard that consolidates all homel
|
||||
| **Network Mode** | Bridge |
|
||||
| **Restart Policy** | `unless-stopped` |
|
||||
| **Volume Mounts** | `~/docker-data/organizr:/config` |
|
||||
| **Environment** | Built-in (no custom env vars) |
|
||||
| **Environment** | `DB_TYPE=pgsql`, `DB_HOST=postgres-shared`, `DB_PORT=5432`, `DB_NAME=organizr`, `DB_USER=organizr_user`, `DB_PASS=${ORGANIZR_DB_PASSWORD}` |
|
||||
| **Resource Limits** | None |
|
||||
| **GPU Required** | No |
|
||||
| **Dependencies** | None (integrates with other services via API) |
|
||||
| **Database** | SQLite at `/config/db/organizrDashboardDb.db` |
|
||||
| **Dependencies** | PostgreSQL Shared |
|
||||
| **Database** | PostgreSQL on `postgres-shared` (database `organizr`) |
|
||||
| **Database Size** | ~5-10MB (typical) |
|
||||
| **Integrated Services** | Jellyfin, Netdata, Uptime Kuma |
|
||||
| **Authentication** | Internal (supports SSO, Plex OAuth, LDAP) |
|
||||
|
||||
**Configuration**:
|
||||
|
||||
1. **In Portainer, navigate to the `organizr` stack.**
|
||||
2. **Go to the "Env" tab and ensure the following environment variables are set:**
|
||||
* `DB_TYPE=pgsql`
|
||||
* `DB_HOST=postgres-shared`
|
||||
* `DB_PORT=5432`
|
||||
* `DB_NAME=organizr`
|
||||
* `DB_USER=organizr_user`
|
||||
* `DB_PASS`: This should be a secret. Create a secret in Portainer named `ORGANIZR_DB_PASSWORD` and set its value to the password you generated for the `organizr_user`.
|
||||
3. **Redeploy the `organizr` stack.**
|
||||
|
||||
---
|
||||
|
||||
## Optimization Layer
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,12 @@ services:
|
||||
- PGID=1000
|
||||
- TZ=Europe/Amsterdam
|
||||
- fpm=true # Enable PHP-FPM for better performance
|
||||
- DB_TYPE=pgsql
|
||||
- DB_HOST=postgres-shared
|
||||
- DB_PORT=5432
|
||||
- DB_NAME=organizr
|
||||
- DB_USER=organizr_user
|
||||
- DB_PASS=${ORGANIZR_DB_PASSWORD}
|
||||
networks:
|
||||
- docker-dataplane
|
||||
|
||||
|
||||
Reference in New Issue
Block a user