generated from uw-ssec/project-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/manage_resource_view
- Loading branch information
Showing
71 changed files
with
12,552 additions
and
2,716 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Runs the dev server with server code that's in the main branch | ||
name: Run Dev Server | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
env: | ||
AWS_REGION : "us-west-2" | ||
# permission can be added at job level or workflow level | ||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
contents: read # This is required for actions/checkout | ||
jobs: | ||
start-dev-server: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git clone the repository | ||
uses: actions/checkout@v4 | ||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 | ||
with: | ||
role-to-assume: arn:aws:iam::871683513797:role/supportsphere-laurelhurst-github-scaling-role | ||
role-session-name: github-workflow-run | ||
aws-region: ${{ env.AWS_REGION }} | ||
- name: Run the server | ||
run: | | ||
pip3 install boto3 | ||
python3 ./scripts/run-cloud-server.py --scale-up --github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-24.04 | ||
tools: | ||
python: "3" | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
|
||
mkdocs: | ||
configuration: mkdocs.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,7 @@ auth: | |
GOTRUE_SMTP_SENDER_NAME: "[email protected]" | ||
GOTRUE_HOOK_CUSTOM_ACCESS_TOKEN_ENABLED: "true" | ||
GOTRUE_HOOK_CUSTOM_ACCESS_TOKEN_URI: "pg-functions://postgres/public/custom_access_token" | ||
GOTRUE_SMS_AUTOCONFIRM: "true" | ||
|
||
rest: | ||
imagePullSecrets: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# **Deployment Configurations** | ||
|
||
This directory contains the configurations for deploying the application to a Kubernetes cluster. | ||
|
||
## **Prerequisites** | ||
|
||
- [minikube](https://minikube.sigs.k8s.io/docs/start/) | ||
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) | ||
- [helm](https://helm.sh/docs/intro/install/) | ||
|
||
## **Development** | ||
|
||
To deploy the supabase backend to a local minikube cluster, run the following commands: | ||
|
||
1. Start minikube cluster | ||
```bash | ||
minikube start | ||
``` | ||
2. Enable minikube ingress add-on | ||
```bash | ||
minikube addons enable ingress | ||
``` | ||
3. Deploy the application with helm | ||
```bash | ||
helm install supabase -f values.dev.yaml ../vendors/supabase-kubernetes/charts/supabase | ||
``` | ||
*Note: Once the deployment is complete, you can run `kubectl get pods` and see the following: | ||
```console | ||
NAME READY STATUS RESTARTS AGE | ||
supabase-supabase-analytics-749769b6c5-9fwrx 1/1 Running 0 30s | ||
supabase-supabase-auth-58c84557cf-57vv7 1/1 Running 0 30s | ||
supabase-supabase-db-5f485f8477-njfbv 1/1 Running 0 30s | ||
supabase-supabase-functions-85bf447d8f-lj2mk 1/1 Running 0 30s | ||
supabase-supabase-imgproxy-86d846cdc4-krplc 1/1 Running 0 30s | ||
supabase-supabase-kong-7f9f5d7c8c-tlcz2 1/1 Running 0 30s | ||
supabase-supabase-meta-7667c48649-dlsxm 1/1 Running 0 30s | ||
supabase-supabase-realtime-5bf9b784f6-4vxm7 1/1 Running 0 30s | ||
supabase-supabase-rest-7f5d6d786-6vc5w 1/1 Running 0 30s | ||
supabase-supabase-storage-5dfc87696c-hrmpw 1/1 Running 0 30s | ||
supabase-supabase-studio-7fb5c6954-g9qcx 1/1 Running 0 30s | ||
supabase-supabase-vector-57cfc87f9d-pk2vh 1/1 Running 0 30s | ||
``` | ||
4. Tunnel the minikube ingress controller, see [docs](https://minikube.sigs.k8s.io/docs/handbook/accessing/#loadbalancer-access) | ||
for more information. In simple terms, this will allow us to access the services running in the | ||
minikube cluster from our local machine at `127.0.0.1`, a.k.a `localhost`. | ||
**Note: This command will ask for password and block the terminal, so open a new terminal to run other commands.** | ||
```bash | ||
minikube tunnel | ||
``` | ||
5. Everything is set up, now you can access the Supabase Dashboard by going to [http://localhost](http://localhost). | ||
A login form will appear, use the following credentials as shown in the [values.dev.yaml](values.dev.yaml) file: | ||
```yaml | ||
dashboard: | ||
username: supabase | ||
password: this_password_is_insecure_and_should_be_updated | ||
``` | ||
|
||
## **Production** | ||
|
||
There are some infrastructure tools that are needed to run supabase in the server. | ||
|
||
1. **Docker:** Docker will be the underlying platform for running the container applications for the backend. | ||
To install docker in ubuntu, follow the instructions in the [official documentation](https://docs.docker.com/engine/install/ubuntu/). | ||
|
||
**Note: To allow docker to run as non-root user, do `sudo usermod -aG docker ubuntu`** | ||
|
||
2. **k3d:** k3d is a lightweight wrapper to run k3s (A certified lightweight Kubernetes distribution) in docker. It is used to run the kubernetes cluster for the backend. To install k3d, follow the instructions in the [official documentation](https://k3d.io/v5.6.3/#installation). | ||
|
||
3. **kubectl:** kubectl is the command line tool for interacting with the kubernetes cluster. To install kubectl, follow the instructions in the [official documentation](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#install-kubectl-binary-with-curl-on-linux). | ||
|
||
4. **Helm:** Helm is the package manager for kubernetes. To install helm, follow the instructions in the [official documentation](https://helm.sh/docs/intro/install/). | ||
|
||
5. **Stern:** Stern is a tool for tailing multiple pods on kubernetes. To install stern, follow the instructions in the [official documentation](https://github.com/stern/stern?tab=readme-ov-file#installation). | ||
|
||
**Note: Deployment instructions for production will be available in the future.** |
Oops, something went wrong.