hackbg / undexer

🎉 The Undexer 🎉 Namada network indexer powering https://shielded.live/. See also: https://github.com/hackbg/undexer-node
5 stars 6 forks source link

pnpmi Error #4

Closed shurinov closed 3 months ago

shurinov commented 4 months ago

Hi! I tried to run undexer for housefire chain, but face with that issue:

$ docker compose up -d && docker compose logs -f
[+] Running 3/3
 ✘ pnpmi Error                                                                                                      0.3s
 ! api Warning                                                                                                      0.3s
 ! indexer Warning                                                                                                  0.3s
[+] Building 0.0s (0/0)                                                                                   docker:default
unable to prepare context: path "/home/namadauser/undexer/undexer" not found

before this I have added .env file and build wasm

opsecx commented 4 months ago

Guys I just wanted to say that I got it running now 🙂 (with the help of devs - but not using docker, so probably not very useful, but there is a load of troubleshooting in issue #3 if needed)

shurinov commented 4 months ago

Guys I just wanted to say that I got it running now 🙂 (with the help of devs - but not using docker, so probably not very useful, but there is a load of troubleshooting in issue #3 if needed)

thanks, I ll try to go your way)

mradkov commented 3 months ago

@shurinov is this issue still present?

shurinov commented 3 months ago

@shurinov is this issue still present?

It was fixed.

but it's not clear what variables need to be set in .env for the default docker-compose.yml It would be cool to add an example .env file with parameters suitable for the current compose-file

mradkov commented 3 months ago

but it's not clear what variables need to be set in .env for the default docker-compose.yml It would be cool to add an example .env file with parameters suitable for the current compose-file

There are only 2 variables needed to start the undexer - postgres database url and RPC endpoint. They're documented in the env.example file.

@shurinov is this issue still present?

It was fixed.

I'm closing this issue as resolved. Please open a new one in case needed.

shurinov commented 3 months ago

but it's not clear what variables need to be set in .env for the default docker-compose.yml It would be cool to add an example .env file with parameters suitable for the current compose-file

There are only 2 variables needed to start the undexer - postgres database url and RPC endpoint. They're documented in the env.example file.

@shurinov is this issue still present?

It was fixed.

I'm closing this issue as resolved. Please open a new one in case needed.

what is .env for default config? I tried #DATABASE_URL=postgresql://postgres:insecure@postgres:5432/postgres, DATABASE_URL=postgresql://postgres:insecure@0.0.0.0:5432/postgres and get ```undexer-postgres-1 | 2024-08-02 12:12:45.786 UTC [46] FATAL: no PostgreSQL user name specified in startup packet undexer-indexer-1 | /app/node_modules/.pnpm/sequelize@6.37.3_pg@8.12.0/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:145 undexer-indexer-1 | reject(new sequelizeErrors.ConnectionError(err)); undexer-indexer-1 | ^ undexer-indexer-1 | undexer-indexer-1 | ConnectionError [SequelizeConnectionError]: no PostgreSQL user name specified in startup packet

egasimus commented 3 months ago

Since Docker Compose is currently configured to launch containers in host networking mode, I don't think postgres or 0.0.0.0 hostnames will work - you may be looking for localhost, i.e. postgresql://postgres:insecure@localhost:5432/postgres.

But in general when running in Docker Compose you should not need to set DATABASE_URL, or any other environment variables (except maybe RPC_URL if you're using a non-default RPC endpoint).

See src/config.js for all supported environment variables and their default values.