Skip to content

[Bug]: Issues starting container with PDNS API enabled #766

@kuhball

Description

@kuhball

Describe the problem

Trying to use the container image. When setting the env vars PA_PDNS_API_URL and PA_PDNS_API_KEY the container is in a restart loop. This is the produced log:

[2025-09-01 09:17:38] Poweradmin Docker Container Starting...
[2025-09-01 09:17:38] Processing Docker secrets...
[2025-09-01 09:17:38] No custom config found. Generating settings.php from environment variables...
[2025-09-01 09:17:38] DEBUG: Starting configuration validation...
[2025-09-01 09:17:38] DEBUG: Starting database validation with DB_TYPE=sqlite
[2025-09-01 09:17:38] DEBUG: Checking SQLite database file: /db/pdns.db
[2025-09-01 09:17:38] DEBUG: File exists check: [ -f /db/pdns.db ] = true
[2025-09-01 09:17:38] DEBUG: Directory writable check: [ -w /db ] = true
[2025-09-01 09:17:38] DEBUG: SQLite validation passed
[2025-09-01 09:17:38] DEBUG: Database validation function completed
[2025-09-01 09:17:38] DEBUG: Database validation completed successfully
[2025-09-01 09:17:38] DEBUG: DNS_NS1='ns1.foobar.de'
[2025-09-01 09:17:38] DEBUG: DNS_NS2='ns2.foobar.de'
[2025-09-01 09:17:38] DEBUG: DNS_HOSTMASTER='hostmaster.foobar.de'
[2025-09-01 09:17:38] DEBUG: DNS validation completed
[2025-09-01 09:17:38] DEBUG: DNS validation completed successfully
[2025-09-01 09:17:38] DEBUG: Mail validation completed successfully

This seems to be an issue with the docker-entrypoint.sh. Tried to use set -xe to see more verbose logging, but it's ending with this:

+ validate_api_config
++ echo true
++ tr '[:upper:]' '[:lower:]'
+ local api_enabled=true
+ '[' true = true ']'
+ '[' -n http://pdns:8081 ']'
+ '[' -z 123456789 ']'

It seems to be exiting with the -z option.

Steps to reproduce

Use the following kube file:

apiVersion: v1
kind: Pod
metadata:
  name: poweradmin

spec:
  containers:
    - name: app
      image: ghcr.io/poweradmin/poweradmin:4
      env:
        - name: PA_PDNS_API_URL
          value: http://pdns:8081
        - name: PA_PDNS_API_KEY
          value: 123456789
        - name: DB_TYPE
          value: sqlite
        - name: PA_APP_TITLE
          value: foobar
        - name: PA_CREATE_ADMIN
          value: 1
        - name: DNS_NS1
          value: ns1.foobar.de
        - name: DNS_NS2
          value: ns2.foobar.de
        - name: DNS_HOSTMASTER
          value: hostmaster.foobar.de
        - name: PA_API_ENABLED
          value: true
        - name: DEBUG
          value: true
        - name: PA_TIMEZONE
          value: Europe/Berlin
      ports:
        - containerPort: 80
          hostPort: 8080
          protocol: TCP

Poweradmin version

4.0.1

Database

SQLite

Additional information (optional)

No response

Metadata

Metadata

Assignees

Labels

apiAPI-related features, improvements, and integrationsinfraPerformance & Infrastructure

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions