Fix build error: add .dockerignore and remove scratch files

This commit is contained in:
AyrisAI
2026-05-14 18:54:16 +03:00
parent a0fcc90d31
commit b3ef5195c5
8 changed files with 10 additions and 119 deletions

10
.dockerignore Normal file
View File

@@ -0,0 +1,10 @@
node_modules
.next
.git
.npm
scratch
Dockerfile
.env
.env.local
*.db
*.db-journal

View File

@@ -1,18 +0,0 @@
0 verbose cli /opt/homebrew/Cellar/node@22/22.22.2/bin/node /opt/homebrew/Cellar/node@22/22.22.2/lib/node_modules/npm/bin/npm-cli.js
1 info using npm@10.9.7
2 info using node@v22.22.2
3 silly config load:file:/opt/homebrew/Cellar/node@22/22.22.2/lib/node_modules/npm/npmrc
4 silly config load:file:/Users/ayrisdev/Github/mailserver/.npmrc
5 silly config load:file:/opt/homebrew/etc/npmrc
6 verbose title npm exec prisma migrate dev --name add_notification_logs
7 verbose argv "exec" "--" "prisma" "migrate" "dev" "--name" "add_notification_logs"
8 verbose logfile logs-max:10 dir:/Users/ayrisdev/Github/mailserver/.npm/_logs/2026-05-14T13_30_23_576Z-
9 verbose logfile /Users/ayrisdev/Github/mailserver/.npm/_logs/2026-05-14T13_30_23_576Z-debug-0.log
10 silly logfile done cleaning log files
11 http fetch GET https://registry.npmjs.org/npm attempt 1 failed with ENOTFOUND
12 verbose cwd /Users/ayrisdev/Github/mailserver
13 verbose os Darwin 24.6.0
14 verbose node v22.22.2
15 verbose npm v10.9.7
16 verbose exit 1
17 verbose code 1

View File

@@ -1,17 +0,0 @@
0 verbose cli /opt/homebrew/Cellar/node@22/22.22.2/bin/node /opt/homebrew/Cellar/node@22/22.22.2/lib/node_modules/npm/bin/npm-cli.js
1 info using npm@10.9.7
2 info using node@v22.22.2
3 silly config load:file:/opt/homebrew/Cellar/node@22/22.22.2/lib/node_modules/npm/npmrc
4 silly config load:file:/Users/ayrisdev/Github/mailserver/.npmrc
5 silly config load:file:/opt/homebrew/etc/npmrc
6 verbose title npm exec prisma migrate dev --name add_notification_logs
7 verbose argv "exec" "--" "prisma" "migrate" "dev" "--name" "add_notification_logs"
8 verbose logfile logs-max:10 dir:/Users/ayrisdev/Github/mailserver/.npm/_logs/2026-05-14T13_30_35_429Z-
9 verbose logfile /Users/ayrisdev/Github/mailserver/.npm/_logs/2026-05-14T13_30_35_429Z-debug-0.log
10 silly logfile done cleaning log files
11 verbose cwd /Users/ayrisdev/Github/mailserver
12 verbose os Darwin 24.6.0
13 verbose node v22.22.2
14 verbose npm v10.9.7
15 verbose exit 1
16 verbose code 1

View File

@@ -1,17 +0,0 @@
0 verbose cli /opt/homebrew/Cellar/node@22/22.22.2/bin/node /opt/homebrew/Cellar/node@22/22.22.2/lib/node_modules/npm/bin/npm-cli.js
1 info using npm@10.9.7
2 info using node@v22.22.2
3 silly config load:file:/opt/homebrew/Cellar/node@22/22.22.2/lib/node_modules/npm/npmrc
4 silly config load:file:/Users/ayrisdev/Github/mailserver/.npmrc
5 silly config load:file:/opt/homebrew/etc/npmrc
6 verbose title npm exec prisma db push
7 verbose argv "exec" "--" "prisma" "db" "push"
8 verbose logfile logs-max:10 dir:/Users/ayrisdev/Github/mailserver/.npm/_logs/2026-05-14T13_31_06_094Z-
9 verbose logfile /Users/ayrisdev/Github/mailserver/.npm/_logs/2026-05-14T13_31_06_094Z-debug-0.log
10 silly logfile done cleaning log files
11 verbose cwd /Users/ayrisdev/Github/mailserver
12 verbose os Darwin 24.6.0
13 verbose node v22.22.2
14 verbose npm v10.9.7
15 verbose exit 1
16 verbose code 1

View File

@@ -1,17 +0,0 @@
0 verbose cli /opt/homebrew/Cellar/node@22/22.22.2/bin/node /opt/homebrew/Cellar/node@22/22.22.2/lib/node_modules/npm/bin/npm-cli.js
1 info using npm@10.9.7
2 info using node@v22.22.2
3 silly config load:file:/opt/homebrew/Cellar/node@22/22.22.2/lib/node_modules/npm/npmrc
4 silly config load:file:/Users/ayrisdev/Github/mailserver/.npmrc
5 silly config load:file:/opt/homebrew/etc/npmrc
6 verbose title npm exec tsx scratch/check_logs.ts
7 verbose argv "exec" "--" "tsx" "scratch/check_logs.ts"
8 verbose logfile logs-max:10 dir:/Users/ayrisdev/Github/mailserver/.npm/_logs/2026-05-14T13_56_06_958Z-
9 verbose logfile /Users/ayrisdev/Github/mailserver/.npm/_logs/2026-05-14T13_56_06_958Z-debug-0.log
10 silly logfile done cleaning log files
11 verbose cwd /Users/ayrisdev/Github/mailserver
12 verbose os Darwin 24.6.0
13 verbose node v22.22.2
14 verbose npm v10.9.7
15 verbose exit 1
16 verbose code 1

View File

@@ -1,30 +0,0 @@
import { prisma } from "../lib/prisma";
async function checkDb() {
try {
console.log("--- Notification Logs ---");
const nLogs = await prisma.notificationLog.findMany({
orderBy: { createdAt: 'desc' },
take: 5
});
console.log(JSON.stringify(nLogs, null, 2));
console.log("\n--- System Logs ---");
const sLogs = await prisma.systemLog.findMany({
orderBy: { createdAt: 'desc' },
take: 5
});
console.log(JSON.stringify(sLogs, null, 2));
console.log("\n--- Mailbox Mappings ---");
const mappings = await prisma.mailboxMapping.findMany();
console.log(JSON.stringify(mappings, null, 2));
} catch (error) {
console.error("DB Check failed:", error);
} finally {
await prisma.$disconnect();
}
}
checkDb();

View File

@@ -1,20 +0,0 @@
import { Client } from 'pg';
import 'dotenv/config';
async function testConnection() {
const connectionString = process.env.DATABASE_URL;
const client = new Client({ connectionString });
try {
console.log("Connecting to:", connectionString?.split('@')[1]);
await client.connect();
console.log("Connected successfully!");
const res = await client.query('SELECT NOW()');
console.log("Current time from DB:", res.rows[0]);
await client.end();
} catch (err) {
console.error("Connection error:", err.message);
}
}
testConnection();