Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Moving to new layRemoving the build until it is ready

Paul Copplestonebb9be0b1128e
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 541092b4aae..00000000000
--- a/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-help:
- @echo "\nDOCKER\n"
- @echo "make dev # start docker in foreground"
- @echo "make start # start docker in background"
- @echo "make stop # stop docker"
- @echo "make rebuild # restart docker and force it to rebuild"
- @echo "make pull # pull all the latest docker images"
-
-#########################
-# Docker
-#########################
-
-dev:
- docker-compose -f docker-compose.yml up
-
-start:
- docker-compose -f docker-compose.yml up -d
-
-stop:
- docker-compose -f docker-compose.yml down --remove-orphans
-
-rebuild:
- docker-compose -f docker-compose.yml down --remove-orphans
- docker-compose -f docker-compose.yml build
- docker-compose -f docker-compose.yml up --force-recreate
-
-pull:
- docker-compose -f docker-compose.yml pull
diff --git a/README.md b/README.md
index 32c9313007f..607943bd0ca 100644
--- a/README.md
+++ b/README.md
@@ -2,3 +2,14 @@
[Supabase](https://supabase.io)
+## Structure
+
+```bash
+├── connectors # WIP: connectors for supabase
+├── examples
+│   └── next-js
+├── libraries
+│   └── supabase-js # JS client library
+└── web
+ ├── docs # Website docs
+```
\ No newline at end of file
diff --git a/app/README.md b/app/README.md
deleted file mode 100644
index e3ac4492583..00000000000
--- a/app/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# App
-
-@todo
\ No newline at end of file
diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml
deleted file mode 100644
index 0cc931e7914..00000000000
--- a/dev/docker-compose.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-version: '3'
-services:
- db:
- build: ./postgres
- ports:
- - "6543:5432"
- # env_file:
- # - "./config/local/db.env"
- environment:
- POSTGRES_USER: supabase
- POSTGRES_PASSWORD: postgres
- POSTGRES_PORT: 5432
- rest:
- image: postgrest/postgrest
- depends_on:
- - db
- restart: always
- ports:
- - "3000:3000"
- environment:
- PGRST_DB_URI: postgres://supabase:postgres@db:5432/supabase
- PGRST_DB_SCHEMA: public
- PGRST_DB_ANON_ROLE: supabase
- kong:
- build: ./kong
- ports:
- - "8000:8000/tcp"
- - "8443:8443/tcp"
- restart: on-failure
- depends_on:
- - rest
- environment:
- KONG_ADMIN_ACCESS_LOG: /dev/stdout
- KONG_ADMIN_ERROR_LOG: /dev/stderr
- KONG_PROXY_ACCESS_LOG: /dev/stdout
- KONG_PROXY_ERROR_LOG: /dev/stderr
- KONG_ADMIN_LISTEN: 0.0.0.0:8001
-
- # frontend:
- # build: ./frontend
- # ports:
- # - "3333:3000"
-
- # realtime:
- # image: supabase/realtime
- # ports:
- # - "4001:4000"
- # environment:
- # POSTGRES_USER: supabase
- # POSTGRES_PASSWORD: postgres
- # POSTGRES_PORT: 5432
-
\ No newline at end of file
diff --git a/dev/docker/Dockerfile b/dev/docker/Dockerfile
deleted file mode 100644
index 9c0804e64ef..00000000000
--- a/dev/docker/Dockerfile
+++ /dev/null
@@ -1,70 +0,0 @@
-FROM supabase/realtime:latest
-
-ARG POSTGREST_VERSION="v6.0.2"
-ENV DB_HOST=localhost \
- DB_NAME=postgres \
- DB_USER=postgres \
- DB_PASSWORD=postgres \
- DB_PORT=5432 \
- PGRST_DB_URI= \
- PGRST_DB_SCHEMA=public \
- PGRST_DB_ANON_ROLE= \
- PGRST_DB_POOL=100 \
- PGRST_DB_EXTRA_SEARCH_PATH=public \
- PGRST_SERVER_HOST=*4 \
- PGRST_SERVER_PORT=3000 \
- PGRST_SERVER_PROXY_URI= \
- PGRST_JWT_SECRET= \
- PGRST_SECRET_IS_BASE64=false \
- PGRST_JWT_AUD= \
- PGRST_MAX_ROWS= \
- PGRST_PRE_REQUEST= \
- PGRST_ROLE_CLAIM_KEY=".role" \
- PGRST_ROOT_SPEC= \
- PGRST_RAW_MEDIA_TYPES=
-
-RUN apt-get update
-
-# Install libpq5
-RUN apt-get -qq install -y --no-install-recommends libpq5 && \
- apt-get -qq clean && \
- rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-
-# Install postgrest
-RUN BUILD_DEPS="curl ca-certificates xz-utils" && \
- apt-get -qq update && \
- apt-get -qq install -y --no-install-recommends $BUILD_DEPS && \
- cd /tmp && \
- curl -SLO https://github.com/PostgREST/postgrest/releases/download/${POSTGREST_VERSION}/postgrest-${POSTGREST_VERSION}-ubuntu.tar.xz && \
- tar -xJvf postgrest-${POSTGREST_VERSION}-ubuntu.tar.xz && \
- mv postgrest /usr/local/bin/postgrest && \
- cd / && \
- apt-get -qq purge --auto-remove -y $BUILD_DEPS && \
- apt-get -qq clean && \
- rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-
-COPY postgrest.conf /etc/postgrest.conf
-
-RUN groupadd -g 1000 postgrest && \
- useradd -r -u 1000 -g postgrest postgrest && \
- chown postgrest:postgrest /etc/postgrest.conf
-
-# Add user to Realtime
-RUN chown -R postgrest:postgrest /prod/rel/realtime/
-
-ADD start.sh /
-RUN chmod +x /start.sh
-
-USER 1000
-
-EXPOSE 3000
-EXPOSE 4000
-
-CMD ["/start.sh"]
-
-# PostgREST reads /etc/postgrest.conf so map the configuration
-# file in when you run this container
-# CMD exec postgrest /etc/postgrest.conf
-# CMD ["sh", "-c", "/prod/rel/realtime/bin/realtime start ; exec postgrest /etc/postgrest.conf"]
-
-# docker build . -t supabase --pull --no-cache
\ No newline at end of file
diff --git a/dev/docker/postgrest.conf b/dev/docker/postgrest.conf
deleted file mode 100644
index b9c7cde0ede..00000000000
--- a/dev/docker/postgrest.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-db-uri = "$(PGRST_DB_URI)"
-db-schema = "$(PGRST_DB_SCHEMA)"
-db-anon-role = "$(PGRST_DB_ANON_ROLE)"
-db-pool = "$(PGRST_DB_POOL)"
-db-extra-search-path = "$(PGRST_DB_EXTRA_SEARCH_PATH)"
-
-server-host = "$(PGRST_SERVER_HOST)"
-server-port = "$(PGRST_SERVER_PORT)"
-
-server-proxy-uri = "$(PGRST_SERVER_PROXY_URI)"
-jwt-secret = "$(PGRST_JWT_SECRET)"
-secret-is-base64 = "$(PGRST_SECRET_IS_BASE64)"
-jwt-aud = "$(PGRST_JWT_AUD)"
-role-claim-key = "$(PGRST_ROLE_CLAIM_KEY)"
-
-max-rows = "$(PGRST_MAX_ROWS)"
-pre-request = "$(PGRST_PRE_REQUEST)"
-root-spec = "$(PGRST_ROOT_SPEC)"
-raw-media-types = "$(PGRST_RAW_MEDIA_TYPES)"
\ No newline at end of file
diff --git a/dev/docker/start.sh b/dev/docker/start.sh
deleted file mode 100644
index ec88c521d00..00000000000
--- a/dev/docker/start.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-exec postgrest /etc/postgrest.conf &
-/prod/rel/realtime/bin/realtime start &
\ No newline at end of file
diff --git a/dev/kong/Dockerfile b/dev/kong/Dockerfile
deleted file mode 100644
index f47d6fe005b..00000000000
--- a/dev/kong/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM kong:latest
-
-COPY kong.yml /var/lib/kong/kong.yml
-
-ENV KONG_DATABASE=off
-ENV KONG_DECLARATIVE_CONFIG=/var/lib/kong/kong.yml
-
-EXPOSE 8000
-EXPOSE 8001
-EXPOSE 8443
-EXPOSE 8444
\ No newline at end of file
diff --git a/dev/kong/kong.yml b/dev/kong/kong.yml
deleted file mode 100644
index 9d401086d61..00000000000
--- a/dev/kong/kong.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-# ------------------------------------------------------------------------------
-# This is an example file to get you started with using
-# declarative configuration in Kong.
-# ------------------------------------------------------------------------------
-
-# Metadata fields start with an underscore (_)
-# Fields that do not start with an underscore represent Kong entities and attributes
-
-# _format_version is mandatory,
-# it specifies the minimum version of Kong that supports the format
-
-_format_version: "1.1"
-
-# Each Kong entity (core entity or custom entity introduced by a plugin)
-# can be listed in the top-level as an array of objects:
-
-services:
- #### POSTGREST CONFIGURATION
- - name: rest-v0
- _comment: "Points to the PostgREST server."
- url: http://rest:3000/
- routes:
- - name: rest-v0-all
- strip_path: true
- paths:
- - /rest/v0/
- tags:
- - postgrest
- plugins:
- - name: cors
-
-
-# services:
-# - name: example-service
-# url: http://example.com
-# # Entities can store tags as metadata
-# tags:
-# - example
-# # Entities that have a foreign-key relationship can be nested:
-# routes:
-# - name: example-route
-# paths:
-# - /
-# plugins:
-# - name: key-auth
-# - name: another-service
-# url: https://example.org
-
-# routes:
-# - name: another-route
-# # Relationships can also be specified between top-level entities,
-# # either by name or by id
-# service: example-service
-# hosts: ["hello.com"]
-
-# consumers:
-# - username: example-user
-# # Custom entities from plugin can also be specified
-# # If they specify a foreign-key relationshp, they can also be nested
-# keyauth_credentials:
-# - key: my-key
-# plugins:
-# - name: rate-limiting
-# _comment: "these are default rate-limits for user example-user"
-# config:
-# policy: local
-# second: 5
-# hour: 10000
-
-# When an entity has multiple foreign-key relationships
-# (e.g. a plugin matching on both consumer and service)
-# it must be specified as a top-level entity, and not through
-# nesting.
-
-# plugins:
-# - name: rate-limiting
-# consumer: example-user
-# service: another-service
-# _comment: "example-user is extra limited when using another-service"
-# config:
-# hour: 2
-# # tags are for your organization only and have no meaning for Kong:
-# tags:
-# - extra_limits
-# - my_tag
diff --git a/dev/postgres/Dockerfile b/dev/postgres/Dockerfile
deleted file mode 100644
index 3e2f81aa04b..00000000000
--- a/dev/postgres/Dockerfile
+++ /dev/null
@@ -1,3 +0,0 @@
-FROM supabase/packaged
-
-ADD ./mnt /docker-entrypoint-initdb.d/
\ No newline at end of file
diff --git a/dev/postgres/mnt/conf.sql b/dev/postgres/mnt/conf.sql
deleted file mode 100644
index aa49660a1dd..00000000000
--- a/dev/postgres/mnt/conf.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-ALTER SYSTEM SET wal_level='logical';
-ALTER SYSTEM SET max_wal_senders='11';
-ALTER SYSTEM SET max_replication_slots='11';
-
--- This is now run in the latest dump
--- CREATE PUBLICATION supabase_realtime FOR ALL TABLES;
-
-CREATE ROLE web_admin;
\ No newline at end of file
diff --git a/dev/postgres/mnt/latest.sql b/dev/postgres/mnt/latest.sql
deleted file mode 100644
index 0eeb65b5572..00000000000
--- a/dev/postgres/mnt/latest.sql
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
---
--- Name: cities; Type: TABLE; Schema: public; Owner: supabase
---
-
-CREATE TABLE public.cities (
- id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
- name character varying(255) NOT NULL,
- country_id integer NOT NULL
-);
-
-
-
---
--- Name: countries; Type: TABLE; Schema: public; Owner: supabase
---
-
-CREATE TABLE public.countries (
- id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
- name character varying(255) NOT NULL,
- iso2 character varying(5) NOT NULL,
- continent character varying(255) NOT NULL
-);
-
-
---
--- Data for Name: cities; Type: TABLE DATA; Schema: public; Owner: supabase
---
-
-COPY public.cities (id, name, country_id) FROM stdin;
-1 Rio de Janeiro 1
-2 Beijing 2
-3 Paris 3
-4 Auckland 4
-5 Lagos 5
-6 San Francisco 6
-\.
-
-
---
--- Data for Name: countries; Type: TABLE DATA; Schema: public; Owner: supabase
---
-
-COPY public.countries (id, name, iso2, continent) FROM stdin;
-1 Brazil BR South America
-2 China CN Asia
-3 France FR Europe
-4 New Zealand NZ Oceania
-5 Nigeria NG Africa
-6 United States US North America
-\.
-
diff --git a/docker-compose.yml b/docker-compose.yml
deleted file mode 100644
index 412599e8208..00000000000
--- a/docker-compose.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-version: '3'
-
-services:
- supabase:
- build: ./dev/docker
- ports:
- - "4000:4000"
- - "3000:3000"
- environment:
- DB_HOST: db
- DB_NAME: postgres
- DB_USER: postgres
- DB_PASSWORD: postgres
- DB_PORT: 5432
- APP_PORT: 4000
- APP_HOSTNAME: localhost
- SECRET_KEY_BASE: SOMETHING_SUPER_SECRET
- PGRST_DB_URI: postgres://postgres:postgres@db:5432/postgres
- PGRST_DB_SCHEMA: public
- PGRST_DB_ANON_ROLE: postgres
- depends_on:
- - db
- # command: ["sh", "-c", "/prod/rel/realtime/bin/realtime start ; exec postgrest /etc/postgrest.conf"]
- command: ["/start.sh"]
- db:
- build: ./dev/postgres
- ports:
- - "5432:5432"
-
-
\ No newline at end of file
diff --git a/examples/next-js/.gitignore b/examples/next-js/.gitignore
deleted file mode 100644
index 922d92a5745..00000000000
--- a/examples/next-js/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-.env*
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
diff --git a/examples/next-js/Dockerfile b/examples/next-js/Dockerfile
deleted file mode 100644
index c8ee7f4c195..00000000000
--- a/examples/next-js/Dockerfile
+++ /dev/null
@@ -1,12 +0,0 @@
-FROM node:10
-
-WORKDIR /usr/src/app
-
-COPY package*.json ./
-RUN npm install
-
-COPY . .
-
-RUN npm run build
-
-CMD [ "npm", "start" ]
\ No newline at end of file
diff --git a/examples/next-js/README.md b/examples/supabase-chat-room/README.md
similarity index 100%
rename from examples/next-js/README.md
rename to examples/supabase-chat-room/README.md
diff --git a/examples/next-js/next.config.js b/examples/supabase-chat-room/next.config.js
similarity index 100%
rename from examples/next-js/next.config.js
rename to examples/supabase-chat-room/next.config.js
diff --git a/examples/next-js/package-lock.json b/examples/supabase-chat-room/package-lock.json
similarity index 100%
rename from examples/next-js/package-lock.json
rename to examples/supabase-chat-room/package-lock.json
diff --git a/examples/next-js/package.json b/examples/supabase-chat-room/package.json
similarity index 84%
rename from examples/next-js/package.json
rename to examples/supabase-chat-room/package.json
index d93a3a104d8..f501920a37e 100644
--- a/examples/next-js/package.json
+++ b/examples/supabase-chat-room/package.json
@@ -1,5 +1,5 @@
{
- "name": "with-dotenv",
+ "name": "supabase-chat-rrom",
"version": "1.0.0",
"scripts": {
"dev": "next -p 8080",
@@ -8,11 +8,10 @@
},
"dependencies": {
"@supabase/supabase-js": "file:../../../../../desktop/supabase/monorepo/libraries/supabase-js",
- "dns": "^0.2.2",
"dotenv": "^8.2.0",
"next": "latest",
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
- "license": "ISC"
+ "license": "MIT"
}
diff --git a/examples/next-js/pages/index.js b/examples/supabase-chat-room/pages/index.js
similarity index 100%
rename from examples/next-js/pages/index.js
rename to examples/supabase-chat-room/pages/index.js