mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-13 17:05:47 +01:00
🔀 Merge changes from ajnart
This commit is contained in:
@@ -18,6 +18,8 @@ COPY prisma/schema.prisma prisma/schema.prisma
|
|||||||
|
|
||||||
COPY ./scripts/run.sh ./scripts/run.sh
|
COPY ./scripts/run.sh ./scripts/run.sh
|
||||||
|
|
||||||
|
RUN npm i -g prisma
|
||||||
|
|
||||||
EXPOSE 7575
|
EXPOSE 7575
|
||||||
|
|
||||||
ENV PORT 7575
|
ENV PORT 7575
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
"@mantine/notifications": "^6.0.0",
|
"@mantine/notifications": "^6.0.0",
|
||||||
"@mantine/prism": "^6.0.19",
|
"@mantine/prism": "^6.0.19",
|
||||||
"@mantine/tiptap": "^6.0.17",
|
"@mantine/tiptap": "^6.0.17",
|
||||||
"@next-auth/prisma-adapter": "^1.0.5",
|
"@next-auth/prisma-adapter": "^1.0.7",
|
||||||
"@nivo/core": "^0.83.0",
|
"@nivo/core": "^0.83.0",
|
||||||
"@nivo/line": "^0.83.0",
|
"@nivo/line": "^0.83.0",
|
||||||
"@prisma/client": "^5.0.0",
|
"@prisma/client": "^5.0.0",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client-js"
|
||||||
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
|
binaryTargets = ["native", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export NEXTAUTH_URL_INTERNAL="http://$HOSTNAME:7575"
|
|||||||
|
|
||||||
echo "Pushing database changes..."
|
echo "Pushing database changes..."
|
||||||
npm config set update-notifier false
|
npm config set update-notifier false
|
||||||
npx prisma db push --skip-generate
|
prisma db push --skip-generate
|
||||||
|
|
||||||
echo "Starting production server..."
|
echo "Starting production server..."
|
||||||
node /app/server.js
|
node /app/server.js
|
||||||
@@ -4,6 +4,7 @@ import Consola from 'consola';
|
|||||||
import Cookies from 'cookies';
|
import Cookies from 'cookies';
|
||||||
import { type GetServerSidePropsContext, type NextApiRequest, type NextApiResponse } from 'next';
|
import { type GetServerSidePropsContext, type NextApiRequest, type NextApiResponse } from 'next';
|
||||||
import { type DefaultSession, type NextAuthOptions, getServerSession } from 'next-auth';
|
import { type DefaultSession, type NextAuthOptions, getServerSession } from 'next-auth';
|
||||||
|
import { Adapter } from 'next-auth/adapters';
|
||||||
import { decode, encode } from 'next-auth/jwt';
|
import { decode, encode } from 'next-auth/jwt';
|
||||||
import Credentials from 'next-auth/providers/credentials';
|
import Credentials from 'next-auth/providers/credentials';
|
||||||
import { prisma } from '~/server/db';
|
import { prisma } from '~/server/db';
|
||||||
@@ -97,6 +98,10 @@ export const constructAuthOptions = (
|
|||||||
const sessionToken = generateSessionToken();
|
const sessionToken = generateSessionToken();
|
||||||
const sessionExpiry = fromDate(sessionMaxAgeInSeconds);
|
const sessionExpiry = fromDate(sessionMaxAgeInSeconds);
|
||||||
|
|
||||||
|
if (!adapter?.createSession) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
await adapter.createSession({
|
await adapter.createSession({
|
||||||
sessionToken: sessionToken,
|
sessionToken: sessionToken,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
|
|||||||
@@ -1155,7 +1155,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@next-auth/prisma-adapter@npm:^1.0.5":
|
"@next-auth/prisma-adapter@npm:^1.0.7":
|
||||||
version: 1.0.7
|
version: 1.0.7
|
||||||
resolution: "@next-auth/prisma-adapter@npm:1.0.7"
|
resolution: "@next-auth/prisma-adapter@npm:1.0.7"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -6216,7 +6216,7 @@ __metadata:
|
|||||||
"@mantine/notifications": ^6.0.0
|
"@mantine/notifications": ^6.0.0
|
||||||
"@mantine/prism": ^6.0.19
|
"@mantine/prism": ^6.0.19
|
||||||
"@mantine/tiptap": ^6.0.17
|
"@mantine/tiptap": ^6.0.17
|
||||||
"@next-auth/prisma-adapter": ^1.0.5
|
"@next-auth/prisma-adapter": ^1.0.7
|
||||||
"@next/bundle-analyzer": ^13.0.0
|
"@next/bundle-analyzer": ^13.0.0
|
||||||
"@next/eslint-plugin-next": ^13.4.5
|
"@next/eslint-plugin-next": ^13.4.5
|
||||||
"@nivo/core": ^0.83.0
|
"@nivo/core": ^0.83.0
|
||||||
|
|||||||
Reference in New Issue
Block a user