mirror of
https://github.com/kind-0/nsecbunkerd.git
synced 2025-03-17 13:22:54 +01:00
feat: use dynamic DATABASE_URL for Prisma db
This commit is contained in:
parent
d1fd2d466a
commit
33fb9703f7
@ -4,8 +4,8 @@
|
||||
# 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
|
||||
|
||||
# Enable to use different location for dev db file
|
||||
# DATABASE_URL="file:./dev.db"
|
||||
# Change to use different location for dev db file
|
||||
DATABASE_URL="file:$HOME/.nsecbunker-config/nsecbunker.db"
|
||||
|
||||
# Add your admin Nostr npub
|
||||
# ADMIN_NPUBS=npub1q2s369...
|
||||
|
@ -7,13 +7,15 @@ To quickly install `nsecbunkerd` via Docker just run:
|
||||
|
||||
### Configurations
|
||||
|
||||
Prepare your config directory
|
||||
- Prepare your config directory
|
||||
|
||||
```shell
|
||||
mkdir $HOME/.nsecbunker-config
|
||||
```
|
||||
|
||||
Clone `.env.example` and add your nostr public key to `ADMIN_NPUBS` to the `.env` file.
|
||||
- Clone `.env.example` and add your nostr public key to `ADMIN_NPUBS` to the `.env` file.
|
||||
|
||||
- Change `DATABASE_URL` if necessary.
|
||||
|
||||
```shell
|
||||
cp .env.example .env
|
||||
|
@ -1,11 +1,11 @@
|
||||
generator client {
|
||||
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 {
|
||||
provider = "sqlite"
|
||||
url = "file:../config/nsecbunker.db"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Request {
|
||||
|
Loading…
x
Reference in New Issue
Block a user