From c7e6d1c72b7e84c289ad898970ec2dacc7529e15 Mon Sep 17 00:00:00 2001 From: Leon Morival Date: Fri, 10 Jul 2026 23:22:09 +0200 Subject: [PATCH] feat: NEXT_PUBLIC_API_URL --- .gitea/workflows/ci.yml | 1 + Dockerfile | 2 ++ app/lib/server-config.ts | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index f422eb0..e26a706 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -55,6 +55,7 @@ jobs: - name: 🏗️ Build image run: | docker build \ + --build-arg NEXT_PUBLIC_API_URL="${{ secrets.NEXT_PUBLIC_API_URL }}" \ -t git.leonmorival.xyz/leonm/landing-server:latest \ -t git.leonmorival.xyz/leonm/landing-server:${{ github.sha }} \ . diff --git a/Dockerfile b/Dockerfile index 21661f5..b0ee791 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ FROM node:22-alpine AS builder WORKDIR /app ENV NEXT_TELEMETRY_DISABLED=1 +ARG NEXT_PUBLIC_API_URL +ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL COPY --from=deps /app/node_modules ./node_modules COPY . . diff --git a/app/lib/server-config.ts b/app/lib/server-config.ts index 7fe118c..0036c9f 100644 --- a/app/lib/server-config.ts +++ b/app/lib/server-config.ts @@ -5,7 +5,7 @@ export const siteConfig = { jellyfinUrl: "https://momostreaming.com", minecraftPath: "/minecraft", astroneerPath: "/astroneer", - apiUrl: process.env.NEXT_PUBLIC_API_URL ?? "", + apiUrl: process.env.NEXT_PUBLIC_API_URL, }; export const minecraftServer = {