From c3e74bfbf8da82933833c1aef1e13cae82663f32 Mon Sep 17 00:00:00 2001 From: Till Heidrich Date: Tue, 7 Jul 2026 19:25:41 +0200 Subject: [PATCH] Use deployment URL for generated metadata --- Dockerfile | 4 ++++ astro.config.mjs | 4 +++- src/data/site.ts | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c9d8818..346cc80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,10 @@ COPY package*.json ./ RUN npm ci COPY . . +ARG SITE_URL +ARG COOLIFY_URL +ENV SITE_URL=${SITE_URL} +ENV COOLIFY_URL=${COOLIFY_URL} RUN npm run build FROM nginx:alpine diff --git a/astro.config.mjs b/astro.config.mjs index bcee5fa..c9c33d2 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,7 +1,9 @@ import { defineConfig } from "astro/config"; +const siteUrl = (process.env.SITE_URL || process.env.COOLIFY_URL || "https://heidrich-bedachung.de").replace(/\/$/, ""); + export default defineConfig({ - site: "https://heidrich-bedachung.de", + site: siteUrl, output: "static", trailingSlash: "always", }); diff --git a/src/data/site.ts b/src/data/site.ts index 9a655cf..a68139e 100644 --- a/src/data/site.ts +++ b/src/data/site.ts @@ -1,8 +1,10 @@ +const siteUrl = (process.env.SITE_URL || process.env.COOLIFY_URL || "https://heidrich-bedachung.de").replace(/\/$/, ""); + export const site = { name: "Heinz Heidrich GmbH", description: "Dachdecker- und Bauklempnerbetrieb aus Tostedt für Hamburg, Bremen, Buchholz, die Nordheide und Umgebung.", - url: "https://heidrich-bedachung.de", + url: siteUrl, phone: "04182 5802", phoneHref: "tel:+4941825802", fax: "04182 21480",