Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Docker container does not start in version 15.8.1.039 #1445

Open
2 tasks done
dazz opened this issue Feb 15, 2025 · 1 comment
Open
2 tasks done

Bug: Docker container does not start in version 15.8.1.039 #1445

dazz opened this issue Feb 15, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@dazz
Copy link

dazz commented Feb 15, 2025

FATAL: The getkey script "/usr/share/postgresql/extension/pgsodium_getkey" does not exist.

services:
  supabase-db:
    image: supabase/postgres:15.8.1.039
    #image: supabase/postgres:17.0.1.035-orioledb
    container_name: supabase-db
    ports:
      - "5432:5432"
    command: postgres -c config_file=/etc/postgresql/postgresql.conf
    environment:
      POSTGRES_PASSWORD: "postgres"

Console output:

PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-02-15T13:24:08.564341000Z 
2025-02-15T13:24:08.579532000Z  2025-02-15 13:24:08.579 UTC [1] LOG:  pgaudit extension initialized
2025-02-15T13:24:08.586067000Z  2025-02-15 13:24:08.585 UTC [1] LOG:  pgsodium primary server secret key loaded
2025-02-15T13:24:08.586589000Z  2025-02-15 13:24:08.586 UTC [1] FATAL:  The getkey script "/usr/share/postgresql/extension/pgsodium_getkey" does not exist.
2025-02-15T13:24:08.586620000Z  2025-02-15 13:24:08.586 UTC [1] DETAIL:  The getkey script fetches the primary server secret key.
2025-02-15T13:24:08.586641000Z  2025-02-15 13:24:08.586 UTC [1] HINT:  You might want to create it and/or set "vault.getkey_script" to the correct path.
2025-02-15T13:24:08.586668000Z  2025-02-15 13:24:08.586 UTC [1] LOG:  database system is shut down

can be reproduced with

  • 17.0.1.035-orioledb
  • 15.8.1.039
  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

The docker container does not start. The container does start with version 15.8.1.034

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. put the above yaml into your compose file
  2. run docker compose up -d supabase-db
  3. See error

Expected behavior

when I initially start a container it is healthy

System information

  • OS: Nixos
@dazz dazz added the bug Something isn't working label Feb 15, 2025
@koiosjojo
Copy link

As a quick fix you can append the run call on line 173 of the Dockerfile-orioledb-17 with the following and rebuild:

RUN sed -i \
    -e "s|#unix_socket_directories = '/tmp'|unix_socket_directories = '/var/run/postgresql'|g" \
    -e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \
    -e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \
    -e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \
    echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \
    echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
    echo "vault.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
    echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \
    usermod -aG postgres wal-g && \
    mkdir -p /etc/postgresql-custom && \
    chown postgres:postgres /etc/postgresql-custom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants