pezzolabs / pezzo

🕹️ Open-source, developer-first LLMOps platform designed to streamline prompt design, version management, instant delivery, collaboration, troubleshooting, observability and more.
https://pezzo.ai
Apache License 2.0
1.94k stars 177 forks source link

Problem getting the app running locally #269

Open grski opened 8 months ago

grski commented 8 months ago

Report

First of all - awesome stuff!

I followed the insctruction from the docs and from the README. On top of that I've copied the envs from server and console into .env file at the root. Tried runnign both through: docker-compose -f docker-compose.infra.yaml up
npx nx serve server npx nx serve console

and just docker compose up

in both cases after login i'm facing an error when trying to get to the console:

Expected behavior

No response

Steps to reproduce the problem

  1. bring the app up locally
  2. signup
  3. try to access localhost:4200

Logs (if applicable)

redacted

Pezzo version

latest git clone

How do you use Pezzo?

Docker Compose

arielweinberger commented 8 months ago

Thanks for reporting! Based on the details provided, it seems that you mixed between the instructions of setting up Pezzo in development mode VS spinning up the working stack for usage only. Which means we should probably improve the docs.

What is your goal? Do you want to modify the code? Or just run it locally and experiment?

grski commented 8 months ago

@arielweinberger Just want to get it up and running so I can later learn how to deploy it.

I first tried the full docker appoach:

  1. tried docker compose up, but that got me an error about .env.local which was not present (at the root dir level) so i created one by copying .env contents from server and console
  2. then it worked, the services started properly
  3. I was able to signup but after trying to log in, I got this:
    [{"message":"Forbidden","locations":[{"line":2,"column":3}],"extensions":{"code":"FORBIDDEN"}}],"data":null,"status":200,"headers":{}},"request":{"query":"query GetOrg($data: OrganizationWhereUniqueInput!, $includeInvitations: Boolean = false, $includeMembers: Boolean = true) {\n organization(data: $data) {\n id\n name\n members [u/include](https://www.reddit.com/u/include/)(if: $includeMembers) {\n id\n role\n user {\n id\n name\n email\n }\n }\n invitations [u/include](https://www.reddit.com/u/include/)(if: $includeInvitations) {\n id\n email\n role\n invitedBy {\n photoUrl\n }\n }\n }\n}","variables":{"data":{"id":"clorncfeu0000n70h9749mixa"},"includeMembers":false,"includeInvitations":false}}}

after that I brough down the docker containers, tried to set it up locally

  1. docker compose up for infra
  2. migrations
  3. run server & console

and i got the same error this way Thanks for the response!

grski commented 8 months ago

also if you help me out with that I'd be happy to contribute back by improving the readme or docs if I can :)

arielweinberger commented 8 months ago

Cool! Let's stick to the first path of just running docker-compose up. After doing that, can you please inspect the compose stack and make sure all services are up and running (green)?

Also, can you share the logs coming from the server container in the stack?

arielweinberger commented 8 months ago

Update: I think this is caused by an issue with signing up/in via email and password (vs SSO using Google). Will continue to investigate.

grski commented 8 months ago

So, let's start from the start:

git clone https://github.com/pezzolabs/pezzo.git
Cloning into 'pezzo'...
remote: Enumerating objects: 8493, done.
remote: Counting objects: 100% (3772/3772), done.
remote: Compressing objects: 100% (1798/1798), done.
remote: Total 8493 (delta 2433), reused 2537 (delta 1914), pack-reused 4721
Receiving objects: 100% (8493/8493), 27.11 MiB | 24.02 MiB/s, done.
Resolving deltas: 100% (4859/4859), done.
cd pezzo
docker compose up
Failed to load /Users/grski/dev/pezzo/.env.local: open /Users/grski/dev/pezzo/.env.local: no such file or directory
cat apps/server/.env >> .env.local
cat apps/console/.env >> .env.local
cat .env
cat .env.local
PINO_PRETTIFY="true"
DATABASE_URL=postgresql://postgres:postgres@localhost:5433/pezzo
SUPERTOKENS_CONNECTION_URI="http://localhost:3567"
CONSOLE_HOST="http://localhost:4200"
KAFKA_BROKERS="localhost:9092"
OPENSEARCH_URL="http://localhost:9200"
REDIS_URL="redis://localhost:6379"NX_BASE_API_URL="http://localhost:3000"
NX_SUPERTOKENS_API_DOMAIN="http://localhost:3000"
NX_SUPERTOKENS_WEBSITE_DOMAIN="http://localhost:4200"
NX_DEBUG_MODE="true"

then docker ps:

CONTAINER ID   IMAGE                                           COMMAND                   CREATED              STATUS                        PORTS                                                                                                      NAMES
29d72e33f6b1   ghcr.io/pezzolabs/pezzo/console:latest          "./scripts/entrypoin…"    About a minute ago   Up About a minute             80/tcp, 0.0.0.0:4200->8080/tcp, :::4200->8080/tcp                                                          pezzo-pezzo-console-1
2bca6bd8e645   ghcr.io/pezzolabs/pezzo/server:latest           "node main.js"            About a minute ago   Up About a minute (healthy)   0.0.0.0:3000->3000/tcp, :::3000->3000/tcp                                                                  pezzo-pezzo-server-1
a808ada94058   opensearchproject/opensearch-dashboards:2.5.0   "./opensearch-dashbo…"    About a minute ago   Up About a minute (healthy)   0.0.0.0:5601->5601/tcp, :::5601->5601/tcp                                                                  opensearch-dashboards
a041e688a8ef   supertokens/supertokens-postgresql:5.0          "docker-entrypoint.s…"    About a minute ago   Up About a minute (healthy)   0.0.0.0:3567->3567/tcp, :::3567->3567/tcp                                                                  pezzo-supertokens-1
a2e7cb5048c7   redis/redis-stack-server:7.2.0-v0               "/entrypoint.sh"          About a minute ago   Up About a minute (healthy)   0.0.0.0:6379->6379/tcp, :::6379->6379/tcp                                                                  redis-stack-server
b1cadfa3f546   opensearchproject/opensearch:2.5.0              "./opensearch-docker…"    About a minute ago   Up About a minute (healthy)   0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp, 0.0.0.0:9600->9600/tcp, :::9600->9600/tcp, 9650/tcp   opensearch-node1
a07b136255fa   postgres:15-alpine3.17                          "docker-entrypoint.s…"    About a minute ago   Up About a minute (healthy)   0.0.0.0:5433->5432/tcp, :::5433->5432/tcp                                                                  pezzo-postgres-1
538db706616d   nsmithuk/local-kms:latest                       "/bin/sh -c 'echo \"S…"   About a minute ago   Up About a minute             0.0.0.0:9981->9981/tcp, :::9981->9981/tcp 

meaning all is up and running.

grski commented 8 months ago

Then I go through signup - that works. When I click the 'signup' the requests pass but all I see is:

image
grski commented 8 months ago

In the console:

image

localhost-1699570760167.log localhost-1699570750903.log

webrulon commented 8 months ago

I started experiencing the same issue.

grski commented 7 months ago

Any update here? Can I help in any way?

arielweinberger commented 7 months ago

Hey folks, I'm still investigating the root cause. It's pretty recent. If you want to run Pezzo and try it out, I suggest trying v0.6.9 (in the compose files), prior to a recent update we've made, where this is a non issue. Upgrading once fixed should be straightforward - there are no breaking changes. Sorry about that.

grski commented 7 months ago

@arielweinberger thank you, not a problem at all!

Hicham-azer commented 7 months ago

@grski @arielweinberger Hello guys, any updates in this issue? I faced the issue even with v0.6.9 !