Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions call-booking-application/user-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

ENV ADMIN_EMAI=""

CMD [ "npm","start" ]

4 changes: 2 additions & 2 deletions call-booking-application/user-api/utils/mail.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" <admin@deekshithsn.live>', // sender address
from: '"Admin" <admin@okoromellitus@gmail.com>', // 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
Expand Down
25 changes: 19 additions & 6 deletions call-booking-application/user-ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

USER userapi

CMD [ "npm","start" ]