binding-tariff-classification
The backend service which manages case data for the Advance Tariff Rulings services.
Running
To run this Service you will need:
- Service Manager installed
- SBT Version
>=1.x
installed - MongoDB version
>=3.6
installed and running on port 27017 - Localstack installed and running on port 4572
- Create an S3 bucket in localstack by using
awslocal s3 mb s3://digital-tariffs-local
within the localstack container
The easiest way to run MongoDB and Localstack for local development is to use Docker.
To run MongoDB
> docker run --restart unless-stopped -d -p 27017-27019:27017-27019 --name mongodb mongo:3.6.13
To run Localstack and create the S3 bucket
> docker run -d --restart unless-stopped --name localstack -e SERVICES=s3 -p4572:4566 -p8080:8080 localstack/localstack
> docker exec -it localstack bash
> awslocal s3 mb s3://digital-tariffs-local
> exit
Starting the application:
- Launch dependencies using
sm --start DIGITAL_TARIFF_DEPS -r
- Start the filestore service binding-tariff-filestore using
sm --start BINDING_TARIFF_FILESTORE -r
Use sbt run
to boot the app or run it with Service Manager using sm --start BINDING_TARIFF_CLASSIFICATION -r
.
This application runs on port 9580.
You can also run the DIGITAL_TARIFFS
profile using sm --start DIGITAL_TARIFFS -r
and then stop the Service Manager instance of this service using sm --stop BINDING_TARIFF_CLASSIFICATION
before running with sbt.
Testing
Run ./run_all_tests.sh
. This also runs Scalastyle and does coverage testing.
or sbt test it:test
to run the tests only.
License
This code is open source software licensed under the Apache 2.0 License.