mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94ba5e20c6 | ||
|
|
8b82578809 | ||
|
|
64b5b5e1c4 | ||
|
|
04d55ac709 | ||
|
|
135b3684a9 | ||
|
|
c212986fb5 | ||
|
|
dbf86ab283 | ||
|
|
1ad84e7ea3 | ||
|
|
1b75d95be4 | ||
|
|
634c7aaec3 | ||
|
|
799a292471 | ||
|
|
c624ddafb2 | ||
|
|
ce8739181a | ||
|
|
cf177d587c |
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1 +1,2 @@
|
||||
github: crocofied
|
||||
buy_me_a_coffee: corecontrol
|
||||
|
||||
42
Dockerfile
42
Dockerfile
@@ -1,22 +1,22 @@
|
||||
# Builder Stage
|
||||
FROM --platform=$BUILDPLATFORM node:20-alpine AS builder
|
||||
|
||||
ARG TARGETARCH # Wird automatisch von Buildx gesetzt
|
||||
ARG TARGETARCH # Automatically set by Buildx
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN case ${TARGETARCH} in \
|
||||
"amd64") export PRISMA_CLI_BINARY_TARGETS="linux-musl-x64-openssl-3.0.x" ;; \
|
||||
"arm64") export PRISMA_CLI_BINARY_TARGETS="linux-musl-arm64-openssl-3.0.x" ;; \
|
||||
"arm") export PRISMA_CLI_BINARY_TARGETS="linux-musl-arm-openssl-3.0.x" ;; \
|
||||
*) echo "Unsupported ARCH: ${TARGETARCH}" && exit 1 ;; \
|
||||
esac
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
COPY ./prisma ./prisma
|
||||
|
||||
RUN npm install
|
||||
RUN npx prisma generate
|
||||
# Set PRISMA_CLI_BINARY_TARGETS based on TARGETARCH and install dependencies
|
||||
RUN case ${TARGETARCH} in \
|
||||
"amd64") export PRISMA_CLI_BINARY_TARGETS="linux-musl-openssl-3.0.x" ;; \
|
||||
"arm64") export PRISMA_CLI_BINARY_TARGETS="linux-musl-arm64-openssl-3.0.x" ;; \
|
||||
"arm") export PRISMA_CLI_BINARY_TARGETS="linux-musl-arm-openssl-3.0.x" ;; \
|
||||
*) echo "Unsupported ARCH: ${TARGETARCH}" && exit 1 ;; \
|
||||
esac && \
|
||||
npm install && \
|
||||
npx prisma generate
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
@@ -27,8 +27,8 @@ FROM --platform=$TARGETPLATFORM node:20-alpine AS production
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
ENV PRISMA_CLI_BINARY_TARGETS="linux-musl-arm64-openssl-3.0.x"
|
||||
|
||||
# Copy built assets and dependencies from builder
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
COPY --from=builder /app/.next ./.next
|
||||
@@ -36,16 +36,18 @@ COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
COPY --from=builder /app/next.config.js* ./
|
||||
|
||||
# Prune dev dependencies
|
||||
RUN npm prune --production
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["sh", "-c", "npx prisma migrate deploy && npm start"]
|
||||
|
||||
|
||||
# - - BUILD COMMAND - -
|
||||
# docker buildx build \
|
||||
# --platform linux/amd64,linux/arm64,linux/arm/v7 \
|
||||
# -t haedlessdev/corecontrol:1.0.0 \
|
||||
# -t haedlessdev/corecontrol:latest \
|
||||
# --push \
|
||||
# .
|
||||
# Dynamically set PRISMA_CLI_BINARY_TARGETS based on runtime architecture and start
|
||||
CMD ["sh", "-c", "\
|
||||
export PRISMA_CLI_BINARY_TARGETS=$(case $(uname -m) in \
|
||||
x86_64) echo linux-musl-openssl-3.0.x ;; \
|
||||
aarch64) echo linux-musl-arm64-openssl-3.0.x ;; \
|
||||
armv7l) echo linux-musl-arm-openssl-3.0.x ;; \
|
||||
*) echo \"Unsupported architecture: $(uname -m)\" && exit 1 ;; \
|
||||
esac) && \
|
||||
npx prisma migrate deploy && \
|
||||
npm start"]
|
||||
@@ -7,6 +7,7 @@
|
||||
The only dashboard you'll ever need to manage your entire server infrastructure. Keep all your server data organized in one central place, easily add your self-hosted applications with quick access links, and monitor their availability in real-time with built-in uptime tracking. Designed for simplicity and control, it gives you a clear overview of your entire self-hosted setup at a glance.
|
||||
|
||||
[](https://www.buymeacoffee.com/corecontrol)
|
||||
[](https://github.com/sponsors/crocofied)
|
||||
|
||||
## Features
|
||||
|
||||
@@ -96,7 +97,7 @@ __Password:__ admin
|
||||
|
||||
The application is build with:
|
||||
- Next.js & Typescript
|
||||
- Go (for the agent)
|
||||
- Go (used for the agent)
|
||||
- Tailwindcss with [shadcn](shadcn.com)
|
||||
- PostgreSQL with [Prisma ORM](https://www.prisma.io/)
|
||||
- Icons by [Lucide](https://lucide.dev/)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NextResponse, NextRequest } from "next/server";
|
||||
import jwt from 'jsonwebtoken';
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import bcrypt from 'bcrypt';
|
||||
import bcrypt from 'bcryptjs';
|
||||
|
||||
interface EditEmailRequest {
|
||||
oldPassword: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NextResponse, NextRequest } from "next/server";
|
||||
import jwt from 'jsonwebtoken';
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import bcrypt from 'bcrypt';
|
||||
import bcrypt from 'bcryptjs';
|
||||
|
||||
interface LoginRequest {
|
||||
username: string;
|
||||
|
||||
@@ -350,6 +350,7 @@
|
||||
"Type": "Typ",
|
||||
"SMTP": {
|
||||
"Title": "SMTP",
|
||||
"Description": "Sende Benachrichtigungen via SMTP",
|
||||
"Host": "SMTP-Host",
|
||||
"Port": "SMTP-Port",
|
||||
"Secure": "Sichere Verbindung (TLS/SSL)",
|
||||
@@ -360,31 +361,37 @@
|
||||
},
|
||||
"Telegram": {
|
||||
"Title": "Telegram",
|
||||
"Description": "Sende Benachrichtigungen via Telegram",
|
||||
"Token": "Bot-Token",
|
||||
"ChatId": "Chat-ID"
|
||||
},
|
||||
"Discord": {
|
||||
"Title": "Discord",
|
||||
"Description": "Sende Benachrichtigungen via Discord",
|
||||
"Webhook": "Webhook-URL"
|
||||
},
|
||||
"Gotify": {
|
||||
"Title": "Gotify",
|
||||
"Description": "Sende Benachrichtigungen via Gotify",
|
||||
"Url": "Gotify-URL",
|
||||
"Token": "Gotify-Token"
|
||||
},
|
||||
"Ntfy": {
|
||||
"Title": "Ntfy",
|
||||
"Description": "Sende Benachrichtigungen via Ntfy",
|
||||
"Url": "Ntfy-URL",
|
||||
"Token": "Ntfy-Token"
|
||||
},
|
||||
"Pushover": {
|
||||
"Title": "Pushover",
|
||||
"Description": "Sende Benachrichtigungen via Pushover",
|
||||
"Url": "Pushover-URL",
|
||||
"Token": "Pushover-Token",
|
||||
"User": "Pushover-Benutzer"
|
||||
},
|
||||
"Echobell": {
|
||||
"Title": "Echobell",
|
||||
"Description": "Sende Benachrichtigungen via Echobell",
|
||||
"Url": "Echobell-URL",
|
||||
"AddMessage": "Füge in Echobell den \"message\" Feld hinzu."
|
||||
}
|
||||
|
||||
@@ -350,6 +350,7 @@
|
||||
"Type": "Notification Type",
|
||||
"SMTP": {
|
||||
"Title": "SMTP",
|
||||
"Description": "Send notifications via SMTP",
|
||||
"Host": "SMTP Host",
|
||||
"Port": "SMTP Port",
|
||||
"Secure": "Secure Connection (TLS/SSL)",
|
||||
@@ -360,31 +361,37 @@
|
||||
},
|
||||
"Telegram": {
|
||||
"Title": "Telegram",
|
||||
"Description": "Send notifications via Telegram",
|
||||
"Token": "Bot Token",
|
||||
"ChatId": "Chat ID"
|
||||
},
|
||||
"Discord": {
|
||||
"Title": "Discord",
|
||||
"Description": "Send notifications via Discord",
|
||||
"Webhook": "Webhook URL"
|
||||
},
|
||||
"Gotify": {
|
||||
"Title": "Gotify",
|
||||
"Description": "Send notifications via Gotify",
|
||||
"Url": "Gotify URL",
|
||||
"Token": "Gotify Token"
|
||||
},
|
||||
"Ntfy": {
|
||||
"Title": "Ntfy",
|
||||
"Description": "Send notifications via Ntfy",
|
||||
"Url": "Ntfy URL",
|
||||
"Token": "Ntfy Token"
|
||||
},
|
||||
"Pushover": {
|
||||
"Title": "Pushover",
|
||||
"Description": "Send notifications via Pushover",
|
||||
"Url": "Pushover URL",
|
||||
"Token": "Pushover Token",
|
||||
"User": "Pushover User"
|
||||
},
|
||||
"Echobell": {
|
||||
"Title": "Echobell",
|
||||
"Description": "Send notifications via Echobell",
|
||||
"Url": "Echobell URL",
|
||||
"AddMessage": "Add in Echobell the \"message\" field."
|
||||
}
|
||||
|
||||
82
package-lock.json
generated
82
package-lock.json
generated
@@ -31,6 +31,7 @@
|
||||
"@xyflow/react": "^12.5.5",
|
||||
"axios": "^1.8.4",
|
||||
"bcrypt": "^5.1.1",
|
||||
"bcryptjs": "^3.0.2",
|
||||
"chart.js": "^4.4.9",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
@@ -50,12 +51,13 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@types/bcryptjs": "^2.4.6",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"postcss": "^8.5.3",
|
||||
"prisma": "^6.6.0",
|
||||
"prisma": "^6.7.0",
|
||||
"tailwindcss": "^4.1.4",
|
||||
"tsx": "^4.19.3",
|
||||
"typescript": "^5"
|
||||
@@ -1174,9 +1176,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@prisma/config": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/config/-/config-6.6.0.tgz",
|
||||
"integrity": "sha512-d8FlXRHsx72RbN8nA2QCRORNv5AcUnPXgtPvwhXmYkQSMF/j9cKaJg+9VcUzBRXGy9QBckNzEQDEJZdEOZ+ubA==",
|
||||
"version": "6.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/config/-/config-6.7.0.tgz",
|
||||
"integrity": "sha512-di8QDdvSz7DLUi3OOcCHSwxRNeW7jtGRUD2+Z3SdNE3A+pPiNT8WgUJoUyOwJmUr5t+JA2W15P78C/N+8RXrOA==",
|
||||
"devOptional": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
@@ -1185,30 +1187,30 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@prisma/debug": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.6.0.tgz",
|
||||
"integrity": "sha512-DL6n4IKlW5k2LEXzpN60SQ1kP/F6fqaCgU/McgaYsxSf43GZ8lwtmXLke9efS+L1uGmrhtBUP4npV/QKF8s2ZQ==",
|
||||
"version": "6.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.7.0.tgz",
|
||||
"integrity": "sha512-RabHn9emKoYFsv99RLxvfG2GHzWk2ZI1BuVzqYtmMSIcuGboHY5uFt3Q3boOREM9de6z5s3bQoyKeWnq8Fz22w==",
|
||||
"devOptional": true,
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/@prisma/engines": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.6.0.tgz",
|
||||
"integrity": "sha512-nC0IV4NHh7500cozD1fBoTwTD1ydJERndreIjpZr/S3mno3P6tm8qnXmIND5SwUkibNeSJMpgl4gAnlqJ/gVlg==",
|
||||
"version": "6.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.7.0.tgz",
|
||||
"integrity": "sha512-3wDMesnOxPrOsq++e5oKV9LmIiEazFTRFZrlULDQ8fxdub5w4NgRBoxtWbvXmj2nJVCnzuz6eFix3OhIqsZ1jw==",
|
||||
"devOptional": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@prisma/debug": "6.6.0",
|
||||
"@prisma/engines-version": "6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a",
|
||||
"@prisma/fetch-engine": "6.6.0",
|
||||
"@prisma/get-platform": "6.6.0"
|
||||
"@prisma/debug": "6.7.0",
|
||||
"@prisma/engines-version": "6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed",
|
||||
"@prisma/fetch-engine": "6.7.0",
|
||||
"@prisma/get-platform": "6.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@prisma/engines-version": {
|
||||
"version": "6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a.tgz",
|
||||
"integrity": "sha512-JzRaQ5Em1fuEcbR3nUsMNYaIYrOT1iMheenjCvzZblJcjv/3JIuxXN7RCNT5i6lRkLodW5ojCGhR7n5yvnNKrw==",
|
||||
"version": "6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed.tgz",
|
||||
"integrity": "sha512-EvpOFEWf1KkJpDsBCrih0kg3HdHuaCnXmMn7XFPObpFTzagK1N0Q0FMnYPsEhvARfANP5Ok11QyoTIRA2hgJTA==",
|
||||
"devOptional": true,
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
@@ -1224,25 +1226,25 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@prisma/fetch-engine": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.6.0.tgz",
|
||||
"integrity": "sha512-Ohfo8gKp05LFLZaBlPUApM0M7k43a0jmo86YY35u1/4t+vuQH9mRGU7jGwVzGFY3v+9edeb/cowb1oG4buM1yw==",
|
||||
"version": "6.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.7.0.tgz",
|
||||
"integrity": "sha512-zLlAGnrkmioPKJR4Yf7NfW3hftcvqeNNEHleMZK9yX7RZSkhmxacAYyfGsCcqRt47jiZ7RKdgE0Wh2fWnm7WsQ==",
|
||||
"devOptional": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@prisma/debug": "6.6.0",
|
||||
"@prisma/engines-version": "6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a",
|
||||
"@prisma/get-platform": "6.6.0"
|
||||
"@prisma/debug": "6.7.0",
|
||||
"@prisma/engines-version": "6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed",
|
||||
"@prisma/get-platform": "6.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@prisma/get-platform": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.6.0.tgz",
|
||||
"integrity": "sha512-3qCwmnT4Jh5WCGUrkWcc6VZaw0JY7eWN175/pcb5Z6FiLZZ3ygY93UX0WuV41bG51a6JN/oBH0uywJ90Y+V5eA==",
|
||||
"version": "6.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.7.0.tgz",
|
||||
"integrity": "sha512-i9IH5lO4fQwnMLvQLYNdgVh9TK3PuWBfQd7QLk/YurnAIg+VeADcZDbmhAi4XBBDD+hDif9hrKyASu0hbjwabw==",
|
||||
"devOptional": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@prisma/debug": "6.6.0"
|
||||
"@prisma/debug": "6.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@radix-ui/number": {
|
||||
@@ -2476,6 +2478,13 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/bcryptjs": {
|
||||
"version": "2.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.6.tgz",
|
||||
"integrity": "sha512-9xlo6R2qDs5uixm0bcIqCeMCE6HiQsIyel9KQySStiyqNl2tnj2mP3DX1Nf56MD6KMenNNlBBsy3LJ7gUEQPXQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/d3-color": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz",
|
||||
@@ -2746,6 +2755,15 @@
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bcryptjs": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-3.0.2.tgz",
|
||||
"integrity": "sha512-k38b3XOZKv60C4E2hVsXTolJWfkGRMbILBIe2IBITXciy5bOsTKot5kDrf3ZfufQtQOUN5mXceUEpU1rTl9Uog==",
|
||||
"license": "BSD-3-Clause",
|
||||
"bin": {
|
||||
"bcrypt": "bin/bcrypt"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
@@ -4577,15 +4595,15 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/prisma": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/prisma/-/prisma-6.6.0.tgz",
|
||||
"integrity": "sha512-SYCUykz+1cnl6Ugd8VUvtTQq5+j1Q7C0CtzKPjQ8JyA2ALh0EEJkMCS+KgdnvKW1lrxjtjCyJSHOOT236mENYg==",
|
||||
"version": "6.7.0",
|
||||
"resolved": "https://registry.npmjs.org/prisma/-/prisma-6.7.0.tgz",
|
||||
"integrity": "sha512-vArg+4UqnQ13CVhc2WUosemwh6hr6cr6FY2uzDvCIFwH8pu8BXVv38PktoMLVjtX7sbYThxbnZF5YiR8sN2clw==",
|
||||
"devOptional": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@prisma/config": "6.6.0",
|
||||
"@prisma/engines": "6.6.0"
|
||||
"@prisma/config": "6.7.0",
|
||||
"@prisma/engines": "6.7.0"
|
||||
},
|
||||
"bin": {
|
||||
"prisma": "build/index.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "corecontrol",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev --turbopack",
|
||||
@@ -32,6 +32,7 @@
|
||||
"@xyflow/react": "^12.5.5",
|
||||
"axios": "^1.8.4",
|
||||
"bcrypt": "^5.1.1",
|
||||
"bcryptjs": "^3.0.2",
|
||||
"chart.js": "^4.4.9",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
@@ -51,12 +52,13 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@types/bcryptjs": "^2.4.6",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"postcss": "^8.5.3",
|
||||
"prisma": "^6.6.0",
|
||||
"prisma": "^6.7.0",
|
||||
"tailwindcss": "^4.1.4",
|
||||
"tsx": "^4.19.3",
|
||||
"typescript": "^5"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
binaryTargets = ["native", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
|
||||
}
|
||||
|
||||
datasource db {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 83 KiB |
Reference in New Issue
Block a user