Move env varibles to dynamic runtime lookup

main
trivernis 5 months ago
parent 6e407dc316
commit 78b2fb3b8f
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -1,11 +1,5 @@
FROM docker.io/node:20.15.0-alpine AS builder
ARG STRAPI_CMS_URL
ENV STRAPI_CMS_URL $STRAPI_CMS_URL
ARG STRAPI_CMS_API_KEY
ENV STRAPI_CMS_API_KEY $STRAPI_CMS_API_KEY
ENV NODE_ENV production
WORKDIR /app

@ -1,5 +1,8 @@
import qs from "qs";
import { STRAPI_CMS_API_KEY, STRAPI_CMS_URL } from "$env/static/private";
import { env } from "$env/dynamic/private";
const STRAPI_CMS_API_KEY = env.STRAPI_CMS_API_KEY;
const STRAPI_CMS_URL = env.STRAPI_CMS_URL;
interface Props {
endpoint: string;

@ -1,4 +1,6 @@
import { STRAPI_CMS_URL } from "$env/static/private";
import { env } from "$env/dynamic/private";
const STRAPI_CMS_URL = env.STRAPI_CMS_URL;
export async function GET({
params,

Loading…
Cancel
Save