diff --git a/Dockerfile b/Dockerfile index d6b154294..dcdde5c31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,12 @@ COPY package.json ./package.json COPY .next/standalone ./ COPY .next/static ./.next/static +COPY ./scripts/run.sh ./scripts/run.sh + EXPOSE 7575 ENV PORT 7575 +ENV NEXTAUTH_SECRET NOT_IN_USE_BECAUSE_JWTS_ARE_UNUSED +ENV NEXTAUTH_URL_INTERNAL http://homarr:7575 -CMD ["node", "server.js"] +CMD ["sh", "./scripts/run.sh"] diff --git a/package.json b/package.json index 4e4c93efb..d02c0e222 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "scripts": { "dev": "next dev", - "build": "next build", + "build": "NEXTAUTH_SECRET=WILL_BE_OVERWRITTEN next build", "analyze": "ANALYZE=true next build", "turbo": "turbo run build", "start": "next start", diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 231c6a876..17e1ab679 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -3,6 +3,7 @@ generator client { provider = "prisma-client-js" + binaryTargets = ["native", "linux-musl-openssl-3.0.x"] } datasource db { diff --git a/scripts/run.sh b/scripts/run.sh new file mode 100644 index 000000000..e3fbd74c2 --- /dev/null +++ b/scripts/run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export NEXTAUTH_URL_INTERNAL="http://$HOSTNAME:7575" +node /app/server.js \ No newline at end of file