Skip to content

Replace emulator images#5

Merged
soedirgo merged 4 commits intomainfrom
feat/docker-emulator
Mar 30, 2021
Merged

Replace emulator images#5
soedirgo merged 4 commits intomainfrom
feat/docker-emulator

Conversation

@soedirgo
Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

Feature.

What is the current behavior?

The emulator's docker-compose.yml is using opaque images.

What is the new behavior?

  • Use the docker files from here,
  • remove eject command (redundant since we dump the docker-compose.yml on init),
  • don't .gitignore .supabase on init. It will contain configs etc. in the future which we don't want to ignore (right?), for things like temporary migration scripts (?) we can add individual .gitignores in the corresponding directory.

@soedirgo soedirgo requested a review from kiwicopple March 25, 2021 02:35
@kiwicopple
Copy link
Copy Markdown
Member

don't .gitignore .supabase on init. It will contain configs etc.

My line of reasoning was that we use this folder for anything that is epemeral/secret, and then we add a supabase.config.js or something similar to the user's root folder for anything that needs to be tracked in git. When the user upgrades the CLI we can also make updates to the files in the .supabase folder without it polluting their git history

Vercel's have a similar concept (although they don't use the folder as heavily as we will):

# ./.vercel/README.txt

> Why do I have a folder named ".vercel" in my project?
The ".vercel" folder is created when you link a directory to a Vercel project.

> Should I commit the ".vercel" folder?
No, you should not share the ".vercel" folder with anyone.
Upon creation, it will be automatically added to your ".gitignore" file.

remove eject command

I think this is still useful. The reasoning is:

As a frontend dev I might have my own docker-compose in the root of my folder, and I don't want it polluted with backend setup (especially one as complicated as Supabase's). However, if I want to "take control" then I can eject. Once I eject, I have to manage everything myself (eg, the supabase cli probably won't work as expected)

wdyt?

@soedirgo
Copy link
Copy Markdown
Member Author

Ah, makes sense. I was thinking along the lines of .github.

However, if I want to "take control" then I can eject

I think for some form of control (e.g. changing kong's port) we can do it through the config file. Also, the compose file needs a bunch of other directories now (does the user have kong/postgres in the project root?), and if I want to take control and use it without the CLI, I can always fetch it from .supabase.

@soedirgo soedirgo force-pushed the feat/docker-emulator branch from 519ef4d to f4c8f3a Compare March 30, 2021 10:22
@soedirgo soedirgo merged commit 98d14c7 into main Mar 30, 2021
@soedirgo soedirgo deleted the feat/docker-emulator branch March 30, 2021 10:34
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants