https://github.com/hardyscc/messenger-clone
https://github.com/hardyscc/messenger-clone
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hardyscc/messenger-clone
- Owner: hardyscc
- Created: 2023-05-07T14:37:56.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-21T13:15:03.000Z (over 1 year ago)
- Last Synced: 2025-03-03T14:11:50.147Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 184 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Deploy on Microk8s
```sh
docker build --build-arg http_proxy --build-arg https_proxy --push -t hacdescm/messenger-clone .
helmfile apply
```
## Generate shadow database and migration script
```sh
brew install postgresql@15
brew service start postgresql@15
export DATABASE_URL="postgresql://$USER@localhost:5432/messenger"
npx prisma migrate dev --name init
```
## Reset shadow database from migration script
```sh
export DATABASE_URL="postgresql://$USER@localhost:5432/messenger"
npx prisma migrate reset
```
## Create production database
```sh
create user "messenger-user" with encrypted password 'User12345';
create database "messenger" with owner "messenger-user";
```
## Initialize production database
```sh
# port forward production database to localhost
export DATABASE_URL="postgresql://messenger-user:User12345@localhost:5432/messenger"
npx prisma migrate deploy
```