From affee4a733b5f31a7eb7dc0977b57928392f8b25 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Thu, 23 Jul 2026 12:16:37 +0530 Subject: [PATCH] cd: Add docker builds for dev env --- apps/gui/Dockerfile.dev | 18 ++++++++++++++++++ apps/gui/next-env.d.ts | 2 +- docker-compose.dev.yml | 23 +++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 apps/gui/Dockerfile.dev create mode 100644 docker-compose.dev.yml diff --git a/apps/gui/Dockerfile.dev b/apps/gui/Dockerfile.dev new file mode 100644 index 0000000..9f46393 --- /dev/null +++ b/apps/gui/Dockerfile.dev @@ -0,0 +1,18 @@ +FROM node:22-slim +ENV PNPM_HOME="/pnpm" \ + PATH="$PNPM_HOME:$PATH" +RUN corepack enable && corepack prepare pnpm@11.15.1 --activate + +WORKDIR /app + +# Install native build tools if required by dependencies +RUN apt-get update -qq && \ + apt-get install -qq -y --no-install-recommends \ + python3 make g++ && \ + rm -rf /var/lib/apt/lists/* + +# Expose the development port and HMR port if needed +EXPOSE 3000 + +# We run a shell command or script to handle mounting sync + pnpm install fallback +CMD ["pnpm", "--filter", "@omnia/gui", "dev", "--turbopack"] \ No newline at end of file diff --git a/apps/gui/next-env.d.ts b/apps/gui/next-env.d.ts index 9edff1c..c4b7818 100644 --- a/apps/gui/next-env.d.ts +++ b/apps/gui/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/types/routes.d.ts"; +import "./.next/dev/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..1d4437b --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,23 @@ +services: + omnia-gui: + build: + context: . + dockerfile: apps/gui/Dockerfile.dev + ports: + - "3000:3000" + environment: + - NODE_ENV=development + - WATCHPACK_POLLING=true # Useful for certain Linux/LXC filesystem event syncing issues + - CHOKIDAR_USEPOLLING=true # Ensures file changes trigger HMR properly through bind mounts + - GOOGLE_API_KEY=${GOOGLE_API_KEY:-} + volumes: + # Mount the entire monorepo code live into the container + - .:/app + # Anonymous volumes to prevent local node_modules / build caches from overwriting container binaries + - /app/node_modules + - /app/apps/gui/node_modules + - /app/apps/gui/.next + - omnia-data:/app/apps/gui/data + +volumes: + omnia-data: \ No newline at end of file