wipe out old repo & replace with template
This commit is contained in:
43
README.md
43
README.md
@ -1,36 +1,19 @@
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<a href="https://techtracker.gibbyb.com"><img src="https://git.gibbyb.com/gib/Tech_Tracker_Web/raw/branch/master/public/images/tech_tracker_logo.png" alt="Tech Tracker Logo" width="100"></a>
|
||||
<br>
|
||||
<b>Tech Tracker</b>
|
||||
<br>
|
||||
</h1>
|
||||
# T3 Template with Self Hosted Supabase
|
||||
|
||||
# [Find Here](https://techtracker.gibbyb.com/)
|
||||
This is my template for self hosting both Next.js & Supabase in order to create a perfect app!!
|
||||
|
||||
- Application used by COG employees to update their status & location throughout the day.
|
||||
## What to do
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
<h3>How to run:</h3>
|
||||
</summary>
|
||||
|
||||
I'd recommend installing pnpm. Clone the repo, then rename env.example to .env & fill it out.
|
||||
- [Self Host Supabase](https://supabase.com/docs/guides/self-hosting/docker)
|
||||
- You will need to make sure you have some way to connect to the postgres database from the host. I had to remove the database port from the supabase-pooler and add it to the supabase-db in order to directly connect to it. This will be important for generating our types.
|
||||
- Clone this repo.
|
||||
- Go to src/server/db/schema.sql & run this SQL in the SQL editor on the Web UI of your Supabase instance.
|
||||
- Generate your types
|
||||
- This part is potentially super weird if you are self hosting. If you are connecting directly to your database that you plan to use for production, you will need to clone your repo on the host running supabase so that you can then use the supabase cli tool. Once you have done that, you will need to install the supabase-cli tool with sudo. I just run something like `sudo npx supabase --help` and then accept the prompt to install the program. Once you have done this, you can then run the following command, replacing the password and the port to match your supabase database. You can also try running the provided script `./scripts/generate_types`
|
||||
|
||||
```bash
|
||||
mv ./env.example ./.env
|
||||
```
|
||||
|
||||
Run
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
```
|
||||
|
||||
to install all dependencies.
|
||||
|
||||
You can run
|
||||
|
||||
```bash
|
||||
pnpm dev
|
||||
sudo npx supabase gen types typescript \
|
||||
--db-url "postgres://postgres:password@localhost:5432/postgres" \
|
||||
--schema public \
|
||||
> ./src/lib/types
|
||||
```
|
||||
|
Reference in New Issue
Block a user