Moving to new layRemoving the build until it is ready

This commit is contained in:
Paul Copplestone committed 2020-01-13 15:36:57 +08:00
1 parent f1ca81f18c
commit bb9be0b112
20 files changed
+13 -406

No files matched your search

-28
View File
@@ -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
+11
View File
@@ -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
```
-3
View File
@@ -1,3 +0,0 @@
# App
@todo
-52
View File
@@ -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
-70
View File
@@ -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
-19
View File
@@ -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)"
-4
View File
@@ -1,4 +0,0 @@
#!/bin/bash
exec postgrest /etc/postgrest.conf &
/prod/rel/realtime/bin/realtime start &
-11
View File
@@ -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
-85
View File
@@ -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
-3
View File
@@ -1,3 +0,0 @@
FROM supabase/packaged
ADD ./mnt /docker-entrypoint-initdb.d/
-8
View File
@@ -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;
-53
View File
@@ -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
\.
-30
View File
@@ -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"
-25
View File
@@ -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*
-12
View File
@@ -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" ]
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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"
}
File renamed without changes.