mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
pgAdmin validates PGADMIN_DEFAULT_EMAIL against the RFC-6761 special-use list and exits 1 when the domain ends in .localhost, .test or .invalid. Under restart: unless-stopped that becomes a crash loop, which is what the health check reported for 25 minutes in run 30713666732: administrator@infinito.localhost does not appear to be a valid email address. Derive the permitted domain from the admin address itself and hand it to PGADMIN_CONFIG_ALLOW_SPECIAL_EMAIL_DOMAINS. An ordinary TLD in that list is a no-op, so a production domain is unaffected. Both the address and its TLD move into vars as constants, so the config lookup happens once. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
13 lines
577 B
YAML
13 lines
577 B
YAML
---
|
|
application_id: "web-app-pgadmin"
|
|
entity_name: "{{ application_id | get_entity_name }}"
|
|
|
|
PGADMIN_ADMIN_EMAIL: "{{ lookup('config', application_id, 'users.administrator.email') }}"
|
|
PGADMIN_ADMIN_EMAIL_TLD: "{{ PGADMIN_ADMIN_EMAIL.split('@')[1].split('.')[-1] }}"
|
|
|
|
PGADMIN_SERVER_MODE: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.server_mode') | bool }}"
|
|
PGADMIN_MASTER_PASSWORD_REQUIRED: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.master_password_required') | bool }}"
|
|
|
|
PGADMIN_USER: 5050
|
|
PGADMIN_GROUP: "{{ PGADMIN_USER }}"
|