add pgadmin

This commit is contained in:
tom.chivert
2025-12-15 10:21:34 +01:00
parent 8c30c9667b
commit 14763d611a
6 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
networks:
{% if docker_services_external_networks %}
traefik:
external: true
{% else %}
traefik:
name: traefik
{% endif %}
volumes:
{% if docker_services_external_volumes %}
pgadmin__data:
external: true
{% else %}
pgadmin__data:
name: pgadmin__data
{% endif %}
services:
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4:{{ pgadmin_version | default("latest") }}
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: "{{ pgadmin_email }}"
PGADMIN_DEFAULT_PASSWORD: "{{ pgadmin_password }}"
PGADMIN_LISTEN_PORT: "80"
volumes:
- pgadmin__data:/var/lib/pgadmin
labels:
traefik.enable: true
traefik.docker.network: traefik
traefik.http.routers.pgadmin.rule: Host(`{{ pgadmin_domain }}`)
traefik.http.routers.pgadmin.tls: true
traefik.http.routers.pgadmin.tls.certresolver: letsencrypt
traefik.http.routers.pgadmin.entrypoints: websecure
{% if traefik_ipwhitelist is defined %}
traefik.http.routers.pgadmin.middlewares: "clientips@docker"
{% endif %}
traefik.http.services.pgadmin.loadbalancer.server.port: 80
com.centurylinklabs.watchtower.enable: {{ pgadmin_watchtower_enable | default('true') }}
networks:
- traefik