Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
feat: add memory limits to docker-compose files for self-hosted (#2522)
Max948385926937
diff --git a/docker-compose-lightweight.yaml b/docker-compose-lightweight.yamlindex 8b03b9ea5..f2cfb0344 100644--- a/docker-compose-lightweight.yaml+++ b/docker-compose-lightweight.yaml@@ -32,6 +32,13 @@ services:retries: 5start_period: 10srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256M# Idempotent: drizzle skips already-applied migrations on every updb-migrate:@@ -83,6 +90,13 @@ services:retries: 3start_period: 45srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mstatus-page:container_name: openstatus-status-page@@ -113,3 +127,10 @@ services:retries: 3start_period: 45srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mdiff --git a/docker-compose.github-packages.yaml b/docker-compose.github-packages.yamlindex 087bee87f..09de8d102 100644--- a/docker-compose.github-packages.yaml+++ b/docker-compose.github-packages.yaml@@ -27,6 +27,9 @@ services:- libsql-data:/var/lib/sqldenvironment:- SQLD_NODE=primary+ # Increase limits to handle multiple services without connection pooling+ - SQLD_MAX_CONCURRENT_CONNECTIONS=512+ - SQLD_MAX_CONCURRENT_REQUESTS=1024healthcheck:test:[@@ -38,6 +41,13 @@ services:retries: 5start_period: 10srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mtinybird-local:container_name: openstatus-tinybird@@ -111,6 +121,13 @@ services:retries: 3start_period: 30srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mserver:container_name: openstatus-server@@ -138,6 +155,13 @@ services:retries: 3start_period: 30srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mprivate-location:container_name: openstatus-private-location@@ -171,6 +195,13 @@ services:retries: 3start_period: 30srestart: unless-stopped+ memswap_limit: 256M+ deploy:+ resources:+ limits:+ memory: 256M+ reservations:+ memory: 128Mchecker:container_name: openstatus-checker@@ -194,6 +225,13 @@ services:retries: 3start_period: 30srestart: unless-stopped+ memswap_limit: 256M+ deploy:+ resources:+ limits:+ memory: 256M+ reservations:+ memory: 128Mdashboard:container_name: openstatus-dashboard@@ -225,6 +263,13 @@ services:retries: 3start_period: 45srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mstatus-page:container_name: openstatus-status-page@@ -256,3 +301,10 @@ services:retries: 3start_period: 45srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mdiff --git a/docker-compose.yaml b/docker-compose.yamlindex 2d0079eac..309ab6b88 100644--- a/docker-compose.yaml+++ b/docker-compose.yaml@@ -27,6 +27,9 @@ services:- libsql-data:/var/lib/sqldenvironment:- SQLD_NODE=primary+ # Increase limits to handle multiple services without connection pooling+ - SQLD_MAX_CONCURRENT_CONNECTIONS=512+ - SQLD_MAX_CONCURRENT_REQUESTS=1024healthcheck:test:[@@ -38,6 +41,13 @@ services:retries: 5start_period: 10srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mtinybird-local:container_name: openstatus-tinybird@@ -111,6 +121,13 @@ services:retries: 3start_period: 30srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mserver:container_name: openstatus-server@@ -141,6 +158,13 @@ services:retries: 3start_period: 30srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mprivate-location:container_name: openstatus-private-location@@ -177,6 +201,13 @@ services:retries: 3start_period: 30srestart: unless-stopped+ memswap_limit: 256M+ deploy:+ resources:+ limits:+ memory: 256M+ reservations:+ memory: 128Mdashboard:container_name: openstatus-dashboard@@ -211,6 +242,13 @@ services:retries: 3start_period: 45srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mstatus-page:container_name: openstatus-status-page@@ -245,3 +283,10 @@ services:retries: 3start_period: 45srestart: unless-stopped+ memswap_limit: 512M+ deploy:+ resources:+ limits:+ memory: 512M+ reservations:+ memory: 256Mdiff --git a/packages/tinybird/scripts/backfill_external_status_v0_to_v1.ts b/packages/tinybird/scripts/backfill_external_status_v0_to_v1.tsindex d7debef52..1f1047286 100644--- a/packages/tinybird/scripts/backfill_external_status_v0_to_v1.ts+++ b/packages/tinybird/scripts/backfill_external_status_v0_to_v1.ts@@ -115,17 +115,22 @@ async function loadNameToSlugMap(): Promise<Map<string, string>> {authToken: env.DATABASE_AUTH_TOKEN,});const db = drizzle(client);- const rows = await db- .select({ name: externalService.name, slug: externalService.slug })- .from(externalService)- .where(isNotNull(externalService.slug))- .all();- const map = new Map<string, string>();- for (const r of rows) {- map.set(r.name, r.slug);++ try {+ const rows = await db+ .select({ name: externalService.name, slug: externalService.slug })+ .from(externalService)+ .where(isNotNull(externalService.slug))+ .all();+ const map = new Map<string, string>();+ for (const r of rows) {+ map.set(r.name, r.slug);+ }+ console.log(`[backfill] loaded ${map.size} name→slug mappings from libSQL`);+ return map;+ } finally {+ client.close();}- console.log(`[backfill] loaded ${map.size} name→slug mappings from libSQL`);- return map;}function rowsToSnapshots(args: {