{"id":15764932,"url":"https://github.com/thorwebdev/supa-fly-ferretdb","last_synced_at":"2025-12-31T14:43:49.915Z","repository":{"id":216436812,"uuid":"739291104","full_name":"thorwebdev/supa-fly-ferretdb","owner":"thorwebdev","description":"Add MongoDB Compatibility to your Supabase Project with FerretDB and Fly.io!","archived":false,"fork":false,"pushed_at":"2024-01-31T10:19:11.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-12T03:53:56.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thorwebdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-05T08:04:35.000Z","updated_at":"2024-01-05T08:04:49.000Z","dependencies_parsed_at":"2024-10-25T11:40:02.098Z","dependency_job_id":"0648c694-7d48-4ac6-869d-6703fb91e91d","html_url":"https://github.com/thorwebdev/supa-fly-ferretdb","commit_stats":null,"previous_names":["thorwebdev/supa-fly-ferretdb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thorwebdev/supa-fly-ferretdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorwebdev%2Fsupa-fly-ferretdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorwebdev%2Fsupa-fly-ferretdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorwebdev%2Fsupa-fly-ferretdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorwebdev%2Fsupa-fly-ferretdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thorwebdev","download_url":"https://codeload.github.com/thorwebdev/supa-fly-ferretdb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorwebdev%2Fsupa-fly-ferretdb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265815012,"owners_count":23832820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T12:23:18.073Z","updated_at":"2025-12-31T14:43:49.887Z","avatar_url":"https://github.com/thorwebdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NoSQL Postgres with FerretDB, Fly.io, and Supabase\n\n[FerretDB](https://www.ferretdb.com/) is an awesome open source projects using JSONB to implement MongoDB compatability on top of Postgres!\n\n## Prerequisites\n\n- A hosted Supabase project. Don't have one yet? -\u003e [database.new](https://database.new)\n- Docker or [Orbstack](https://orbstack.dev/)\n\n## Run locally with Docker\n\n```bash\n# Expose required env vars:\nexport DB_USER=postgres\nexport DB_PASSWORD=\u003cyour db password\u003e\nexport SUPA_PROJECT_REF=\u003cyour Supabase project ref\u003e\nexport SUPA_REGION=\u003cyour project region\u003e\nexport DB_URL=postgres://$DB_USER.$SUPA_PROJECT_REF:$DB_PASSWORD@$SUPA_REGION.pooler.supabase.com:5432/postgres\n\n# Run FerretDB in docker container\ndocker run -p 27017:27017 -p 8080:8080 -e FERRETDB_POSTGRESQL_URL=$DB_URL ghcr.io/ferretdb/ferretdb\n\n# Consturct mongodb url\nexport MONGODB_URL=mongodb://$DB_USER.$SUPA_PROJECT_REF:$DB_PASSWORD@127.0.0.1:27017/ferretdb?authMechanism=PLAIN\n\n# Test with mongosh\n# If you have mongodb installed locally\nmongosh '$MONGODB_URL'\n# If you don't have mongodb installed locally, run in docker container\ndocker run --rm -it --entrypoint=mongosh mongo \\\n \"$MONGODB_URL\"\n\n# Test with MongoClient in TypeScript\ndeno run -A mongo.ts\n```\n\n## Deploy to Fly.io\n\n- fly launch --no-deploy\n  - An existing fly.toml file was found for app supa-ferretdb\n  - ? Would you like to copy its configuration to the new app? (y/N) \u003e y\n- fly secrets set FERRETDB_POSTGRESQL_URL=$DB_URL\n- fly deploy\n- fly ips allocate-v4\n  - Note: this is a paid feature! You can test it for free as long as you [release the dedicated IPv4](https://community.fly.io/t/we-are-going-to-start-charging-for-dedicated-ipv4-in-january-1st/15970#how-not-to-be-billed-2) before the end of the billing period!\n\nNow simply replace `127.0.0.1` in the `MONGODB_URL` with your dedicated IPv4 address and you're ready to roll \\o/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthorwebdev%2Fsupa-fly-ferretdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthorwebdev%2Fsupa-fly-ferretdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthorwebdev%2Fsupa-fly-ferretdb/lists"}