feat: remove NEXT_PUBLIC env vars from docker build args (#13)

* feat: add next public envs to runtime

* Commit env vars
This commit is contained in:
Henry
2025-06-03 21:25:57 +01:00
committed by GitHub
parent 37d2ebccf7
commit 0b06f80181
19 changed files with 55 additions and 33 deletions

View File

@@ -1,10 +1,9 @@
import type { NextApiRequest, NextApiResponse } from "next";
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
import { env } from "next-runtime-env";
import { createNextApiContext } from "@kan/api/trpc";
import { env } from "~/env";
const allowedContentTypes = ["image/jpeg", "image/png"];
@@ -55,7 +54,7 @@ export default async function handler(
// @ts-ignore
client,
new PutObjectCommand({
Bucket: process.env.NEXT_PUBLIC_AVATAR_BUCKET_NAME ?? "",
Bucket: env("NEXT_PUBLIC_AVATAR_BUCKET_NAME") ?? "",
Key: filename,
}),
);