📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fix: resolve ECONNREFUSED for server-side API calls in self-hosted Docker setup
Blue Mousef45940644b44
diff --git a/web/Dockerfile b/web/Dockerfileindex 4f201c0ff..8b9ef7ac4 100644--- a/web/Dockerfile+++ b/web/Dockerfile@@ -37,7 +37,8 @@ RUN npm run buildFROM baseENV NODE_ENV=production \- __SELFHOSTED=true+ __SELFHOSTED=true \+ API_ORIGIN=http://swetrix-api:5005RUN mkdir /appWORKDIR /appdiff --git a/web/app/lib/constants/index.ts b/web/app/lib/constants/index.tsindex 77fc08be1..233e4c746 100644--- a/web/app/lib/constants/index.ts+++ b/web/app/lib/constants/index.ts@@ -381,7 +381,7 @@ const PRODUCTION_API_URL = isBrowser: process.env.API_URLconst SELFHOSTED_API_URL = isBrowser? `${window.REMIX_ENV?.BASE_URL}/backend`- : `${process.env.BASE_URL}/backend`+ : process.env.API_ORIGIN || `${process.env.BASE_URL}/backend`export const COOKIE_DOMAIN =(isBrowser ? window.REMIX_ENV?.COOKIE_DOMAIN : process.env.COOKIE_DOMAIN) ||