16:25 ~/src/energy-manager (integration) $ docker-compose -f src/main/docker/app.yml up
ERROR: The Compose file './src/main/docker/app.yml' is invalid because:
services.energymanager-app.environment contains an invalid type, it should be an object, or an array
services.energymanager-app.ports is invalid: Invalid port "{'8081:8081': None}", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]
services.energymanager-app.ports contains an invalid type, it should be a string, or a number
Here is my energy-manager/src/main/docker/app.yml
version: '2'
services:
energymanager-app:
build: ../../..
container_name: energymanager-app
environment:
ports:
8081:8081:
Motivation for or Use Case
The docker compose command should work out of the box
16:42 ~/src/energy-manager (integration) $ jhipster info
INFO! Using JHipster version installed locally in current project's node_modules
INFO! No custom sharedOptions found within blueprint: generator-jhipster-nodejs at /Users/frankliu/src/energy-manager/node_modules/generator-jhipster-nodejs
INFO! Executing jhipster:info
INFO! Options: from-cli: true
Welcome to the JHipster Information Sub-Generator
Overview of the issue
I tried to run the docker image following the instructions here on a newly created jhipster nodejs project https://www.jhipster.tech/docker-compose/
16:25 ~/src/energy-manager (integration) $ docker-compose -f src/main/docker/app.yml up ERROR: The Compose file './src/main/docker/app.yml' is invalid because: services.energymanager-app.environment contains an invalid type, it should be an object, or an array services.energymanager-app.ports is invalid: Invalid port "{'8081:8081': None}", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol] services.energymanager-app.ports contains an invalid type, it should be a string, or a number
Here is my energy-manager/src/main/docker/app.yml version: '2' services: energymanager-app: build: ../../.. container_name: energymanager-app environment: ports:
Motivation for or Use Case
The docker compose command should work out of the box
Reproduce the error
Related issues
Suggest a Fix
JHipster Version(s)
"generator-jhipster": "6.8.0", "generator-jhipster-nodejs": "1.0.2",
JHipster configuration
16:42 ~/src/energy-manager (integration) $ jhipster info INFO! Using JHipster version installed locally in current project's node_modules INFO! No custom sharedOptions found within blueprint: generator-jhipster-nodejs at /Users/frankliu/src/energy-manager/node_modules/generator-jhipster-nodejs INFO! Executing jhipster:info INFO! Options: from-cli: true Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
git version 2.20.1 (Apple Git-117)
node: v12.16.2
npm: 6.14.4
yarn: 1.22.4
Docker version 19.03.8, build afacb8b
docker-compose version 1.25.5, build 8a1c60f6
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System