Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

build: use transform workaround for healthcheck with sst

Brad Barbined8201ae55ff
diff --git a/sst.config.ts b/sst.config.ts
index bb506e53ad..10d31f774d 100644
--- a/sst.config.ts
+++ b/sst.config.ts
@@ -24,7 +24,9 @@ export default $config({
cert: process.env.CERT_ARN_ERP,
},
health: {
- path: "/health",
+ "3000/http": {
+ path: "/health",
+ },
},
ports: [
{ listen: "80/http", forward: "3000/http" },
@@ -80,6 +82,19 @@ export default $config({
VERCEL_ENV: "production",
VERCEL_URL: process.env.URL_ERP ?? "itar.carbon.ms",
},
+ transform: {
+ loadBalancer: {
+ idleTimeout: 600,
+ },
+ // Add this to fix the health check path
+ target: (args) => {
+ args.healthCheck = {
+ enabled: true,
+ path: "/health",
+ protocol: "HTTP",
+ };
+ },
+ },
});
const mes = cluster.addService("CarbonMESService", {
@@ -91,7 +106,9 @@ export default $config({
cert: process.env.CERT_ARN_MES,
},
health: {
- path: "/health",
+ "3000/http": {
+ path: "/health",
+ },
},
ports: [
{ listen: "80/http", forward: "3000/http" },
@@ -139,6 +156,19 @@ export default $config({
VERCEL_ENV: "production",
VERCEL_URL: process.env.URL_MES ?? "mes.itar.carbon.ms",
},
+ transform: {
+ loadBalancer: {
+ idleTimeout: 600,
+ },
+ // Add this to fix the health check path
+ target: (args) => {
+ args.healthCheck = {
+ enabled: true,
+ path: "/health",
+ protocol: "HTTP",
+ };
+ },
+ },
});
const rateLimitRule = {