mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-05 21:04:43 +08:00
🐛 Fix nx commands in cron GH workflows
This commit is contained in:
parent
4628465ebd
commit
7bb0a81ae5
2
.github/workflows/hourly.yml
vendored
2
.github/workflows/hourly.yml
vendored
@ -37,4 +37,4 @@ jobs:
|
||||
with:
|
||||
bun-version-file: "package.json"
|
||||
- run: bun install
|
||||
- run: bunx nx run cron:hourly scripts
|
||||
- run: bunx nx cron:hourly scripts
|
||||
|
||||
2
.github/workflows/monthly.yml
vendored
2
.github/workflows/monthly.yml
vendored
@ -25,4 +25,4 @@ jobs:
|
||||
with:
|
||||
bun-version-file: "package.json"
|
||||
- run: bun install
|
||||
- run: bunx nx run cron:monthly scripts
|
||||
- run: bunx nx cron:monthly scripts
|
||||
|
||||
@ -1,49 +1,29 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
|
||||
ARG BUN_VERSION=1.3.9
|
||||
|
||||
FROM oven/bun:${BUN_VERSION}-slim AS bun
|
||||
FROM oven/bun:${BUN_VERSION}-slim AS builder
|
||||
|
||||
FROM node:24-bullseye-slim AS base
|
||||
|
||||
COPY --from=bun /usr/local/bin/bun /usr/local/bin/bun
|
||||
RUN ln -s /usr/local/bin/bun /usr/local/bin/bunx
|
||||
|
||||
RUN apt-get update -qq \
|
||||
&& apt-get install -qq --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
git \
|
||||
g++ \
|
||||
openssl \
|
||||
python3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
FROM base AS install
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN SKIP_ENV_CHECK=true \
|
||||
DATABASE_URL=postgresql:// \
|
||||
ENCRYPTION_SECRET=12345678901234567890123456789012 \
|
||||
NEXTAUTH_URL=http://localhost:3000 \
|
||||
NEXT_PUBLIC_VIEWER_URL=http://localhost:3001 \
|
||||
SENTRYCLI_SKIP_DOWNLOAD=1 \
|
||||
bun install --frozen-lockfile
|
||||
RUN --mount=type=cache,target=/root/.bun/install/cache \
|
||||
bun install --frozen-lockfile --ignore-scripts --filter workflows
|
||||
|
||||
RUN DATABASE_URL=postgresql:// bunx nx db:generate prisma
|
||||
ARG DATABASE_URL=postgresql://
|
||||
RUN PATH="/app/node_modules/.bin:${PATH}" DATABASE_URL=$DATABASE_URL bun packages/prisma/scripts/db-generate.ts
|
||||
|
||||
FROM base AS release
|
||||
RUN cd apps/workflows && bun run build
|
||||
|
||||
FROM oven/bun:${BUN_VERSION}-slim AS release
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY --from=install /usr/src/app/package.json ./package.json
|
||||
COPY --from=install /usr/src/app/bun.lock ./bun.lock
|
||||
COPY --from=install /usr/src/app/bunfig.toml ./bunfig.toml
|
||||
COPY --from=install /usr/src/app/node_modules ./node_modules
|
||||
COPY --from=install /usr/src/app/apps/workflows ./apps/workflows
|
||||
COPY --from=install /usr/src/app/packages ./packages
|
||||
COPY --from=builder --chown=bun:bun /app/apps/workflows/dist/index.js /app/index.js
|
||||
|
||||
USER node
|
||||
USER bun
|
||||
EXPOSE 3000/tcp
|
||||
ENTRYPOINT ["bun", "apps/workflows/src/index.ts"]
|
||||
ENTRYPOINT ["bun", "/app/index.js"]
|
||||
|
||||
118
apps/workflows/Dockerfile.dockerignore
Normal file
118
apps/workflows/Dockerfile.dockerignore
Normal file
@ -0,0 +1,118 @@
|
||||
**
|
||||
|
||||
!package.json
|
||||
!bun.lock
|
||||
!bunfig.toml
|
||||
!tsconfig.json
|
||||
!tsconfig.base.json
|
||||
|
||||
!apps
|
||||
!apps/workflows
|
||||
!apps/workflows/**
|
||||
|
||||
!packages
|
||||
!packages/ai
|
||||
!packages/ai/**
|
||||
!packages/conditions
|
||||
!packages/conditions/**
|
||||
!packages/config
|
||||
!packages/config/**
|
||||
!packages/emails
|
||||
!packages/emails/**
|
||||
!packages/env
|
||||
!packages/env/**
|
||||
!packages/events
|
||||
!packages/events/**
|
||||
!packages/groups
|
||||
!packages/groups/**
|
||||
!packages/lib
|
||||
!packages/lib/**
|
||||
!packages/prisma
|
||||
!packages/prisma/**
|
||||
!packages/results
|
||||
!packages/results/**
|
||||
!packages/rich-text
|
||||
!packages/rich-text/**
|
||||
!packages/runtime-session-store
|
||||
!packages/runtime-session-store/**
|
||||
!packages/schemas
|
||||
!packages/schemas/**
|
||||
!packages/settings
|
||||
!packages/settings/**
|
||||
!packages/shared-core
|
||||
!packages/shared-core/**
|
||||
!packages/shared-primitives
|
||||
!packages/shared-primitives/**
|
||||
!packages/telemetry
|
||||
!packages/telemetry/**
|
||||
!packages/theme
|
||||
!packages/theme/**
|
||||
!packages/typebot
|
||||
!packages/typebot/**
|
||||
!packages/ui
|
||||
!packages/ui/**
|
||||
!packages/user
|
||||
!packages/user/**
|
||||
!packages/variables
|
||||
!packages/variables/**
|
||||
!packages/workspaces
|
||||
!packages/workspaces/**
|
||||
|
||||
!packages/blocks
|
||||
!packages/blocks/base
|
||||
!packages/blocks/base/**
|
||||
!packages/blocks/bubbles
|
||||
!packages/blocks/bubbles/**
|
||||
!packages/blocks/core
|
||||
!packages/blocks/core/**
|
||||
!packages/blocks/inputs
|
||||
!packages/blocks/inputs/**
|
||||
!packages/blocks/integrations
|
||||
!packages/blocks/integrations/**
|
||||
!packages/blocks/logic
|
||||
!packages/blocks/logic/**
|
||||
|
||||
!packages/forge
|
||||
!packages/forge/core
|
||||
!packages/forge/core/**
|
||||
!packages/forge/repository
|
||||
!packages/forge/repository/**
|
||||
!packages/forge/blocks
|
||||
!packages/forge/blocks/anthropic
|
||||
!packages/forge/blocks/anthropic/**
|
||||
!packages/forge/blocks/blink
|
||||
!packages/forge/blocks/blink/**
|
||||
!packages/forge/blocks/calCom
|
||||
!packages/forge/blocks/calCom/**
|
||||
!packages/forge/blocks/chatNode
|
||||
!packages/forge/blocks/chatNode/**
|
||||
!packages/forge/blocks/deepseek
|
||||
!packages/forge/blocks/deepseek/**
|
||||
!packages/forge/blocks/difyAi
|
||||
!packages/forge/blocks/difyAi/**
|
||||
!packages/forge/blocks/elevenlabs
|
||||
!packages/forge/blocks/elevenlabs/**
|
||||
!packages/forge/blocks/gmail
|
||||
!packages/forge/blocks/gmail/**
|
||||
!packages/forge/blocks/groq
|
||||
!packages/forge/blocks/groq/**
|
||||
!packages/forge/blocks/mistral
|
||||
!packages/forge/blocks/mistral/**
|
||||
!packages/forge/blocks/nocodb
|
||||
!packages/forge/blocks/nocodb/**
|
||||
!packages/forge/blocks/openai
|
||||
!packages/forge/blocks/openai/**
|
||||
!packages/forge/blocks/openRouter
|
||||
!packages/forge/blocks/openRouter/**
|
||||
!packages/forge/blocks/perplexity
|
||||
!packages/forge/blocks/perplexity/**
|
||||
!packages/forge/blocks/posthog
|
||||
!packages/forge/blocks/posthog/**
|
||||
!packages/forge/blocks/qrcode
|
||||
!packages/forge/blocks/qrcode/**
|
||||
!packages/forge/blocks/segment
|
||||
!packages/forge/blocks/segment/**
|
||||
!packages/forge/blocks/togetherAi
|
||||
!packages/forge/blocks/togetherAi/**
|
||||
!packages/forge/blocks/zendesk
|
||||
!packages/forge/blocks/zendesk/**
|
||||
@ -8,6 +8,7 @@ kill_timeout = 120
|
||||
|
||||
[build]
|
||||
dockerfile = "Dockerfile"
|
||||
ignorefile = "Dockerfile.dockerignore"
|
||||
|
||||
[build.args]
|
||||
DATABASE_URL = "mysql://"
|
||||
|
||||
@ -4,12 +4,27 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"build": "bun build src/index.ts --target bun --outdir dist"
|
||||
},
|
||||
"nx": {
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "nx:run-commands",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "{workspaceRoot}/apps/workflows/dist",
|
||||
"cwd": "{workspaceRoot}/apps/workflows",
|
||||
"command": "bun run build"
|
||||
}
|
||||
},
|
||||
"start": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"command": "bun src/index.ts"
|
||||
"cwd": "{workspaceRoot}/apps/workflows/dist",
|
||||
"command": "bun index.js"
|
||||
}
|
||||
},
|
||||
"dev": {
|
||||
|
||||
@ -38,6 +38,9 @@
|
||||
{
|
||||
"path": "../../packages/results/tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/prisma/tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/lib/tsconfig.lib.json"
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user