From 910f5d09396abf4c97b24a2af4d93add356e733b Mon Sep 17 00:00:00 2001 From: Hernan Hegykozi <hhegykozi@srt.gob.ar> Date: Tue, 5 Apr 2022 17:11:26 -0300 Subject: [PATCH] Update README.md --- README.md | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index e37e4b1..2f91c1b 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,33 @@ -# Introduction -TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project. +# API REST - Sello de Tiempo v1 # -# Getting Started -TODO: Guide users through getting your code up and running on their own system. In this section you can talk about: -1. Installation process -2. Software dependencies -3. Latest releases -4. API references +La aplicacion fue desarrollada en NodeJs utilizando el framework Express. +Fue basada en los repositorios de Renzo Mauro Ontivero https://gitlab.bfa.ar/renn_um/tsa1 y de Patricio Kumagae https://gitlab.bfa.ar/pkumagae/TsaAPI -# Build and Test -TODO: Describe and show how to build your code and run the tests. +La idea era desarrollar una api muy simple que cumpla con el propósito y cumpliendo con la misma interfaz que la API V1 original (https://gitlab.bfa.ar/blockchain/TSA) +Permite instalarla por fuera del nodo transaccional (opentx) , tanto en un server tradicional como tambien en contenedores docker. -# Contribute -TODO: Explain how other users and developers can contribute to make your code better. +# Instalacion en Docker +Iniciar la consola en el servidor donde se encuentra alojado el servicio de docker -If you want to learn more about creating good readme files then refer the following [guidelines](https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops). You can also seek inspiration from the below readme files: -- [ASP.NET Core](https://github.com/aspnet/Home) -- [Visual Studio Code](https://github.com/Microsoft/vscode) -- [Chakra Core](https://github.com/Microsoft/ChakraCore) \ No newline at end of file +* Luego descargar la apliacion +``` +sudo git clone https://gitlab.bfa.ar/hhegykozi/tsa1.git +cd [nombre_repo] +``` +* Compilar la imagen +``` +docker build -t bfa/apitsa1:latest . +``` + +El contenedor posee 3 variables de entorno que deben ser enviadas al momento de su ejecucion: + +``` +ACCOUNTADDRESS: 0x25UHf0...... (direccion de la cuenta) +ACCOUNTPRIVATEKEY: 58HYUF5GHY5D...... (Clave privada de la cuenta) +SERVER: http://10.0.0.6:8545 (URL del servidor donde se encuentra el nodo transaccional opentx) +``` + +Crear el contenedor: +``` +docker run -d --name apitsa1 -p 3030:3030 -e ACCOUNTADDRESS='0x25UHf0......' -e ACCOUNTPRIVATEKEY='58HYUF5GHY5D......' -e SERVER='http://10.0.0.6:8545' bfa/apitsa1 +``` -- GitLab