May 2018
Intermediate to advanced
492 pages
12h 3m
English
In users/package.json add the following line to the scripts section:
"docker": "node --experimental-modules ./user-server","docker-build": "docker build -t node-web-development/userauth ."
Previously, we've put the configuration environment variables into package.json. In this case, the configuration environment variables are in the Dockerfile. This means we need a way to run the server with no environment variables other than those in the Dockerfile. With this scriptsentry, we can do npm run docker and then the Dockerfile environment variables will supply all configuration.
We can build the authentication service as follows:
$ npm run docker-build> user-auth-server@0.0.1 docker-build ...
Read now
Unlock full access