mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-03-21 16:53:26 +01:00
Fix database path and prisma.config
This commit is contained in:
@@ -75,6 +75,7 @@ WORKDIR /opt/app/backend
|
||||
COPY --from=backend-builder /opt/app/backend/node_modules ./node_modules
|
||||
COPY --from=backend-builder /opt/app/backend/dist ./dist
|
||||
COPY --from=backend-builder /opt/app/backend/prisma ./prisma
|
||||
COPY --from=backend-builder /opt/app/backend/prisma.config.ts ./prisma.config.ts
|
||||
COPY --from=backend-builder /opt/app/backend/package.json ./
|
||||
COPY --from=backend-builder /opt/app/backend/tsconfig.json ./
|
||||
|
||||
|
||||
@@ -2,10 +2,13 @@ import "dotenv/config";
|
||||
import { defineConfig } from "prisma/config";
|
||||
|
||||
const DATABASE_URL =
|
||||
process.env.DATABASE_URL || "file:../data/swiss-datashare.db?connection_limit=1";
|
||||
process.env.DATABASE_URL || "file:./data/swiss-datashare.db";
|
||||
|
||||
export default defineConfig({
|
||||
schema: "prisma/schema.prisma",
|
||||
migrations: {
|
||||
seed: "ts-node prisma/seed/config.seed.ts",
|
||||
},
|
||||
datasource: {
|
||||
url: DATABASE_URL,
|
||||
},
|
||||
|
||||
@@ -1 +1 @@
|
||||
DATABASE_URL="file:../data/swiss-datashare.db?connection_limit=1"
|
||||
DATABASE_URL="file:./data/swiss-datashare.db"
|
||||
|
||||
@@ -431,7 +431,7 @@ const prisma = new PrismaClient({
|
||||
adapter: new PrismaBetterSqlite3({
|
||||
url:
|
||||
process.env.DATABASE_URL ||
|
||||
"file:../data/swiss-datashare.db?connection_limit=1",
|
||||
"file:./data/swiss-datashare.db",
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export const DATA_DIRECTORY = process.env.DATA_DIRECTORY || "./data";
|
||||
export const SHARE_DIRECTORY = `${DATA_DIRECTORY}/uploads/shares`;
|
||||
export const DATABASE_URL =
|
||||
process.env.DATABASE_URL ||
|
||||
"file:../data/swiss-datashare.db?connection_limit=1";
|
||||
"file:./data/swiss-datashare.db";
|
||||
export const CLAMAV_HOST =
|
||||
process.env.CLAMAV_HOST ||
|
||||
(process.env.NODE_ENV == "docker" ? "clamav" : "127.0.0.1");
|
||||
|
||||
@@ -31,7 +31,7 @@ For installation specific configuration, you can use environment variables. The
|
||||
| Variable | Default Value | Description |
|
||||
| ---------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| `BACKEND_PORT` | `8080` | The port on which the backend listens. |
|
||||
| `DATABASE_URL` | `file:../data/swiss-datashare.db?connection_limit=1` | The URL of the SQLite database. |
|
||||
| `DATABASE_URL` | `file:./data/swiss-datashare.db` | The URL of the SQLite database. |
|
||||
| `DATA_DIRECTORY` | `./data` | The directory where data is stored. |
|
||||
| `CONFIG_FILE` | `../config.yaml` | Path to the configuration file |
|
||||
| `CLAMAV_HOST` | `127.0.0.1` or `clamav` when running with Docker/Podman | The IP address of the ClamAV server. See the [ClamAV docs](integrations.md#clamav) for more information. |
|
||||
|
||||
Reference in New Issue
Block a user