Skip to content

Codex/f rbered app f r deploy med docker compose #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,16 @@ No. All agents you intend to use with OAP must be LangGraph agents, deployed on
First, ensure you're using the latest version of LangGraph. If running locally, make sure you're using the latest version of the LangGraph API, and CLI packages. If deploying, make sure you've published a revision after 05/14/2025. Then, check that you have the `x_oap_ui_config` metadata set on your configurable fields. If you have, check that your configurable object is defined using LangGraph Zod (if using TypeScript), as this is required for the Open Agent Platform to recognize & render your UI fields.

If it's still not working, confirm your `x_oap_ui_config` metadata has the proper fields set.

## Docker Compose Deployment

The repository includes a `Dockerfile` and `docker-compose.yml` for running the web application in a container. To configure the container to use your Supabase project:

1. Copy `apps/web/.env.example` to `apps/web/.env` and fill in your environment values, particularly `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY`.
2. Start the application with Docker Compose:

```bash
docker-compose up --build
```

The app will be available on [http://localhost:3000](http://localhost:3000).
41 changes: 41 additions & 0 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Install dependencies and build
FROM node:20-alpine AS builder
WORKDIR /app

# Copy root manifest and workspace manifest
COPY package.json yarn.lock ./
COPY apps/web/package.json apps/web/package.json

# Install dependencies
RUN yarn install --frozen-lockfile

# Copy the rest of the repository
COPY . .

# Build the web app
WORKDIR /app/apps/web
RUN yarn build

# Production image
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production

# Create a non-root user
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
RUN chown -R nextjs:nodejs /app
USER nextjs

# Copy built assets and dependencies
COPY --from=builder /app/apps/web/node_modules ./apps/web/node_modules
COPY --from=builder /app/apps/web/.next ./apps/web/.next
COPY --from=builder /app/apps/web/public ./apps/web/public
COPY --from=builder /app/apps/web/package.json ./apps/web/package.json
COPY --from=builder /app/apps/web/next.config.mjs ./apps/web/next.config.mjs

WORKDIR /app/apps/web
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1
USER non-root
CMD ["yarn", "start"]
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'
services:
web:
build:
context: apps/web
dockerfile: Dockerfile
env_file:
- apps/web/.env
ports:
- "3000:3000"
restart: unless-stopped