2.42.0 • Published 3 months ago

inventory-service-v2 v2.42.0

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

Inventory Service - PLT - Blue Team

Builds

Developstg-unit stg-sec stg-std stg-build stg-integ
Mastermst-unit mst-sec mst-std mst-build mst-integ

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 --build

MongoDB (Docker container)

Local Connection Details
Hostname: 127.0.0.1
Port: 27017
Username: user
Password: pass
Database: is

Localstack

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: true

For more information on the different options that you can specify please see the serverless documentation: https://serverless.com/framework/docs/providers/aws/guide/functions/