inventory-service-v2 v2.42.0
Inventory Service - PLT - Blue Team
Builds
| Develop | |
| Master |
Contributing
We've set up a separate document for developers.
Local Development
Setup with Docker
You can setup and start the local environment using the docker-compose command:
docker-compose up --buildMongoDB (Docker container)
Local Connection Details
Hostname: 127.0.0.1
Port: 27017
Username: user
Password: pass
Database: isLocalstack
Services
The services enabled are specified within the docker-compose.yml file. See (https://github.com/localstack/localstack#using-docker-compose) for the different options available.
Startup Scripts
A init startup script runs after Localstack services are up and running (./docker/localstack/init.sh). Within this file we can specify certain AWS CLI commands to create specific recources required for the test environment. To interact with the Localstack service endpoints we can use the awslocal CLI instead of aws as it will point to the correct endpoints by default.
Serverless Offline
Defining Lambda functions:
Serverless Offline plugin is being used to provide an invocatable URI for the Lambda functions defined within this repository. You can definte these within the serverless.yml file like so:
functions:
example:
handler: dist/example/index.example
events:
- http:
path: example
method: get
cors: trueFor more information on the different options that you can specify please see the serverless documentation: https://serverless.com/framework/docs/providers/aws/guide/functions/