After downloading ( https://github.com/strongloop/loopback-example-user-management ), installing, “npm install” (it is a Node.js application) only a few steps are required to get the program up and running:
In the file server/datasources.json you have to specify a mail server and a sender mail adress.
In the file server/config.json you have to specify a host and a port (The host must not contain 0.0.0.0, the current address must be present. It is used internally for preparing the confirmation link for the email verification).
That’s all. You can get the program running by e.g. with “node .”.
(I now suspect that the error is in the Dockerfile, but I’m already too exhausted to deal with it again.)
This is my Dockerfile:
FROM node:12.16-alpine AS build
ENV NODE_ENV production
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install --quiet
COPY . .
RUN mkdir /permstorage
VOLUME /permstorage
EXPOSE 3017
CMD [“node”, “server/server.js”]
I did it with:
docker build -t tracks_docker
With:
docker run tracks_docker
I get in the Chrome browser on Windows:
"This page is not working
127.0.0.1 has not sent any data.
ERR_EMTY_RESPONSE
Under ubuntu 18.04 I get
“Error: listen EADDRNOTAVAIL: address not available 167.86.117.241:3017”
And then the Dockerfile of my app, based on example-user-management, also not working:
FROM node:12.16-alpine AS build
ENV NODE_ENV production
COPY package*.json ./
RUN apk update && apk add --no-cache --virtual .gyp python make g++ &&
npm install --quiet node-gyp -g
RUN npm install --quiet
RUN pwd
WORKDIR /usr/src/app
COPY . /
RUN ls -la /
RUN pwd
RUN cd / && node-gyp clean && node-gyp configure && node-gyp build
FROM node:12.16-alpine
COPY --from=build . .
RUN mkdir /permstorage
VOLUME /permstorage
EXPOSE 3017
ENTRYPOINT [“node”]
CMD ["./server/server.js"]
Thanks in advance for your help
Gert