Skip to content
Merged
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
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
node_modules/
.git/
.gitignore
.gitattributes
*.md
.editorconfig
.prettierrc
.prettierignore
eslint.config.mjs
.env
.env*
tests/
content/
docs/
web/landing/
web/docs/
vitest.config.ts
*.tsbuildinfo
.next/
dist/
.astro/
65 changes: 65 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build Docker Image

on:
push:
branches: [master]
tags: ["v*"]
paths-ignore:
- 'web/docs/**'
- 'web/landing/**'
- 'content/**'
- 'README.md'
- 'CONTRIBUTING.md'
- '.github/workflows/deploy-docs.yml'
pull_request:
branches: [master]
paths-ignore:
- 'web/docs/**'
- 'web/landing/**'
- 'content/**'
- '*.md'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/omnia-gui
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,format=short

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: apps/gui/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
59 changes: 59 additions & 0 deletions apps/gui/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM node:22-slim AS base
ENV PNPM_HOME="/pnpm" \

Check warning on line 2 in apps/gui/Dockerfile

View workflow job for this annotation

GitHub Actions / build

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$PNPM_HOME' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
PATH="$PNPM_HOME:$PATH"
RUN corepack enable && corepack prepare pnpm@11.13.0 --activate
WORKDIR /app

FROM base AS build-deps
RUN apt-get update -qq && \
apt-get install -qq -y --no-install-recommends \
python3 make g++ && \
rm -rf /var/lib/apt/lists/*

COPY pnpm-lock.yaml pnpm-workspace.yaml ./
COPY package.json tsconfig.json tsconfig.base.json ./
COPY apps/gui/package.json apps/gui/package.json
COPY apps/gui/tsconfig.json apps/gui/tsconfig.json
COPY apps/gui/next.config.ts apps/gui/next.config.ts
COPY apps/gui/postcss.config.mjs apps/gui/postcss.config.mjs
COPY apps/gui/components.json apps/gui/components.json
COPY packages/actor/package.json packages/actor/package.json
COPY packages/architect/package.json packages/architect/package.json
COPY packages/core/package.json packages/core/package.json
COPY packages/intent/package.json packages/intent/package.json
COPY packages/llm/package.json packages/llm/package.json
COPY packages/memory/package.json packages/memory/package.json
COPY packages/scenario/package.json packages/scenario/package.json
COPY packages/spatial/package.json packages/spatial/package.json
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
pnpm install --frozen-lockfile

FROM build-deps AS pkg-builder
COPY packages/ ./packages/
RUN pnpm build

FROM pkg-builder AS gui-builder
COPY apps/gui/src ./apps/gui/src
COPY apps/gui/public ./apps/gui/public
RUN pnpm --filter @omnia/gui build

FROM base AS runner
ENV NODE_ENV=production
RUN apt-get update -qq && \
apt-get install -qq -y --no-install-recommends \
python3 make g++ && \
rm -rf /var/lib/apt/lists/*

COPY --from=gui-builder /app/package.json /app/pnpm-workspace.yaml ./
COPY --from=gui-builder /app/node_modules ./node_modules
COPY --from=gui-builder /app/packages ./packages
COPY --from=gui-builder /app/apps/gui/package.json \
/app/apps/gui/next.config.ts \
/app/apps/gui/postcss.config.mjs \
./apps/gui/
COPY --from=gui-builder /app/apps/gui/.next ./apps/gui/.next
COPY --from=gui-builder /app/apps/gui/public ./apps/gui/public

WORKDIR /app/apps/gui
EXPOSE 3000
CMD ["pnpm", "start"]
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
omnia-gui:
build:
context: .
dockerfile: apps/gui/Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- GOOGLE_API_KEY=${GOOGLE_API_KEY:-}
volumes:
- omnia-data:/app/apps/gui/data

volumes:
omnia-data:
Loading