-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile.sync
More file actions
36 lines (26 loc) · 1.15 KB
/
Dockerfile.sync
File metadata and controls
36 lines (26 loc) · 1.15 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
# Dockerfile for In the Loop Sync Service (Cloudflare Worker)
# Runs the sync service on port 8787 using wrangler dev
FROM node:23
WORKDIR /app
# Install pnpm
RUN npm install -g pnpm
# Copy package files (including workspace packages for workspace:* resolution)
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY packages/agent-core/package.json ./packages/agent-core/
COPY packages/ai-core/package.json ./packages/ai-core/
COPY packages/pyodide-runtime/package.json ./packages/pyodide-runtime/
COPY packages/schema/package.json ./packages/schema/
# Remove @runtimed/components from dependencies (sync service doesn't need it)
# This allows pnpm install to succeed without the components package
RUN node -e "const pkg = require('./package.json'); delete pkg.dependencies['@runtimed/components']; require('fs').writeFileSync('./package.json', JSON.stringify(pkg, null, 2));"
# Install dependencies
RUN pnpm install
# Copy source files
COPY . .
# Copy env files
COPY .env.example .env
COPY .dev.vars.example .dev.vars
# Expose Wrangler's default port
EXPOSE 8787
# Run migrations then start the sync service
CMD pnpm run db:migrate && pnpm run docker:sync