From 7e24e914d19766f4096f3a3cbb70f58a763a8989 Mon Sep 17 00:00:00 2001 From: Fernando Sirni <33009762+fersirni@users.noreply.github.com> Date: Thu, 29 Sep 2022 12:19:25 -0300 Subject: [PATCH] Review/env fix (#6) * README.md fix * env.sample fix --- .env.sample | 4 ++-- README-es.md | 17 ++++++++--------- README.md | 16 ++++++++-------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/.env.sample b/.env.sample index d90258b..ef1581a 100644 --- a/.env.sample +++ b/.env.sample @@ -1,5 +1,5 @@ -NODE_ENV=development -PORT=8080 +NODE_ENV=production +PORT=5000 LOG_NAME=ink-substrate-explorer-api LOG_LEVEL=debug diff --git a/README-es.md b/README-es.md index 41537ce..2395a50 100644 --- a/README-es.md +++ b/README-es.md @@ -139,6 +139,14 @@ El servicio se recargará si realiza ediciones. ## **Levantando el servicio (PROD)** +Para iniciar los contenedores del servicio de backend, la BD y pgAdmin ejecutar el siguiente comando: + +```sh +docker-compose up -d +``` +**Nota**: Se requiere una base de datos postgres en funcionamiento y una conexión válida a un nodo de Substrate. +Opcionalmente, comente el servicio de back-end en el archivo docker-compose si desea ejecutar la imagen localmente. + ## Ejecutar la imagen de Docker del servicio back-end ### Descarga la imagen de DockerHub @@ -157,7 +165,6 @@ docker network create ink-explorer-network docker run -it -p 5000:5000 --network ink-explorer-network --env-file {pathToEnvFile} blockcoders/ink-substrate-explorer-api:latest ``` - #### Verifique que la imagen comenzó a ejecutarse ```sh @@ -171,14 +178,6 @@ CONTAINER ID IMAGE COMMAND f31a7d0fd6c8 blockcoders/ink-substrate-explorer-api "docker-entrypoint.s…" 15 seconds ago Up 14 seconds 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp funny_lumiere ``` -Después de que se inició el servidor, los bloques deberían guardarse en la base de datos. - -Para iniciar tanto el contenedor del servicio de back-end como el contenedor de la base de datos, ejecute: - -```sh -docker-compose up -d -``` - El servicio se conectará al contenedor DB y comenzará a procesar bloques. ## **Testing** diff --git a/README.md b/README.md index 541e9d9..d089f99 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,14 @@ The service will reload if you make edits. ## **Starting the project (PROD)** +To start the backend service, DB and pgAdmin containers run the following command: + +```sh +docker-compose up -d +``` +**Note**: A postgresDB up and running and a valid connection to a substrate node are required. +Optionally comment the backend service in the docker-compose file if you want to run the image locally. + ## Running the Back-end service Docker image ### Download the image from DockerHub @@ -170,14 +178,6 @@ CONTAINER ID IMAGE COMMAND f31a7d0fd6c8 blockcoders/ink-substrate-explorer-api "docker-entrypoint.s…" 15 seconds ago Up 14 seconds 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp funny_lumiere ``` -After the server started, the blocks should be being saved on the DB. - -To start both the Back-end service container and the DB container run: - -```sh -docker-compose up -d -``` - The service will connect to the DB container and start processing blocks. ## **Testing**