BOOTCAMP-BANK-PROJECT / config-server

Config Server for Bootcamp Bank Project
MIT License
0 stars 0 forks source link

Contributors MIT License LinkedIn


CONFIG SERVICE PROJECT

Config Server for Bootcamp Bank Project!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This is a Config Server for Bootcamp Bank Project.

Built With

This section list any major frameworks/libraries used to bootstrap this project.

(back to top)

Getting Started

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.

Prerequisites

Installation

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.

  1. Clone the repo
    git clone https://github.com/BOOTCAMP-BANK-PROJECT/config-server.git
  2. 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

(back to top)

Usage

To build a docker image of the jar in a docker image run the following command.

   docker build -t my_user/spring-config-server:0.0.1-SNAPSHOT .


First of all, you need to add the next environment variables to your Operating System:

GIT_USERNAME: "my_github_username"
GIT_PASSWORD: "my_github_token_or_password"
GIT_URI: "my_github_config_repo_url"
GIT_CONFIG_SEARCH_PATHS: "my_github_config_repo_base_path"
SECURITY_USERNAME: "app_security_username"
SECURITY_PASSWORD: "app_security_password"


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, test by sending the following HTTP Request:

http://root:root@localhost:8081/config-service/default/main/bootstrap.yml

as

http://security_user_name:security_user_password@localhost:8081/application_name/profile/git_branch/config_file_path


More information about the previous uri:

Path Description
/{app}/{profile} Configuration data for app in Spring profile (comma-separated).
/{app}/{profile}/{label} Add a git label
/{app}/{profiels}{label}/{path} An environment-specific plain text config file (at "path")

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)