This commit is contained in:
oiov
2025-05-26 16:36:36 +08:00
parent 06f06a8a52
commit af01d60d9b
5 changed files with 9 additions and 13 deletions
+6 -6
View File
@@ -23,13 +23,13 @@ RUN apk add --no-cache openssl
RUN npm install -g pnpm
ARG NEXT_PUBLIC_APP_URL="http://localhost:3001"
ARG RESEND_API_KEY="re_your_resend_api_key"
ARG DATABASE_URL="postgres://postgres:postgres@postgres:5432/wrdo"
# ARG NEXT_PUBLIC_APP_URL="http://localhost:3001"
# ARG RESEND_API_KEY="re_your_resend_api_key"
# ARG DATABASE_URL="postgres://postgres:postgres@postgres:5432/wrdo"
ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL
ENV RESEND_API_KEY=$RESEND_API_KEY
ENV DATABASE_URL=$DATABASE_URL
# ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL
# ENV RESEND_API_KEY=$RESEND_API_KEY
# ENV DATABASE_URL=$DATABASE_URL
COPY --from=deps /app/node_modules ./node_modules
COPY . .
+1 -1
View File
@@ -1,7 +1,7 @@
import { SidebarNavItem, SiteConfig } from "types";
import { env } from "@/env.mjs";
const site_url = env.NEXT_PUBLIC_APP_URL;
const site_url = env.NEXT_PUBLIC_APP_URL || "http://localhost:3030";
const open_signup = env.NEXT_PUBLIC_OPEN_SIGNUP;
const email_r2_domain = env.NEXT_PUBLIC_EMAIL_R2_DOMAIN || "";
+1 -1
View File
@@ -2,7 +2,7 @@ import { Resend } from "resend";
import { env } from "@/env.mjs";
export const resend = new Resend(env.RESEND_API_KEY);
export const resend = new Resend(env.RESEND_API_KEY || "re_key");
export function getVerificationEmailHtml({
url,
-4
View File
@@ -100,10 +100,6 @@ export function formatTime(input: string | number): string {
});
}
export function absoluteUrl(path: string) {
return `${env.NEXT_PUBLIC_APP_URL}${path}`;
}
// Utils from precedent.dev
export const timeAgo = (timestamp: Date, timeOnly?: boolean): string => {
if (!timestamp) return "never";
+1 -1
View File
@@ -13,7 +13,7 @@
"start": "next start",
"lint": "next lint",
"preview": "next build && next start",
"postinstall": "prisma generate",
"db:generate": "prisma generate",
"db:push": "npx prisma migrate deploy",
"email": "email dev --dir emails --port 3333",
"remove-content": "node ./setup.mjs"