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,4 +1,4 @@
.PHONY: help up down logs shell migrate test test-clean env ui-install ui-start ui-dev
.PHONY: help up down logs shell migrate test test-clean env ui-install ui-start ui-dev ui-build ui-dev-start
NEXT_PUBLIC_USER_ID=$(USER)
NEXT_PUBLIC_API_URL=http://localhost:8765
@@ -16,55 +16,37 @@ help:
@echo " make test-clean - Run tests and clean up volumes"
@echo " make ui-install - Install frontend dependencies"
@echo " make ui-start - Start the frontend development server"
@echo " make ui - Install dependencies and start the frontend"
@echo " make ui-dev - Install dependencies and start the frontend in dev mode"
@echo " make ui - Install dependencies and start the frontend in production mode"
env:
cd api && cp .env.example .env
cd ui && cp .env.example .env
build:
cd api && docker-compose build
docker compose build
up:
cd api && docker-compose up
NEXT_PUBLIC_USER_ID=$(USER) NEXT_PUBLIC_API_URL=$(NEXT_PUBLIC_API_URL) docker compose up
down:
cd api && docker-compose down -v
docker compose down -v
rm -f api/openmemory.db
logs:
cd api && docker-compose logs -f
docker compose logs -f
shell:
cd api && docker-compose exec api bash
docker compose exec api bash
upgrade:
cd api && docker-compose exec api alembic upgrade head
docker compose exec api alembic upgrade head
migrate:
cd api && docker-compose exec api alembic upgrade head
docker compose exec api alembic upgrade head
downgrade:
cd api && docker-compose exec api alembic downgrade -1
docker compose exec api alembic downgrade -1
test:
cd api && docker-compose run --rm api pytest tests/ -v
test-clean:
cd api && docker-compose run --rm api pytest tests/ -v && docker-compose down -v
# Frontend commands
ui-install:
cd ui && pnpm install
ui-build:
cd ui && pnpm build
ui-start:
cd ui && NEXT_PUBLIC_USER_ID=$(USER) NEXT_PUBLIC_API_URL=$(NEXT_PUBLIC_API_URL) pnpm start
ui-dev-start:
cd ui && NEXT_PUBLIC_USER_ID=$(USER) NEXT_PUBLIC_API_URL=$(NEXT_PUBLIC_API_URL) && pnpm dev
ui-dev: ui-install ui-dev-start
ui: ui-install ui-build ui-start
ui-dev:
cd ui && NEXT_PUBLIC_USER_ID=$(USER) NEXT_PUBLIC_API_URL=$(NEXT_PUBLIC_API_URL) pnpm install && pnpm dev