{"id":24167184,"url":"https://github.com/alex-guoba/supabase-docker","last_synced_at":"2026-05-06T13:15:25.193Z","repository":{"id":270689972,"uuid":"911014204","full_name":"alex-guoba/supabase-docker","owner":"alex-guoba","description":"A simple Docker setup for Supabase.","archived":false,"fork":false,"pushed_at":"2025-01-07T02:37:09.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T21:12:35.163Z","etag":null,"topics":["docker","docker-compose","supabase"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","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/alex-guoba.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":"2025-01-02T03:43:30.000Z","updated_at":"2025-01-07T02:37:12.000Z","dependencies_parsed_at":"2025-01-02T12:37:50.258Z","dependency_job_id":"32b26ebf-df93-450d-b5c3-43d68a5dc5a0","html_url":"https://github.com/alex-guoba/supabase-docker","commit_stats":null,"previous_names":["alex-guoba/supabase-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-guoba%2Fsupabase-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-guoba%2Fsupabase-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-guoba%2Fsupabase-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-guoba%2Fsupabase-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex-guoba","download_url":"https://codeload.github.com/alex-guoba/supabase-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241482109,"owners_count":19969850,"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":["docker","docker-compose","supabase"],"created_at":"2025-01-12T21:12:40.737Z","updated_at":"2026-05-06T13:15:25.176Z","avatar_url":"https://github.com/alex-guoba.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Supabase Docker\n\nA simple Docker setup for Supabase.\n\n## Features\n\n- Remove unnecessary services (`realtime`, `storage`, `function`) to improve performance.\n- Add support for OAuth(`github`, `twitter`) providers.\n- Add support for EMail Template.\n- Add SSL support.\n- Enable deploy in [dokploy](https://dokploy.com/).\n\n## Getting started\n\n### Prerequisites\n\n- Docker\n- Docker Compose\n- Git\n\n### Installation\n\n```bash\ngit clone https://github.com/alex-guoba/supabase-docker.git\ncd supabase-docker\ncp .env.example .env\n# Edit .env file to your needs\n\n# Start Supabase\ndocker compose up -d\n\n# Stop Supabase\ndocker compose down\n```\n\n### Usage\n\nAfter running `docker compose up -d`, you can access Supabase at http://127.0.0.1:8000.\n\n## Configuration\n\nYou can configure Supabase by editing the `.env` file.\n\n### Basic Configuration\n\n- `SITE_URL`: The URL of your Application.\n- `API_EXTERNAL_URL`: The URL of your Supabase Instance.\n- `ADDITIONAL_REDIRECT_URLS`: Additional redirect URLs for OAuth providers.\n\n### Auth Provider\n\nAdd OAuth provider to auth section of `docker-compose` file. For example, to add Github OAuth provider:\n\n```yaml\n# Github OAuth config in auth.enviroment\n# Comment to disable this\nGOTRUE_EXTERNAL_GITHUB_ENABLED: true\nGOTRUE_EXTERNAL_GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID}\nGOTRUE_EXTERNAL_GITHUB_SECRET: ${GITHUB_CLIENT_SECRET}\nGOTRUE_EXTERNAL_GITHUB_REDIRECT_URI: ${AUTH_REDIRECT_URL}\n```\n\nNote that you need to set `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` in your `.env` file.\n\nAfter adding the provider, You can use the API to verify the configuration of your OAuth providers:\n\n```bash\ncurl 'https://\u003cPROJECT_REF\u003e.supabase.co/auth/v1/settings' \\\n-H \"apikey: \u003cANON_KEY\u003e\" \\\n-H \"Authorization: Bearer \u003cANON_KEY\u003e\"\n```\n\nor you can input the `Auth Providers` in Commmand Menu of Supabase to check the configuration.\n\n### SMTP\n\nUse SMTP to send emails. In your `.env` file, add the following to configure your SMTP server:\n\n```shell\nSMTP_ADMIN_EMAIL=admin@example.com\nSMTP_HOST=supabase-mail\nSMTP_PORT=2500\nSMTP_USER=fake_mail_user\nSMTP_PASS=fake_mail_password\nSMTP_SENDER_NAME=fake_sender\n```\n\nSee [Supabase SMTP](https://supabase.com/docs/guides/auth/auth-smtp) for more details.\n\n### Email Templates\n\nYou can customize the email templates by editing the files in `./docker-compose.yml`.\n\n```yml\nGOTRUE_MAILER_TEMPLATES_RECOVERY: ${MAILER_TEMPLATES_RECOVERY}\nGOTRUE_MAILER_TEMPLATES_INVITE: ${MAILER_TEMPLATES_INVITE}\nGOTRUE_MAILER_TEMPLATES_CONFIRMATION: ${MAILER_TEMPLATES_CONFIRMATION}\nGOTRUE_MAILER_TEMPLATES_MAGIC_LINK: ${MAILER_TEMPLATES_MAGIC_LINK}\nGOTRUE_MAILER_TEMPLATES_EMAIL_CHANGE: ${MAILER_TEMPLATES_EMAIL_CHANGE}\n```\n\nSet your environment value in `.env`:\n\n```shell\nMAILER_TEMPLATES_INVITE=\"https://example.com/templates/invite.html\"\nMAILER_TEMPLATES_CONFIRMATION=\"https://example.com/templates/confirm.html\"\nMAILER_TEMPLATES_RECOVERY=\"https://example.com/templates/recovery.html\"\nMAILER_TEMPLATES_MAGIC_LINK=\"https://example.com/templates/magic-link.html\"\nMAILER_TEMPLATES_EMAIL_CHANGE=\"https://example.com/templates/email-change.html\"\n```\n\nThe email templates are written in HTML and can be customized to fit your needs. See [Supabase Email Templates](https://supabase.com/docs/guides/auth/auth-email-templates) for more details.\n\n### SSL Configuration\n\nTo enable SSL, you need to generate your own certificate and key files for Kong instance in supabase.\nGenerate your cert and key files and copy it to `./volumns/ssl/` directory. In your `.env` file, add the following:\n\n```shell\nSSL_CERT=\"example.crt\"\nKONG_SSL_CERT_KEY=\"example.key\"\n```\n\nUncomment the following line in `docker-compose.yml`:\n\n```yaml\nKONG_SSL_CERT: /mnt/ssl/${SSL_CERT_FILENAME}\nKONG_SSL_CERT_KEY: /mnt/ssl/${SSL_CERT_KEY_FILENAME}\n```\n\nIf you want to use a different way to maintain your certificate, like use Nginx as web-server and Let's Encrypt to generate and auto renew your certificate, you can uncomment it in `docker-compose.yml`.\n\n### Other Configuration\n\nAPI Keys, Secrets, and other configurations can be found in the official Supabase documentation. Make sure to update your `.env` file accordingly.\n\nSee [Docker Configuration](https://supabase.com/docs/guides/self-hosting/docker) for more details.\n\n## Development\n\nAll development is done in the `main` branch.\nThere is a `develop` docker file for development. You can override the `docker-compose.yml` file to use it:\n\n```\ndocker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml up\n```\n\n## Deploy in Dokploy\n\n[Dokploy](https://dokploy.com/) is a stable deployment platform for Docker applications. It is a simple way to deploy your Docker application to the cloud.\n\nDokploy provide some [templates](https://docs.dokploy.com/docs/core/templates) for all sort of Docker applications. we can use it to deploy Supabase.\n\nIf you want some customization, you can deploy through your `docker-compose.yml` file. Here is an [example](./docker-compose.dokploy.yml).\n\nHere is the process to deploy Supabase from `docker-compose.yml` file.\n\n1. Create a new project in Dokploy.\n2. Create a Compose service in project.\n3. Configure the deployment.\n\n- Provider: set your github repo in github provider. or you can paste the contents of `./docker-compose.dokploy.yml` in raw provider.\n- Environment: paste the contents of `./.env` in environment.\n- Volumes: add all of volume files in volumes setting. for example:\n  - Content: content of [vector.sql](./volumes/logs/vector.yml)\n  - Path: set to `/volumes/logs/vector.yml`\n- Docker links: enable `Isolate Deployment` in Utilities configuration.\n- Domains: set your domain in domains.\n\n4. Deploy.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-guoba%2Fsupabase-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex-guoba%2Fsupabase-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-guoba%2Fsupabase-docker/lists"}