diff --git a/call-booking-application/user-api/Dockerfile b/call-booking-application/user-api/Dockerfile index 9b2e8b0..a13135c 100644 --- a/call-booking-application/user-api/Dockerfile +++ b/call-booking-application/user-api/Dockerfile @@ -1,11 +1,27 @@ FROM node:17.9.0-slim -LABEL maintainer="DeekshithSN" + +LABEL maintainer="mellitus okoro" + RUN useradd userapi -WORKDIR /app -COPY . . -RUN npm install + +WORKDIR /sr/src/app + +COPY . . + +RUN npm install + +RUN --mount=type=bind,source=package.json,target=package.json \ + --mount=type=bind,source=package-lock.json,target=package-lock.json \ + --mount=type=cache,target=/root/.npm \ + npm ci --omit=dev + EXPOSE 1004 + USER userapi + ENV MONGO_URL="" -ENV ADMIN_EMAIL="" -CMD ["npm","start"] \ No newline at end of file + +ENV ADMIN_EMAI="" + +CMD [ "npm","start" ] + diff --git a/call-booking-application/user-api/utils/mail.js b/call-booking-application/user-api/utils/mail.js index e558c8a..fd9d653 100644 --- a/call-booking-application/user-api/utils/mail.js +++ b/call-booking-application/user-api/utils/mail.js @@ -7,14 +7,14 @@ exports.sendMail = async (to="bar@example.com", name="User Name", forRole="user" port: 587, secure: false, // true for 465, false for other ports auth: { - user: 'admin@deekshithsn.live ', // generated ethereal user + user: 'okoromellitus@gmail.com ', // generated ethereal user pass: '****', // generated ethereal password }, }); // send mail with defined transport object let info = await transporter.sendMail({ - from: '"Admin" ', // sender address + from: '"Admin" ', // sender address to, // list of receivers subject: "Booking Confirmation ✔", // Subject line text: "Your booking is confirmed. Somebody from the team contact you soon.", // plain text body diff --git a/call-booking-application/user-ui/Dockerfile b/call-booking-application/user-ui/Dockerfile index b2f1bc8..ed557b9 100644 --- a/call-booking-application/user-ui/Dockerfile +++ b/call-booking-application/user-ui/Dockerfile @@ -1,9 +1,22 @@ FROM node:17.9.0-slim -LABEL maintainer="DeekshithSN" + +LABEL maintainer="mellitus okoro" + RUN useradd userui -WORKDIR /app -COPY . . -RUN npm install + +WORKDIR /sr/src/app + +COPY . . + +RUN npm install + +RUN --mount=type=bind,source=package.json,target=package.json \ + --mount=type=bind,source=package-lock.json,target=package-lock.json \ + --mount=type=cache,target=/root/.npm \ + npm ci --omit=dev + EXPOSE 3000 -USER userui -CMD ["npm","start"] \ No newline at end of file + +USER userapi + +CMD [ "npm","start" ]