Skip to content

Commit 07ca5d3

Browse files
committed
chore: add Dockerfile and fly.toml for worker deployment
1 parent 305798f commit 07ca5d3

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

apps/worker/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM node:20-slim
2+
3+
WORKDIR /app
4+
5+
# Install bun for package management
6+
RUN npm install -g bun
7+
8+
# Copy workspace files
9+
COPY package.json bun.lock ./
10+
COPY apps/worker/package.json ./apps/worker/
11+
COPY packages/queue/package.json ./packages/queue/
12+
COPY packages/db/package.json ./packages/db/
13+
COPY packages/env/package.json ./packages/env/
14+
COPY packages/utils/package.json ./packages/utils/
15+
16+
# Install dependencies
17+
RUN bun install --frozen-lockfile
18+
19+
# Copy source
20+
COPY apps/worker ./apps/worker
21+
COPY packages ./packages
22+
23+
WORKDIR /app/apps/worker
24+
25+
CMD ["npx", "tsx", "src/index.ts"]

apps/worker/fly.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
app = "formbase-worker"
2+
primary_region = "iad"
3+
4+
[build]
5+
dockerfile = "Dockerfile"
6+
7+
[env]
8+
NODE_ENV = "production"
9+
10+
# No HTTP services - background worker only

0 commit comments

Comments
 (0)