Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easy to spin up a dev environment #12

Open
0xmichalis opened this issue Jul 15, 2023 · 5 comments
Open

Make it easy to spin up a dev environment #12

0xmichalis opened this issue Jul 15, 2023 · 5 comments

Comments

@0xmichalis
Copy link

0xmichalis commented Jul 15, 2023

A couple of suggestions:

  1. add docker-compose with a Postgres container
version: '3'
services:
  postgres:
    image: postgres
    ports:
      - '5432:5432'
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: password
      POSTGRES_DB: ethereum
  1. automate running migrations in the database maybe with a second container that retries until it successfully applies the migrations in the DB
  2. automate filling up event logs in case the table is empty
  3. add config.env.example with default values matching Postgres username/pass set above
DATABASE_URL_INDEXA=postgres://user:password@0.0.0.0:5432/ethereum
DATABASE_URL_NFT=postgres://user:password@0.0.0.0:5432/nft
// ...

Then one can quickly start testing adapters with the following commands:

cp config.env.example config.env
docker-compose up -d
node src/adapters/test.js --marketplace=blur
@slasher125
Copy link
Collaborator

gm.

i agree the current repo makes it impossible to use it externally.
just wondering how the above would be of help cause you'd first need to create an indexed event log table based on our event_logs schema from indexa repo in order to run the test cmds

do u have a specific marketplace in mind which u'd want us to integrate?

@0xmichalis
Copy link
Author

0xmichalis commented Jul 18, 2023

just wondering how the above would be of help cause you'd first need to create an indexed event log table based on our event_logs schema from indexa repo in order to run the test cmds

Can't this be part of the automation proposed in OP? The script that does the migration should also create the event log table (step 2).

@slasher125
Copy link
Collaborator

but that table (event_logs) then won't have any data which is required for getting the test cmd to produce anything.

so not sure how the created table itself will be of help (sure, somewhat less manual work but would still require to fill it)

@0xmichalis
Copy link
Author

0xmichalis commented Jul 19, 2023

@slasher125 what is required to fill up the table? It should be possible to automate whatever precondition is required in order to get into a one-click setup.

@slasher125
Copy link
Collaborator

can't share specifics cause the repo which builds event_logs is private and not managed by me.

so its not that straightforward automating the setup for nft_server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants