-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update prisma/seed.ts and add Docker and local
installation guide
- Loading branch information
1 parent
f8b819b
commit d87c1e9
Showing
6 changed files
with
199 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: Pre-requisitos | ||
description: Requisitos necesarios para la puesta en marcha del indexador. | ||
--- | ||
|
||
## Clonar repositorio | ||
|
||
Para clonar el repositorio, ejecuta el siguiente comando en tu terminal: | ||
|
||
```bash | ||
git clone https://github.com/Racks-Community/MrCryptoIndexer.git | ||
cd MrCryptoIndexer | ||
``` | ||
|
||
## Copiar variables de entorno | ||
|
||
```bash | ||
cp .env.example .env | ||
``` | ||
|
||
### Configurar variables de entorno | ||
|
||
La única variable de entorno **obligatoria** para configurar es `RPC_URL`, esta es la API de acceso a la blockchain de Polygon. | ||
Las demás pueden dejarse con los valores por defecto (*no recomendable para producción*). | ||
|
||
Puedes conseguirla una propia en (Alchemy)[https://www.alchemy.com/] | ||
|
||
Debería tener un formato similar a este: | ||
``` | ||
RPC_URL=https://polygon-mainnet.g.alchemy.com/v2/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
``` | ||
|
||
|
||
## Levantar el entorno | ||
|
||
Para levantar el entorno, utilizado `docker compose` | ||
|
||
```bash | ||
docker compose up --build -d | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: Pre-requisitos | ||
description: Requisitos necesarios para la puesta en marcha del indexador. | ||
--- | ||
|
||
## Clonar repositorio | ||
|
||
Para clonar el repositorio, ejecuta el siguiente comando en tu terminal: | ||
|
||
```bash | ||
git clone https://github.com/Racks-Community/MrCryptoIndexer.git | ||
cd MrCryptoIndexer | ||
``` | ||
|
||
|
||
## Instalar dependencias | ||
|
||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
## Copiar variables de entorno | ||
|
||
```bash | ||
cp .env.example .env | ||
``` | ||
|
||
### Configurar variables de entorno | ||
|
||
Las únicas variable de entorno **obligatoria** para configurar es `RPC_URL`, esta es la API de acceso a la blockchain de Polygon, y `DATABASE_URL` a la base de datos de PostgreSQL. | ||
|
||
Las demás pueden dejarse con los valores por defecto (*no recomendable para producción*). | ||
|
||
Para la variable `RPC_URL`, puedes conseguir una propia en (Alchemy)[https://www.alchemy.com/] | ||
|
||
Debería tener un formato similar a este: | ||
``` | ||
DATABASE_URL=postgresql://{usario}:{constraseña}@localhost:5432/{nombre de la base de datos} | ||
RPC_URL=https://polygon-mainnet.g.alchemy.com/v2/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
``` | ||
|
||
## Sincronizar la base de datos | ||
|
||
```bash | ||
pnpm db:push | ||
``` | ||
|
||
## Poblar la base de datos | ||
|
||
```bash | ||
pnpm db:seed | ||
``` | ||
|
||
## Levantar el entorno | ||
|
||
```bash | ||
pnpm start | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters