-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathDockerfile.workers
More file actions
39 lines (29 loc) · 1.2 KB
/
Dockerfile.workers
File metadata and controls
39 lines (29 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM node:20-slim
WORKDIR /app
# Install and bun
RUN npm install -g bun
# Copy package files
COPY package.json bun.lock turbo.json ./
COPY apps/workers/package.json ./apps/workers/
COPY apps/api/package.json ./apps/api/
COPY packages/typescript-config/package.json ./packages/typescript-config/
COPY packages/core/package.json ./packages/core/
COPY packages/transactional/package.json ./packages/transactional/
COPY packages/types/package.json ./packages/types/
COPY packages/redis/package.json ./packages/redis/
COPY packages/jobs/package.json ./packages/jobs/
COPY packages/facehash/package.json ./packages/facehash/
COPY packages/tiny-markdown/package.json ./packages/tiny-markdown/
COPY packages/memory/package.json ./packages/memory/
COPY packages/location/package.json ./packages/location/
COPY tinybird/package.json ./tinybird/
# Install dependencies
RUN bun install
# Copy source files
COPY . .
# Build dependencies (all packages workers depends on)
RUN bunx turbo run build --filter=@cossistant/workers^...
# Railway will set the PORT environment variable
# EXPOSE is mainly for documentation, the actual port is controlled by env.PORT
# Run with bun runtime
CMD ["bun", "run", "apps/workers/src/index.ts"]