diff --git a/README-PT.md b/README-PT.md index 4743284..059cb82 100644 --- a/README-PT.md +++ b/README-PT.md @@ -46,19 +46,14 @@ Neste projeto, estou usando um banco de dados Postgres para armazenar informaƧ - Atualize as variƔveis com suas credenciais de banco de dados. 4. Executando o Servidor: - - Usando Docker: + - Usando Docker (Linux): ```bash - docker build -t rest-api-c . - docker run -d -p 8080:80 --name rest-api-c rest-api-c + ./docker_run.sh ``` - Sem Docker (Linux): ```bash ./main_run.sh ``` - - Sem Docker (Windows): - ```bash - ./main_run.bat - ``` 5. Acesse o servidor em `http://localhost:8080/` no seu navegador. ## Endpoints diff --git a/README.md b/README.md index d445334..f7299ad 100644 --- a/README.md +++ b/README.md @@ -47,19 +47,13 @@ In this project, I'm using a Postgres database to store user information. The da - Update the variables with your database credentials. 4. Running the Server: - - Using Docker: + - Using Docker (Linux): ```bash - docker build -t rest-api-c . - docker run -d -p 8080:80 --name rest-api-c rest-api-c + ./scripts/docker_run.sh ``` - Without Docker (Linux): ```bash - ./main_run.sh - ``` - - Without Docker (Windows): - ```bash - make - ./bin/main + ./scripts/main_run.sh ``` 5. Access the API at http://localhost:8080 diff --git a/bin/main b/bin/main index b8b2342..b1a7583 100755 Binary files a/bin/main and b/bin/main differ diff --git a/build.sh b/scripts/build.sh old mode 100755 new mode 100644 similarity index 95% rename from build.sh rename to scripts/build.sh index f6b5876..00b3a8a --- a/build.sh +++ b/scripts/build.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd .. set -e diff --git a/docker_run.sh b/scripts/docker_run.sh old mode 100755 new mode 100644 similarity index 96% rename from docker_run.sh rename to scripts/docker_run.sh index 2b48320..7bf0b45 --- a/docker_run.sh +++ b/scripts/docker_run.sh @@ -1,5 +1,7 @@ #!/bin/bash +cd .. + CONTAINER_NAME="rest-api-c" docker rm -f "$CONTAINER_NAME" >/dev/null 2>&1 diff --git a/main_run.sh b/scripts/main_run.sh old mode 100755 new mode 100644 similarity index 84% rename from main_run.sh rename to scripts/main_run.sh index ed2f314..9bb1cd2 --- a/main_run.sh +++ b/scripts/main_run.sh @@ -6,4 +6,4 @@ set -e echo "Executando o programa..." -./bin/main +../bin/main