Initial commit: pgAdmin web interface (clean)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
|||||||
|
# Secrets
|
||||||
|
*.env
|
||||||
|
secrets/
|
||||||
|
*.pem
|
||||||
|
*.key
|
||||||
|
pgadmin_password.txt
|
||||||
|
|
||||||
|
# Data volumes
|
||||||
|
data/
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
~/apps/.launch.sh "$@"
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
services:
|
||||||
|
pgadmin:
|
||||||
|
image: dpage/pgadmin4:latest
|
||||||
|
container_name: infra-pgadmin
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@primal.host}
|
||||||
|
PGADMIN_DEFAULT_PASSWORD_FILE: /run/secrets/pgadmin_password
|
||||||
|
PGADMIN_CONFIG_PROXY_X_FOR_COUNT: 1
|
||||||
|
PGADMIN_CONFIG_PROXY_X_PROTO_COUNT: 1
|
||||||
|
secrets:
|
||||||
|
- pgadmin_password
|
||||||
|
volumes:
|
||||||
|
- pgadmin_data:/var/lib/pgadmin
|
||||||
|
- ./servers.json:/pgadmin4/servers.json:ro
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
- atproto
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
# Production route: pgadmin.primal.host
|
||||||
|
- "traefik.http.routers.pgadmin.rule=Host(`pgadmin.primal.host`)"
|
||||||
|
- "traefik.http.routers.pgadmin.entrypoints=https"
|
||||||
|
- "traefik.http.routers.pgadmin.tls.certresolver=letsencrypt"
|
||||||
|
- "traefik.http.routers.pgadmin.service=pgadmin"
|
||||||
|
- "traefik.http.services.pgadmin.loadbalancer.server.port=80"
|
||||||
|
# HTTP to HTTPS redirect
|
||||||
|
- "traefik.http.routers.pgadmin-redirect.rule=Host(`pgadmin.primal.host`)"
|
||||||
|
- "traefik.http.routers.pgadmin-redirect.entrypoints=http"
|
||||||
|
- "traefik.http.routers.pgadmin-redirect.middlewares=https-redirect"
|
||||||
|
# Local development route
|
||||||
|
- "traefik.http.routers.pgadmin-local.rule=Host(`pgadmin.primal.localhost`)"
|
||||||
|
- "traefik.http.routers.pgadmin-local.entrypoints=http"
|
||||||
|
- "traefik.http.routers.pgadmin-local.service=pgadmin"
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
pgadmin_password:
|
||||||
|
file: ./pgadmin_password.txt
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
pgadmin_data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
atproto:
|
||||||
|
external: true
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"Servers": {
|
||||||
|
"1": {
|
||||||
|
"Name": "postgres.primal.host",
|
||||||
|
"Group": "Servers",
|
||||||
|
"Host": "infra-postgres",
|
||||||
|
"Port": 5432,
|
||||||
|
"MaintenanceDB": "news_1440",
|
||||||
|
"Username": "news_1440",
|
||||||
|
"SSLMode": "prefer",
|
||||||
|
"PassFile": "/pgadmin4/pgpass"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user