We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have add the config.js file
var convict = require('convict'); convict.addFormat(require('convict-format-with-validator').ipaddress); // Define a schema const config = convict({ env: { doc: 'The application environment.', format: ['production', 'development', 'test'], default: 'development', env: 'NODE_ENV' }, ip: { doc: 'The IP address to bind.', format: 'ipaddress', default: '127.0.0.1', env: 'IP_ADDRESS', arg: 'host' }, port: { doc: 'The port to bind.', format: 'port', default: 1234, env: 'PORT', arg: 'port' }, redis: { db: { doc: 'Redis DB', format: Number, default: 0, env: 'REDIS_DB', }, host: { doc: 'Redis Host', format: String, default: 'localhost', env: 'REDIS_HOST', }, password: { doc: 'Redis Password', format: String, default: '', env: 'REDIS_PASSWORD', }, port: { doc: 'Redis Port', format: Number, default: 6379, env: 'REDIS_PORT', }, }, }) // Perform validation config.validate({allowed: 'strict'}); module.exports = config;
and the project will be run in docker
when I run
docker run -it -p 30112:30112 -e REDIS_PORT=30012 xx-nodejs
the project still run with the REDIS_PORT equals 6379
Is there some steps I miss?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have add the config.js file
and the project will be run in docker
when I run
the project still run with the REDIS_PORT equals 6379
Is there some steps I miss?
The text was updated successfully, but these errors were encountered: