From 5064757de3eecb69bd0e5cfec78a610037275a65 Mon Sep 17 00:00:00 2001 From: Aran Roig Date: Thu, 1 Oct 2026 22:34:06 +0200 Subject: [PATCH] JKSJADKSJ --- AGENTS.md | 4 +++- frontend/Dockerfile | 8 +++++--- frontend/nuxt.config.ts | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ea27cbe..88786b3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -33,7 +33,9 @@ Frontend API URL comes from `NUXT_PUBLIC_API_BASE` (default `http://localhost:5000`, read via `runtimeConfig.public.apiBase`). The frontend image builds it empty: the browser then calls `/api` on its own origin, which nginx routes to `backend:5000`, while the Nuxt server's own (SSR) `/api` calls go through a `routeRules` proxy -aimed at `NUXT_API_PROXY_TARGET` (`http://backend:5000` baked in at image build). +aimed at `NUXT_API_PROXY_TARGET` (`https://mathew.aranroig.com` baked in at image build — the +public address nginx routes on to the backend, since the frontend may not reach containers +by service name). There is **no test suite, linter, or typecheck script** configured — don't invent commands. diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 4e35748..cd87ed1 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -15,10 +15,12 @@ ARG CACHEBUST=1 COPY . . # Production API wiring (baked into the build): -# - the browser calls /api on its own origin; nginx forwards that to backend:5000 -# - the Nuxt server (SSR) reaches the backend container by service name +# - the browser calls /api on its own origin (mathew.aranroig.com); nginx +# routes that to the backend +# - the Nuxt server (SSR) reaches the backend through the same public +# address — nginx at mathew.aranroig.com/api — never the container name ENV NUXT_PUBLIC_API_BASE= -ENV NUXT_API_PROXY_TARGET=http://backend:5000 +ENV NUXT_API_PROXY_TARGET=https://mathew.aranroig.com # Build the Nuxt app RUN npm run build diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index d118f38..7e8d6dd 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -48,7 +48,8 @@ export default defineNuxtConfig({ // The Nuxt server's own API calls (SSR) are relative once apiBase is "", // and land on this Nitro route, which forwards them to the backend. The - // Docker image bakes NUXT_API_PROXY_TARGET=http://backend:5000 in at build. + // Docker image bakes NUXT_API_PROXY_TARGET=https://mathew.aranroig.com in + // at build; nginx routes that address on to the backend. routeRules: { '/api/**': { proxy: `${process.env.NUXT_API_PROXY_TARGET || 'http://localhost:5000'}/api/**` }, },