CircleCI-Public / cimg-postgres

MIT License
8 stars 25 forks source link

Bug Report: Support for user-defined PGDATA broken with pg_cron.sh #113

Open jacob-indigo opened 10 months ago

jacob-indigo commented 10 months ago

Describe the bug Postgres fails to start with the following error:

grep: /var/lib/postgresql/data/postgresql.conf: No such file or directory
/docker-entrypoint-initdb.d/pg_cron.sh: line 18: /var/lib/postgresql/data/postgresql.conf: No such file or directory
cat: /var/lib/postgresql/data/postgresql.conf: No such file or directory
cat: /var/lib/postgresql/data/postgresql.conf: No such file or directory

Exited with code 1

To Reproduce Add the docker executor to a CircleCI job config:

docker:
      - image: cimg/postgres:15.5
        environment:
          PGDATA: /dev/shm/pgdata/data

Expected behavior Postgres starts and is using the value of PGDATA as the data directory