improvement(OpenMemory MCP): Improves Docker Compose commands (#2681)

Co-authored-by: Deshraj Yadav <deshrajdry@gmail.com>
This commit is contained in:
Saket Aryan
2025-05-14 13:44:08 +05:30
committed by GitHub
parent da59412150
commit a22287a3ba
10 changed files with 45 additions and 78 deletions

View File

@@ -1,2 +0,0 @@
NEXT_PUBLIC_API_URL=NEXT_PUBLIC_API_URL
NEXT_PUBLIC_USER_ID=NEXT_PUBLIC_USER_ID

View File

@@ -1,2 +1,2 @@
NEXT_PUBLIC_API_URL=http://localhost:8765
NEXT_PUBLIC_USER_ID=default-user
NEXT_PUBLIC_API_URL=NEXT_PUBLIC_API_URL
NEXT_PUBLIC_USER_ID=NEXT_PUBLIC_USER_ID

View File

@@ -10,16 +10,12 @@ RUN apk add --no-cache libc6-compat curl && \
WORKDIR /app
# Dependencies stage
FROM base AS deps
# Copy lockfile and manifest
COPY package.json pnpm-lock.yaml ./
# Install dependencies using pnpm
RUN pnpm install --frozen-lockfile
# Builder stage
FROM base AS builder
WORKDIR /app
@@ -28,30 +24,24 @@ COPY --from=deps /app/pnpm-lock.yaml ./pnpm-lock.yaml
COPY . .
RUN cp next.config.dev.mjs next.config.mjs
RUN cp .env.dev .env
RUN cp .env.example .env
RUN pnpm build
# Production runner stage
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
# Create non-root user for security
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs
# Copy production dependencies and built artifacts
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
# Copy and prepare entrypoint script
COPY --chown=nextjs:nodejs entrypoint.sh /home/nextjs/entrypoint.sh
RUN chmod +x /home/nextjs/entrypoint.sh
# Switch to non-root user
USER nextjs
EXPOSE 3000

View File

@@ -1,13 +0,0 @@
services:
frontend:
build:
context: .
dockerfile: Dockerfile
image: mem0/openmemory-ui:latest
ports:
- "3000:3000"
env_file:
- .env
environment:
- NEXT_PUBLIC_API_URL=NEXT_PUBLIC_API_URL
- NEXT_PUBLIC_USER_ID=NEXT_PUBLIC_USER_ID