mirror of
https://github.com/supabase/supabase.git
synced 2026-07-01 02:24:32 +08:00
fix: deprecated docker-compose in favour of compose v2
This commit is contained in:
@@ -16,7 +16,7 @@ Self-hosting Supabase is free. If you wish to use our cloud-platform, we provide
|
||||
|
||||
### How do I host Supabase?
|
||||
|
||||
You can use the docker-compose script [here](https://github.com/supabase/supabase/tree/master/docker), and find detailed instructions [here](/docs/guides/hosting/overview).
|
||||
You can use the docker compose script [here](https://github.com/supabase/supabase/tree/master/docker), and find detailed instructions [here](/docs/guides/hosting/overview).
|
||||
|
||||
Supabase is an amalgamation of open source tools. Some of these tools are made by Supabase (like our [Realtime Server](https://github.com/supabase/realtime)), some we support directly (like [PostgREST](http://postgrest.org/en/v7.0.0/)), and some are third-party tools (like [KonSupabase is an amalgamation open sourceg](https://github.com/Kong/kong)).
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Docker is the easiest way to get started with self-hosted Supabase.
|
||||
|
||||
You need the following installed in your system:
|
||||
|
||||
- [Docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/)
|
||||
- [Docker](https://docs.docker.com/engine/install/) and [docker compose](https://docs.docker.com/compose/install/)
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
|
||||
## Quick Start
|
||||
@@ -31,7 +31,7 @@ cd supabase/docker
|
||||
cp .env.example .env
|
||||
|
||||
# Start
|
||||
docker-compose up
|
||||
docker compose up
|
||||
```
|
||||
|
||||
Now visit [http://localhost:3000](http://localhost:3000) to start using Supabase Studio.
|
||||
@@ -97,7 +97,7 @@ Once you have done this, you can safely comment out the `db` section of the `doc
|
||||
|
||||
### Setting database's `log_min_messages`
|
||||
|
||||
By default, `docker-compose` sets the database's `log_min_messages` configuration to `fatal` to prevent redundant logs generated by Realtime.
|
||||
By default, `docker compose` sets the database's `log_min_messages` configuration to `fatal` to prevent redundant logs generated by Realtime.
|
||||
However, you might miss important log messages such as database errors. Configure `log_min_messages` based on your needs.
|
||||
|
||||
### File storage backend on macOS
|
||||
|
||||
@@ -37,13 +37,13 @@ GitHub stars rocketed for our two main repos, [supabase](https://github.com/supa
|
||||
|
||||
Here are the things that survived well.
|
||||
|
||||
### Middleware: docker-compose up
|
||||
### Middleware: docker compose up
|
||||
|
||||
This was the most surprising survivor. Our middleware was served from a single Ubuntu server with 4 CPUs and 8GB of RAM. This server was running our middleware using `docker-compose up`:
|
||||
This was the most surprising survivor. Our middleware was served from a single Ubuntu server with 4 CPUs and 8GB of RAM. This server was running our middleware using `docker compose up`:
|
||||
|
||||

|
||||

|
||||
|
||||
In case you're wondering why any sane company would use that in production, it's because we weren't planning to launch - the HackerNews post was created by an early GitHub follower, while we were alpha testing, and it was too scary to migrate the middleware while it was servicing the thundering herd. All Supabase projects use the same middleware stack (sans docker-compose), so I guess this counts as as a successful load test.
|
||||
In case you're wondering why any sane company would use that in production, it's because we weren't planning to launch - the HackerNews post was created by an early GitHub follower, while we were alpha testing, and it was too scary to migrate the middleware while it was servicing the thundering herd. All Supabase projects use the same middleware stack (without docker compose), so I guess this counts as a successful load test.
|
||||
|
||||
We have since migrated our middleware to multiple ECS clusters, globally load-balanced using AWS's [Global Accelerator](https://aws.amazon.com/global-accelerator/).
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ Also check `kong.yml` inside the `kong` directory where you'll see how all the s
|
||||
Once you're all set, you can start the stack by running:
|
||||
|
||||
```bash
|
||||
docker-compose up
|
||||
docker compose up
|
||||
```
|
||||
|
||||
Head over to the [Self Hosting Docs](/docs/guides/self-hosting) for a more complete walk through, it also includes several [one-click deploys](/docs/guides/self-hosting#one-click-deploys), so you can easily deploy into your own cloud hosting provider.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Usage
|
||||
# Start: docker-compose up
|
||||
# With helpers: docker-compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml up
|
||||
# Stop: docker-compose down
|
||||
# Destroy: docker-compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml down -v --remove-orphans
|
||||
# Start: docker compose up
|
||||
# With helpers: docker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml up
|
||||
# Stop: docker compose down
|
||||
# Destroy: docker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml down -v --remove-orphans
|
||||
|
||||
version: "3.8"
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
"dev:www": "turbo run dev --filter=www --parallel",
|
||||
"lint": "turbo run lint",
|
||||
"format": "prettier --write \"apps/**/*.{js,jsx,ts,tsx,css,md,json}\"",
|
||||
"docker:dev": "cd docker && docker-compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml up --renew-anon-volumes",
|
||||
"docker:up": "cd docker && docker-compose up",
|
||||
"docker:down": "cd docker && docker-compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml down --remove-orphans",
|
||||
"docker:remove": "cd docker && docker-compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml rm -vfs",
|
||||
"docker:dev": "cd docker && docker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml up --renew-anon-volumes",
|
||||
"docker:up": "cd docker && docker compose up",
|
||||
"docker:down": "cd docker && docker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml down --remove-orphans",
|
||||
"docker:remove": "cd docker && docker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml rm -vfs",
|
||||
"test": "jest",
|
||||
"test:studio": "turbo run test --filter=studio",
|
||||
"perf:kong": "ab -t 5 -c 20 -T application/json http://localhost:8000/",
|
||||
|
||||
@@ -19,7 +19,7 @@ As such, the features exposed on Studio for existing deployments are limited to
|
||||
|
||||
## Managing Project Settings
|
||||
|
||||
Project settings are managed outside of the Dashboard. If you use docker-compose, you should manage the settings in your docker-compose file. If you're deploying Supabase to your own cloud, you should store your secrets and env vars in a vault or secrets manager.
|
||||
Project settings are managed outside of the Dashboard. If you use docker compose, you should manage the settings in your docker-compose file. If you're deploying Supabase to your own cloud, you should store your secrets and env vars in a vault or secrets manager.
|
||||
|
||||
## How to contribute?
|
||||
|
||||
@@ -51,7 +51,7 @@ Follow the [self-hosting guide](https://supabase.com/docs/guides/hosting/docker)
|
||||
```
|
||||
cd ..
|
||||
cd docker
|
||||
docker-compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml up
|
||||
docker compose -f docker-compose.yml -f ./dev/docker-compose.dev.yml up
|
||||
```
|
||||
|
||||
Once you've got that set up, update `.env` in the studio folder with the corresponding values.
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
"version": "1.0.0",
|
||||
"description": "These tests can be run with Docker.",
|
||||
"scripts": {
|
||||
"docker:up": "cd ../docker && ENABLE_EMAIL_AUTOCONFIRM=true docker-compose --env-file ./.env -f docker-compose.yml -f dev/docker-compose.dev.yml up -d",
|
||||
"docker:down": "cd ../docker && docker-compose --env-file ./.env -f docker-compose.yml -f dev/docker-compose.dev.yml down",
|
||||
"docker:up": "cd ../docker && ENABLE_EMAIL_AUTOCONFIRM=true docker compose --env-file ./.env -f docker-compose.yml -f dev/docker-compose.dev.yml up -d",
|
||||
"docker:down": "cd ../docker && docker compose --env-file ./.env -f docker-compose.yml -f dev/docker-compose.dev.yml down",
|
||||
"test": "jest",
|
||||
"test:local": "jest --testNamePattern '^((?!\\[skip-local\\]).)*$' --testPathPattern '^((?!realtime).)*$' --detectOpenHandles",
|
||||
"test:stage": "jest --testNamePattern '^((?!\\[skip-stage\\]).)*$' --detectOpenHandles",
|
||||
|
||||
Reference in New Issue
Block a user