Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**/node_modules
dist
build
.pnpm-store
.env
.env*
.vscode
.DS_Store
!.env.example
18 changes: 18 additions & 0 deletions DOCKER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Docker Compose (optional) — Developer helper

This file provides an optional dev environment that brings up:

- Convex backend (`backend`) on port `3210`
- Convex dashboard (`dashboard`) on port `6791`
- Frontend dev server (`chef-dev`) on port `5173`

## Run locally

```bash

# from repo root
docker compose -f docker-compose.dev.yml up --build
# If you're on Windows or macOS and see missed file changes,
# ensure polling is enabled (already set in compose) and try:
# docker compose -f docker-compose.dev.yml up --build --force-recreate
```
29 changes: 29 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM node:20-alpine

WORKDIR /usr/src/app

RUN corepack enable

COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./

COPY chef-agent/package.json ./chef-agent/package.json
COPY chefshot/package.json ./chefshot/package.json
COPY test-kitchen/package.json ./test-kitchen/package.json
COPY .npmrc ./
COPY patches ./patches

ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1

RUN pnpm install --frozen-lockfile --prod=false || pnpm install --prod=false

COPY . .

ENV HOST=0.0.0.0
ENV NODE_ENV=development

ENV CHOKIDAR_USEPOLLING=1
ENV WATCHPACK_POLLING=true

EXPOSE 5173 24678

CMD ["pnpm", "dev", "--host", "0.0.0.0"]
52 changes: 52 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
services:
backend:
image: ghcr.io/get-convex/convex-backend:be8a4f397810ce3d04dc3cb32bc81969fe64685a
ports:
- '${PORT:-3210}:3210'
- '${SITE_PROXY_PORT:-3211}:3211'
volumes:
- data:/convex/data
environment:
- CONVEX_CLOUD_ORIGIN=http://backend:3210
- CONVEX_SITE_ORIGIN=http://backend:3211
- RUST_LOG=info
healthcheck:
test: curl -f http://localhost:3210/version || exit 1
interval: 5s
timeout: 5s
retries: 20
start_period: 20s

dashboard:
image: ghcr.io/get-convex/convex-dashboard:161e32648a971fb8ef591e61212f7b9fb7ff4f2c
ports:
- '${DASHBOARD_PORT:-6791}:6791'
environment:
- NEXT_PUBLIC_DEPLOYMENT_URL=http://backend:3210
depends_on:
backend:
condition: service_healthy

chef-dev:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- .:/usr/src/app:delegated
- /usr/src/app/node_modules
ports:
- '5173:5173'
- '24678:24678'
environment:
- VITE_CONVEX_URL=http://backend:3210
- HOST=0.0.0.0
- NODE_ENV=development
- CHOKIDAR_USEPOLLING=1
- WATCHPACK_POLLING=true
depends_on:
backend:
condition: service_healthy
tty: true

volumes:
data:
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"fuzzy": "^0.1.3",
"isbot": "^4.4.0",
"istextorbinary": "^9.5.0",
"jose": "^5.9.6",
"js-cookie": "^3.0.5",
"jszip": "^3.10.1",
"launchdarkly-react-client-sdk": "^3.6.1",
Expand Down
32 changes: 31 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.