Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Task/move prisma.config.ts to .config/prisma.ts (#5821)

Harsh Santwani852ed98d0fbd
diff --git a/.config/prisma.ts b/.config/prisma.ts
new file mode 100644
index 0000000000..64691136cb
--- /dev/null
+++ b/.config/prisma.ts
@@ -0,0 +1,14 @@
+import { defineConfig } from '@prisma/config';
+import { config } from 'dotenv';
+import { expand } from 'dotenv-expand';
+import { join } from 'node:path';
+
+expand(config({ quiet: true }));
+
+export default defineConfig({
+ migrations: {
+ path: join(__dirname, '..', 'prisma', 'migrations'),
+ seed: `node ${join(__dirname, '..', 'prisma', 'seed.mts')}`
+ },
+ schema: join(__dirname, '..', 'prisma', 'schema.prisma')
+});
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 70dc9ae170..d46c1d3c12 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Localized the number formatting in the static portfolio analysis rule: _Liquidity_ (Buying Power)
+- Moved the _Prisma Configuration File_ from `prisma.config.ts` to `.config/prisma.ts`
- Upgraded `prisma` from version `6.17.1` to `6.18.0`
## 2.210.1 - 2025-10-22
diff --git a/Dockerfile b/Dockerfile
index be1bb53ea0..5beaf6e032 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,11 +13,11 @@ RUN apt-get update && apt-get install -y --no-install-suggests \
# Only add basic files without the application itself to avoid rebuilding
# layers when files (package.json etc.) have not changed
+COPY ./.config .config/
COPY ./CHANGELOG.md CHANGELOG.md
COPY ./LICENSE LICENSE
COPY ./package.json package.json
COPY ./package-lock.json package-lock.json
-COPY ./prisma.config.ts prisma.config.ts
COPY ./prisma/schema.prisma prisma/
RUN npm install
@@ -44,7 +44,7 @@ WORKDIR /ghostfolio/dist/apps/api
COPY ./package-lock.json /ghostfolio/dist/apps/api/
RUN npm install
-COPY prisma.config.ts /ghostfolio/dist/apps/api/
+COPY .config /ghostfolio/dist/apps/api/.config/
COPY prisma /ghostfolio/dist/apps/api/prisma/
# Overwrite the generated package.json with the original one to ensure having
diff --git a/apps/api/src/dependencies.ts b/apps/api/src/dependencies.ts
index cd5409fd41..acb7af3826 100644
--- a/apps/api/src/dependencies.ts
+++ b/apps/api/src/dependencies.ts
@@ -1,3 +1,3 @@
-// Dependencies required by prisma.config.ts in Docker container
+// Dependencies required by .config/prisma.ts in Docker container
import 'dotenv';
import 'dotenv-expand';
diff --git a/prisma.config.ts b/prisma.config.ts
deleted file mode 100644
index 60597cbf12..0000000000
--- a/prisma.config.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { config } from 'dotenv';
-import { expand } from 'dotenv-expand';
-import { join } from 'node:path';
-import { defineConfig } from 'prisma/config';
-
-expand(config({ quiet: true }));
-
-export default defineConfig({
- migrations: {
- path: join('prisma', 'migrations'),
- seed: `node ${join('prisma', 'seed.mts')}`
- },
- schema: join('prisma', 'schema.prisma')
-});