Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
fix workflow (#1183)
Thibault Le Ouay7884aea918f7
diff --git a/apps/workflows/.dockerignore b/apps/workflows/.dockerignoreindex 11752d518..8189e7b53 100644--- a/apps/workflows/.dockerignore+++ b/apps/workflows/.dockerignore@@ -1,4 +1,4 @@-# This file is generated by Dofigen v2.2.0+# This file is generated by Dofigen v2.3.2# See https://github.com/lenra-io/dofigennode_modules@@ -12,4 +12,3 @@ node_modules/packages/notifications/packages/tinybird/packages/tracker-/packages/upstashdiff --git a/apps/workflows/Dockerfile b/apps/workflows/Dockerfileindex a23538f3a..1c60a16d0 100644--- a/apps/workflows/Dockerfile+++ b/apps/workflows/Dockerfile@@ -1,9 +1,9 @@-# syntax=docker/dockerfile:1.7-# This file is generated by Dofigen v2.2.0+# syntax=docker/dockerfile:1.11+# This file is generated by Dofigen v2.3.2# See https://github.com/lenra-io/dofigen# install-FROM oven/bun@sha256:9a45ebd9a1e5403177064592e1564791443b1a459356c905d1112e32758dd454 AS install+FROM oven/bun@sha256:e9382fda475d1ff0a939e925db3ca5a91b3b26cd71f23410dc5363262384bbc2 AS installWORKDIR /app/RUN \--mount=type=bind,target=package.json,source=package.json \@@ -13,11 +13,12 @@ RUN \--mount=type=bind,target=packages/emails/package.json,source=packages/emails/package.json \--mount=type=bind,target=packages/utils/package.json,source=packages/utils/package.json \--mount=type=bind,target=packages/tsconfig/package.json,source=packages/tsconfig/package.json \+ --mount=type=bind,target=packages/upstash/package.json,source=packages/upstash/package.json \--mount=type=cache,target=/root/.bun/install/cache,sharing=locked \bun install --production --ignore-scripts --frozen-lockfile --verbose# build-FROM oven/bun@sha256:9a45ebd9a1e5403177064592e1564791443b1a459356c905d1112e32758dd454 AS build+FROM oven/bun@sha256:e9382fda475d1ff0a939e925db3ca5a91b3b26cd71f23410dc5363262384bbc2 AS buildENV NODE_ENV="production"WORKDIR /app/apps/workflowsCOPY \@@ -30,7 +31,7 @@ COPY \RUN bun build --compile --sourcemap --format=cjs src/index.ts --outfile=app# runtime-FROM debian@sha256:b0c91cc181796d34c53f7ea106fbcddaf87f3e601cc371af6a24a019a489c980 AS runtime+FROM debian@sha256:e831d9a884d63734fe3dd9c491ed9a5a3d4c6a6d32c5b14f2067357c49b0b7e1 AS runtimeCOPY \--from=build \--chown=1000:1000 \diff --git a/apps/workflows/dofigen.lock b/apps/workflows/dofigen.lockindex 7724308b0..9d4e6d4b0 100644--- a/apps/workflows/dofigen.lock+++ b/apps/workflows/dofigen.lock@@ -11,29 +11,11 @@ effective: |- /packages/notifications- /packages/tinybird- /packages/tracker- - /packages/upstashbuilders:- build:- fromImage:- path: oven/bun- digest: sha256:9a45ebd9a1e5403177064592e1564791443b1a459356c905d1112e32758dd454- workdir: /app/apps/workflows- env:- NODE_ENV: production- copy:- - paths:- - .- target: /app/- - fromBuilder: install- paths:- - /app/node_modules- target: /app/node_modules- run:- - bun build --compile --sourcemap --format=cjs src/index.ts --outfile=appinstall:fromImage:path: oven/bun- digest: sha256:9a45ebd9a1e5403177064592e1564791443b1a459356c905d1112e32758dd454+ digest: sha256:e9382fda475d1ff0a939e925db3ca5a91b3b26cd71f23410dc5363262384bbc2workdir: /app/run:- bun install --production --ignore-scripts --frozen-lockfile --verbose@@ -54,9 +36,28 @@ effective: |source: packages/utils/package.json- target: packages/tsconfig/package.jsonsource: packages/tsconfig/package.json+ - target: packages/upstash/package.json+ source: packages/upstash/package.json+ build:+ fromImage:+ path: oven/bun+ digest: sha256:e9382fda475d1ff0a939e925db3ca5a91b3b26cd71f23410dc5363262384bbc2+ workdir: /app/apps/workflows+ env:+ NODE_ENV: production+ copy:+ - paths:+ - .+ target: /app/+ - fromBuilder: install+ paths:+ - /app/node_modules+ target: /app/node_modules+ run:+ - bun build --compile --sourcemap --format=cjs src/index.ts --outfile=appfromImage:path: debian- digest: sha256:b0c91cc181796d34c53f7ea106fbcddaf87f3e601cc371af6a24a019a489c980+ digest: sha256:e831d9a884d63734fe3dd9c491ed9a5a3d4c6a6d32c5b14f2067357c49b0b7e1copy:- fromBuilder: buildpaths:@@ -72,14 +73,14 @@ images:library:debian:bullseye-slim:- digest: sha256:b0c91cc181796d34c53f7ea106fbcddaf87f3e601cc371af6a24a019a489c980+ digest: sha256:e831d9a884d63734fe3dd9c491ed9a5a3d4c6a6d32c5b14f2067357c49b0b7e1oven:bun:latest:- digest: sha256:9a45ebd9a1e5403177064592e1564791443b1a459356c905d1112e32758dd454+ digest: sha256:e9382fda475d1ff0a939e925db3ca5a91b3b26cd71f23410dc5363262384bbc2resources:dofigen.yml:- hash: f708205b6699a47937d4ce49a38a2aa1b3f5ed409b685c285603e9e1b5f9fea0+ hash: 48a9d086b070600575e9867af0c63f2bbcfd301c867121e671fc771ae50f34dccontent: |ignore:- node_modules@@ -93,7 +94,6 @@ resources:- /packages/notifications- /packages/tinybird- /packages/tracker- - /packages/upstashbuilders:install:fromImage: oven/bun@@ -107,6 +107,8 @@ resources:- packages/emails/package.json- packages/utils/package.json- packages/tsconfig/package.json+ - packages/upstash/package.json+# Install dependenciesrun: bun install --production --ignore-scripts --frozen-lockfile --verbosecache:diff --git a/apps/workflows/dofigen.yml b/apps/workflows/dofigen.ymlindex 520606924..90d7f5e70 100644--- a/apps/workflows/dofigen.yml+++ b/apps/workflows/dofigen.yml@@ -10,7 +10,6 @@ ignore:- /packages/notifications- /packages/tinybird- /packages/tracker- - /packages/upstashbuilders:install:fromImage: oven/bun@@ -24,6 +23,8 @@ builders:- packages/emails/package.json- packages/utils/package.json- packages/tsconfig/package.json+ - packages/upstash/package.json+# Install dependenciesrun: bun install --production --ignore-scripts --frozen-lockfile --verbosecache:diff --git a/apps/workflows/src/cron/monitor.ts b/apps/workflows/src/cron/monitor.tsindex 1445f2502..8084c7b6e 100644--- a/apps/workflows/src/cron/monitor.ts+++ b/apps/workflows/src/cron/monitor.ts@@ -169,6 +169,8 @@ export async function Step14Days(userId: number) {to: [user.email],subject: "Your OpenStatus monitors will be paused soon",from: "Thibault From OpenStatus <[email protected]>",+ replyTo: "[email protected]",+react: MonitorDeactivationEmail({lastLogin: new Date(),deactivateAt: new Date(new Date().setDate(new Date().getDate() + 14)),@@ -197,6 +199,8 @@ export async function Step3Days(userId: number, workFlowRunTimestamp: number) {to: [user.email],subject: "Your OpenStatus monitors will be paused in 3 days",from: "Thibault From OpenStatus <[email protected]>",+ replyTo: "[email protected]",+react: MonitorDeactivationEmail({lastLogin: new Date(workFlowRunTimestamp),deactivateAt: new Date(new Date().setDate(new Date().getDate() + 3)),@@ -267,6 +271,7 @@ export async function StepPaused(userId: number, workFlowRunTimestamp: number) {to: [currentUser.email],subject: "Your monitors have been paused",from: "Thibault From OpenStatus <[email protected]>",+ replyTo: "[email protected]",react: MonitorPausedEmail(),});}diff --git a/packages/emails/src/send.ts b/packages/emails/src/send.tsindex f1eb95751..23cb9bb63 100644--- a/packages/emails/src/send.ts+++ b/packages/emails/src/send.ts@@ -11,6 +11,7 @@ export interface Emails {subject: string;to: string[];from: string;+ replyTo?: string;}export type EmailHtml = {