From a55b248e1bb611b9d6b4d136527ba8a716fdc5dd Mon Sep 17 00:00:00 2001 From: Oier Bravo Urtasun Date: Sun, 22 Jun 2025 06:46:44 +0200 Subject: [PATCH] deploy stuff, envs --- client/Dockerfile | 4 ++-- client/docker-compose.yml | 4 ++-- client/src/components/PoleElementsList.astro | 1 - client/src/config/strapi.ts | 2 +- client/src/lib/strapi.ts | 13 +++++++++++-- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/client/Dockerfile b/client/Dockerfile index d622caf0..2a217bcf 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -20,7 +20,7 @@ COPY --from=prod-deps /app/node_modules ./node_modules COPY --from=build /app/dist ./dist ENV HOST=0.0.0.0 -ENV PORT=4321 +ENV PORT=4123 -EXPOSE 4321 +EXPOSE 4123 CMD node ./dist/server/entry.mjs \ No newline at end of file diff --git a/client/docker-compose.yml b/client/docker-compose.yml index 00e509ff..4f088baf 100644 --- a/client/docker-compose.yml +++ b/client/docker-compose.yml @@ -20,8 +20,8 @@ services: - ./astro.config.mjs:/opt/app/astro.config.mjs - ./tsconfig.json:/opt/app/tsconfig.json networks: - - strapi-network + - pole-book_strapi-network networks: - strapi-network: + pole-book_strapi-network: external: true \ No newline at end of file diff --git a/client/src/components/PoleElementsList.astro b/client/src/components/PoleElementsList.astro index 10a77a76..9c1a05db 100644 --- a/client/src/components/PoleElementsList.astro +++ b/client/src/components/PoleElementsList.astro @@ -18,7 +18,6 @@ const BASE_URL = getStrapiBaseUrl();
{ elements.map((poleElement) => ( - console.log(poleElement),
; @@ -22,8 +32,7 @@ interface Props { if (endpoint.startsWith('/')) { endpoint = endpoint.slice(1); } - const strapiUrl = import.meta.env.STRAPI_URL || process.env.STRAPI_URL || "http://localhost:1337"; - console.log(strapiUrl); + const strapiUrl = getStrapiBaseUrl(); const url = new URL(`${strapiUrl}/api/${endpoint}`); if (query) {