use docker build args
This commit is contained in:
parent
09ffd5588c
commit
cf674f7cc6
|
@ -7,6 +7,12 @@ RUN corepack enable
|
|||
|
||||
|
||||
FROM deps AS build
|
||||
ARG NEXT_PUBLIC_SITE_URL=foo
|
||||
ARG NEXT_PUBLIC_STRAPI_URL=foo
|
||||
ARG NEXT_PUBLIC_UPPY_COMPANION_URL=foo
|
||||
ENV NEXT_PUBLIC_SITE_URL ${NEXT_PUBLIC_SITE_URL}
|
||||
ENV NEXT_PUBLIC_STRAPI_URL ${NEXT_PUBLIC_STRAPI_URL}
|
||||
ENV NEXT_PUBLIC_UPPY_COMPANION_URL ${NEXT_PUBLIC_UPPY_COMPANION_URL}
|
||||
WORKDIR /usr/src/app
|
||||
COPY . .
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
|
|
@ -2,7 +2,7 @@ if (!process.env.NEXT_PUBLIC_SITE_URL) throw new Error('NEXT_PUBLIC_SITE_URL was
|
|||
if (!process.env.NEXT_PUBLIC_STRAPI_URL) throw new Error('NEXT_PUBLIC_STRAPI_URL was missing in env');
|
||||
if (!process.env.NEXT_PUBLIC_UPPY_COMPANION_URL) throw new Error('NEXT_PUBLIC_UPPY_COMPANION_URL undefined in env');
|
||||
|
||||
export const companionUrl = process.env.NEXT_PUBLIC_UPPY_COMPANION_URL
|
||||
export const companionUrl = ''+process.env.NEXT_PUBLIC_UPPY_COMPANION_URL
|
||||
export const siteUrl = ''+process.env.NEXT_PUBLIC_SITE_URL
|
||||
export const strapiUrl = ''+process.env.NEXT_PUBLIC_STRAPI_URL
|
||||
export const patreonSupporterBenefitId: string = '4760169'
|
||||
|
|
|
@ -275,7 +275,7 @@ export async function getAllStreamsForVtuber(vtuberId: number, archiveStatuses =
|
|||
});
|
||||
|
||||
console.log(`strapiUrl=${strapiUrl}`)
|
||||
const response = await fetch(`${strapiUrl}/api/streams?${query}`, fetchStreamsOptions);
|
||||
const response = await fetch(`${strapiUrl}/api/streams?${query}`, fetchStreamsOptions)
|
||||
|
||||
if (response.status !== 200) {
|
||||
// If the response status is not 200 (OK), consider it a network failure
|
||||
|
|
Loading…
Reference in New Issue