Gateway Service with Spring Cloud for Bootcamp Bank Project!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This is a Gateway Service with Spring Cloud for Bootcamp Bank Project.
This section list any major frameworks/libraries used to bootstrap this project.
This is an example of how you may setting up your project locally. To get a local copy up and running follow these simple example steps.
-
JRE 11
https://adoptium.net/es/temurin/releases
-
Apache Maven 3.8.5
https://maven.apache.org/download.cgi/
Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.
-
Clone the repo
git clone https://github.com/BOOTCAMP-BANK-PROJECT/gateway-server.git
-
Install Maven dependencies
mvn clean install package
This will generate the next files:
./target/app-jar-with-dependencies.jar ./target/app.jar ./target/app.jar.original
-
Copy the
./config-server-example/gateway-server.yml
file to your config-server-properties repository and customize it.
To build a docker image of the jar in a docker image run the following command.
docker build -t my_user/spring-gateway-server:0.0.1-SNAPSHOT .
First of all, you need to add the next environment variables to your Operating System:
CONFIG_SERVER_URI: "config_service_url, like 192.168.0.9:8081"
SECURITY_USERNAME: "app_security_username, root by default"
SECURITY_PASSWORD: "app_security_password, 1234 by default"
To run the service with Java run the following command.
java -jar ./target/app.jar
To use it with docker-compose you must duplicate the docker-compose.override.example.yml
file and rename it as docker-compose.override.yml
,
then modify the yml file according to your requirements.
To run the service with docker-compose run the following command.
docker-compose up -d
To test if the service is working correctly, go the following URL (port 8089 by default):
http://localhost:8080/
Distributed under the MIT License. See MIT LICENSE
for more information.