supabase / supabase

The open source Firebase alternative.
https://supabase.com
Apache License 2.0
68.38k stars 6.48k forks source link

[Self-Hosting] The container db-1 not working with Podman #27454

Open Andres6936 opened 1 week ago

Andres6936 commented 1 week ago

Bug report

Describe the bug

When attempting to use Podman to start Supabase in Self-Hosting mode, the db-1 container (PostgresSQL) fails to start, aborting the startup and raise process.

To Reproduce

# Get the code
git clone --depth 1 https://github.com/supabase/supabase

# Go to the docker folder
cd supabase/docker

# Copy the fake env vars
cp .env.example .env

# Pull the latest images
podman compose pull

# Start the services (in detached mode)
podman compose up -d

Expected behavior

Supabase starts without problems in Self-Hosting mode

Screenshots

I am attaching the log of the problematic container:

The database cluster will be initialized with this locale configuration:
  provider:    libc
  LC_COLLATE:  C.UTF-8
  LC_CTYPE:    C.UTF-8
  LC_MESSAGES: en_US.UTF-8
  LC_MONETARY: en_US.UTF-8
  LC_NUMERIC:  en_US.UTF-8
  LC_TIME:     en_US.UTF-8
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

System information

PS C:\Users\Saturno\IdeaProjects\Supabase\docker> podman version
Client:       Podman Engine
Version:      4.9.4
API Version:  4.9.4
Go Version:   go1.22.1
Git Commit:   3aceae8ace3c7e3c5591900db32d188cf60be535
Built:        Thu Mar 28 08:33:28 2024
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      4.6.1
API Version:  4.6.1
Go Version:   go1.19.10
Built:        Thu Aug 10 17:07:55 2023
OS/Arch:      linux/amd64
encima commented 1 week ago

Hi @Andres6936 I am unsure but this feels like a Windows issue but could be a Podman issue with the directory mounting.

Can you try testing this from within your WSL environment and confirm if this works?

Andres6936 commented 1 week ago

@encima , No, not is possible for me confirm the issue in WSL.

encima commented 1 week ago

@Andres6936 OK

We will leave this open for now to track. If no one else reports the same issue then we may need to close it as a Podman/Windows issue

You are welcome to also create an issue with Podman.