feat: use dynamic DATABASE_URL for Prisma db
This commit is contained in:
parent
d1fd2d466a
commit
33fb9703f7
3 changed files with 11 additions and 9 deletions
|
|
@ -4,8 +4,8 @@
|
||||||
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
|
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
|
||||||
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
|
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
|
||||||
|
|
||||||
# Enable to use different location for dev db file
|
# Change to use different location for dev db file
|
||||||
# DATABASE_URL="file:./dev.db"
|
DATABASE_URL="file:$HOME/.nsecbunker-config/nsecbunker.db"
|
||||||
|
|
||||||
# Add your admin Nostr npub
|
# Add your admin Nostr npub
|
||||||
# ADMIN_NPUBS=npub1q2s369...
|
# ADMIN_NPUBS=npub1q2s369...
|
||||||
|
|
|
||||||
12
README.md
12
README.md
|
|
@ -7,13 +7,15 @@ To quickly install `nsecbunkerd` via Docker just run:
|
||||||
|
|
||||||
### Configurations
|
### Configurations
|
||||||
|
|
||||||
Prepare your config directory
|
- Prepare your config directory
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mkdir $HOME/.nsecbunker-config
|
||||||
|
```
|
||||||
|
|
||||||
```shell
|
- Clone `.env.example` and add your nostr public key to `ADMIN_NPUBS` to the `.env` file.
|
||||||
mkdir $HOME/.nsecbunker-config
|
|
||||||
```
|
|
||||||
|
|
||||||
Clone `.env.example` and add your nostr public key to `ADMIN_NPUBS` to the `.env` file.
|
- Change `DATABASE_URL` if necessary.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client-js"
|
||||||
binaryTargets = ["native", "linux-musl-arm64-openssl-3.0.x"]
|
binaryTargets = ["native", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
provider = "sqlite"
|
provider = "sqlite"
|
||||||
url = "file:../config/nsecbunker.db"
|
url = env("DATABASE_URL")
|
||||||
}
|
}
|
||||||
|
|
||||||
model Request {
|
model Request {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue