Remove obsolete Docker/Buildkite infra, update to Supabase-based local dev#60
Remove obsolete Docker/Buildkite infra, update to Supabase-based local dev#60
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: bitnimble <4076797+bitnimble@users.noreply.github.com>
bitnimble
left a comment
There was a problem hiding this comment.
Meilisearch is obsolete so don't reference it, don't delete it from the codebase though. If S3 can use the local Supabase S3 API, then Minio can be deleted.
Is there any way for this to avoid clobbering data in the local Supabase if the user has some? e.g. using a different schema in the PG database etc.
…test Co-authored-by: bitnimble <4076797+bitnimble@users.noreply.github.com>
Co-authored-by: bitnimble <4076797+bitnimble@users.noreply.github.com>
Co-authored-by: bitnimble <4076797+bitnimble@users.noreply.github.com>
Addressed in a3ff7f9 and c6e43c6:
|
declanvong
left a comment
There was a problem hiding this comment.
Also add or update Github workflows to run the tests, make sure the workflow environment is set up with Supabase
src/services/jest_global_setup.ts
Outdated
| try { | ||
| const schemasDir = path.resolve(__dirname, '../../supabase/schemas'); | ||
| // Apply schemas in order matching supabase config.toml | ||
| const schemaFiles = ['maps.sql', 'users.sql', 'favorites.sql', 'functions.sql', 'misc.sql']; |
There was a problem hiding this comment.
avoiding recreating the test db or manually applying schema changes in a TS file. if possible, run a shell script that uses the supabase db cli to create it
| const { pool } = await getServerContext(); | ||
| const initialDataSqlPath = path.resolve(__dirname, '../../db/fake_data.sql'); | ||
| const initialDataSql = await fs.readFile(initialDataSqlPath).then((b) => b.toString()); | ||
| const seedSqlPath = path.resolve(__dirname, '../../supabase/seed.sql'); |
There was a problem hiding this comment.
this needs to reset the DB as well as seed the data
.env.test
Outdated
| NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY= | ||
| SUPABASE_SECRET_KEY= | ||
| NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321 | ||
| NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 |
There was a problem hiding this comment.
leave these keys out, they should be supplied by the user
|
@copilot address the changes recommended above |
… workflow Co-authored-by: bitnimble <4076797+bitnimble@users.noreply.github.com>
Co-authored-by: bitnimble <4076797+bitnimble@users.noreply.github.com>
Co-authored-by: bitnimble <4076797+bitnimble@users.noreply.github.com>
Addressed in ec8f929..6186222:
|
Removes all obsolete Docker, Buildkite, and self-hosted infrastructure, replacing it with a Supabase CLI-based local development and test workflow.
Removed
Dockerfile,Dockerfile.dev,.dockerignoredocker/docker-compose.{yml,dev.yml,test.yml}tools/docker/{start.sh,test.sh}.buildkite/pipeline.ymlUpdated
package.json— dropped Docker-basedbuild/startscripts,testnow runsdotenv -e .env.test -- bun jest --runInBanddirectlyjest_global_setup.ts— usessupabase db resetto apply migrations, schemas, and seeds once before the test suitejest_setup.ts— usesTRUNCATE ... RESTART IDENTITY CASCADE+ re-seed inbeforeEachfor fast per-test data resettools/update_schema.sh— sources.env.localdevinstead of deleted.env.docker.env.test— populated with Supabase local defaults, usesSEARCH_IMPLEMENTATION=postgres, Supabase keys left blank for users to supply fromsupabase statusREADME.md— rewritten forsupabase start→bun dev:localworkflowAGENTS.md— updated repo summary and commands, removed Meilisearch and MinIO referencesAdded
.github/workflows/test.yml— CI workflow that sets up Bun and Supabase CLI, starts local Supabase, extracts keys fromsupabase status, and runsbun check+bun testOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.