Skip to content

Latest commit

 

History

45 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

one-network-integration-service

Quick Start

  1. Fork/clone this repository from GitHub.
git clone https://github.com/OpenLMIS/one-network-integration-service.git
  1. Add an environment file called .env to the root folder of the project, with the required project settings and credentials. For a starter environment file, you can use this one. e.g.
cd one-network-integration-service
curl -o .env -L https://raw.githubusercontent.com/OpenLMIS/openlmis-ref-distro/master/settings-sample.env
  1. Develop w/ Docker by running docker-compose run --service-ports one-network-integration-service. See Developing w/ Docker. You should now be in an interactive shell inside the newly created development environment.
  2. Run gradle build to build. After the build steps finish, you should see 'Build Successful'.
  3. Start the service with gradle bootRun. Once it is running, you should see 'Started Application in NN seconds'. Your console will not return to a prompt as long as the service is running. The service may write errors and other output to your console.
  4. You must authenticate to get a valid access_token before you can use the service. Follow the Security instructions to generate a POST request to the authorization server at http://localhost:8081/. You can use a tool like Postman to generate the POST. The authorization server will return an access_token which you must save for use on requests to this OpenLMIS service. The token will expire with age, so be ready to do this step often.
  5. Go to http://localhost:8080/?access_token=<yourAccessToken> to see the service name and version. Note: If localhost does not work, the docker container with the service running might not be bridged to your host workstation. In that case, you can determine your Docker IP address by running docker-machine ip and then visit http://<yourDockerIPAddress>:8080/.

Build Deployment Image

The specialized docker-compose.builder.yml is geared toward CI and build servers for automated building, testing and docker image generation of the service.

Before building the deployment image, make sure you have a .env file as outlined in the Quick Start instructions.

> docker-compose -f docker-compose.builder.yml run builder
> docker-compose -f docker-compose.builder.yml build image

Downloading SFTP Host Key

SFTP Host key is needed for application to run. It's possible to download it via terminal using command:

ssh-keyscan -t rsa host-address.com > file

Copy this key from the file (without host-address.com ssh-rsa) and save as sftpHostKey.txt

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

12 watching

Forks

Releases

Packages

Contributors

Languages