Hello There,
I am attempting to get sample implementation code for TMF622 running in a Docker container on my local Windows PC.
I have created a docker-compose file with the following entries.
version: '3.9'
services:
mongo:
image: mongo:latest
container_name: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: mongodb
MONGO_INITDB_ROOT_PASSWORD: mongodb
ports: ['27017:27017']
volumes: ['tmf:/data/db']
tmf622:
build: .
image: tmforumorg/api-productorderingmanagement_tmf-622:5.0.0
container_name: product
ports: ['8622:8622']
stdin_open: true
tty: true
environment:
- dbhost=mongo
- dbport=27017
volumes:
tmf: {}
I have run,
docker build .
docker compose up
Everything seems to be running smoothly, I can get to the URL's and can see the swagger page, I can get to the DB via MongoCompass, but when I try to run create product example in swagger I get the following error.
2023-12-18 16:17:47 product | info: Service::serve: POST createProductOrder
2023-12-18 16:17:47 product | info: Service::create: createProductOrder ProductOrder
2023-12-18 16:17:47 product | info: ... replace requestedCompletionDate with native Date type
2023-12-18 16:17:47 product | info: ... replace requestedStartDate with native Date type
2023-12-18 16:17:47 product | info: ... replace date with native Date type
2023-12-18 16:17:47 product | info: ... processMissingProperties: ProductOrder
2023-12-18 16:17:47 product | info: populateMandatoryAttributes: type=ProductOrder
2023-12-18 16:17:47 product | info: ... processExcludedInPost: ProductOrder ProductOrder_Create
2023-12-18 16:17:47 product | info: ... processExcludedInPost: undefined not found
2023-12-18 16:18:17 product | info: mongo::connect err=MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
2023-12-18 16:18:17 product | info: mongo::create error=MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
2023-12-18 16:18:17 product | info: handleRequest:: error={
2023-12-18 16:18:17 product | "error": {
2023-12-18 16:18:17 product | "code": "1",
2023-12-18 16:18:17 product | "reason": "Internal database error",
2023-12-18 16:18:17 product | "message": "Internal Server Error"
2023-12-18 16:18:17 product | },
2023-12-18 16:18:17 product | "code": 500
2023-12-18 16:18:17 product | }
Regards Bryn
------------------------------
Bryn Langdown
Aussie Broadband Limited
------------------------------