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

Postgrest docker image doesn't work on Apple M1 #33

Closed
4 tasks done
goldcoders opened this issue May 16, 2021 · 9 comments
Closed
4 tasks done

Postgrest docker image doesn't work on Apple M1 #33

goldcoders opened this issue May 16, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@goldcoders
Copy link

goldcoders commented May 16, 2021

Postgrest Keeps Restarting

Describe the bug

Container of Postgres keeps restarting....
I tried several times, if somethings wrong...
if im running out of ram or not...
So Thats What I did I try to Bump the Ram and Swap

Default Docker Set Up

4 CPU
Memory 2GB
Swap 1 GB

  • This Result on Postgrest Keeps Restarting

Working Docker Set UP

4 CPU
Memory 4GB
Swap 4 GB

  • then enables Experimental Features

  • Use new Virtualization Framework

  • This Resolves the ISSUE

System information

  • Laptop: Macbook Air M1 with 8GB Ram
  • OS: MacOs M1 Big Sur
  • Version of supabase-js: [0.3.9]
  • Version of Node.js: [14.16.0]

To Reproduce

Docker Default Set Up

  • 4 CPU

  • Memory 2GB

  • Swap 1 GB

  • Fresh Install Docker

  • supabase init

  • supabase start

Expected behavior

Default Docker Set Up Will Keep the Postgrest container restarting...

Screenshots

If applicable, add screenshots to help explain your problem.

Screen Shot 2021-05-16 at 3 53 04 PM

@goldcoders goldcoders added the bug Something isn't working label May 16, 2021
@steve-chavez
Copy link
Member

Laptop: Macbook Air M1

Not related to RAM. The upstream docker container for PostgREST doesn't work for ARM(M1 architecture) on MacOS yet.

There's a workaround here though: PostgREST/postgrest#1785 (comment). It uses an Ubuntu build for ARM as the docker image.

@steve-chavez steve-chavez changed the title Postgrest Keeps Restarting , Please Add in Docs Minimum Ram Needed To run supabase Postgrest docker image doesn't work on Apple M1 May 16, 2021
@soedirgo
Copy link
Member

@steve-chavez it actually works on M1 (over qemu), though as @goldcoders said I had to increase Docker's RAM to 4GB for it to work. Not sure if we should document this here though, as it's tangential to the CLI...

@cdedreuille
Copy link

Just as a reference, I'm experiencing the same issue locally on Apple M1 (discussed here). I tried to push Docker's RAM to 4GB but it still keeps restarting.

@cdedreuille
Copy link

Ah it did work when I pushed the Swap to 4GB instead of 1.

@soedirgo
Copy link
Member

For the record, keeping this issue open until PostgREST has a stable arm64 image - hopefully Docker's 2GB default is enough by then.

@steve-chavez
Copy link
Member

There's now a PostgREST ARM Docker image for v9.0.0 and latest.

@steve-chavez
Copy link
Member

@soedirgo Can we close this one? (Not sure if the CLI needs updating or it will just pick up the latest docker image)

@soedirgo
Copy link
Member

soedirgo commented Dec 7, 2021

Yeah will close this once I update the image version in the CLI 👍

@soedirgo
Copy link
Member

soedirgo commented Dec 9, 2021

PostgREST 9 is now available in v0.15.6 👍

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

4 participants