Add pgAdmin service configuration and update environment variables in .env.example

This commit is contained in:
Mohmmed Elfateh Sabry
2025-09-14 01:08:08 +03:00
parent 0e4a80bc4c
commit 5c2ab9935c
3 changed files with 102 additions and 0 deletions

View File

@@ -27,6 +27,12 @@ UMAMI_APP_SECRET=your_64_character_random_secret_here
# Website ID from Umami dashboard (use placeholder initially, update after setup) # Website ID from Umami dashboard (use placeholder initially, update after setup)
UMAMI_WEBSITE_ID=placeholder-website-id UMAMI_WEBSITE_ID=placeholder-website-id
## pgAdmin
# Default email for pgAdmin login
PGADMIN_DEFAULT_EMAIL=admin@your-domain.com
# Strong password for pgAdmin login
PGADMIN_DEFAULT_PASSWORD=your_strong_pgadmin_password
## Grafana ## Grafana
# Admin username for Grafana dashboard # Admin username for Grafana dashboard
GRAFANA_ADMIN_USER=admin GRAFANA_ADMIN_USER=admin

71
.gitignore vendored Normal file
View File

@@ -0,0 +1,71 @@
# Environment variables
.env
.env.local
.env.production
.env.staging
# Docker volumes and data
data/
volumes/
**/data/
**/volumes/
# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Dependency directories
node_modules/
# SSL certificates (if stored locally)
certs/
ssl/
*.pem
*.crt
*.key
# Backup files
*.backup
*.bak
*.tmp
# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~
# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Traefik specific
acme.json
traefik.log
access.log
# Database dumps
*.sql
*.dump
# Temporary files
*.temp
*.cache
# Docker override files (optional)
docker-compose.override.yml

View File

@@ -11,6 +11,7 @@ volumes:
portainer_data: portainer_data:
uptime_kuma_data: uptime_kuma_data:
umami_data: umami_data:
pgadmin_data:
######################## ########################
# Services # Services
@@ -67,6 +68,7 @@ services:
- --entrypoints.sieve.address=:4190 - --entrypoints.sieve.address=:4190
# Dashboard/API (internal) # Dashboard/API (internal)
- --api=true
- --api.dashboard=true - --api.dashboard=true
# ACME via HTTP-01 (no registrar API needed) # ACME via HTTP-01 (no registrar API needed)
@@ -196,3 +198,26 @@ services:
POSTGRES_PASSWORD: ${UMAMI_DB_PASS} POSTGRES_PASSWORD: ${UMAMI_DB_PASS}
volumes: volumes:
- umami_data:/var/lib/postgresql/data - umami_data:/var/lib/postgresql/data
## ─────────────────────────────────────────────
## pgAdmin — PostgreSQL administration
## ─────────────────────────────────────────────
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin
restart: unless-stopped
networks: [traefik_proxy]
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
PGADMIN_CONFIG_SERVER_MODE: 'False'
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'
volumes:
- pgadmin_data:/var/lib/pgadmin
labels:
- traefik.enable=true
- traefik.http.routers.pgadmin.rule=Host(`pgadmin.gate.${DOMAIN}`)
- traefik.http.routers.pgadmin.entrypoints=websecure
- traefik.http.routers.pgadmin.tls.certresolver=le
- traefik.http.routers.pgadmin.middlewares=basic-auth,security-headers
- traefik.http.services.pgadmin.loadbalancer.server.port=80