Updated dockerfile

This commit is contained in:
Esther 2021-02-15 02:30:46 +00:00
parent 84c82f6a56
commit 4d73294d4a
No known key found for this signature in database
GPG Key ID: 162A307C5EBD40EA
2 changed files with 24 additions and 11 deletions

View File

@ -2,5 +2,6 @@ node_modules/
logs/
.git/
.gitignore
.secrets
dockerfile
README.md

View File

@ -1,21 +1,33 @@
FROM node:15.8.0
ARG port =
ENV PORT=${port}
ENV IS_DOCKER=true
ENV NODE_ENV=production
ENV GHOST_KEY=
ENV HCAPTCHA_KEY=
ENV SENDGRID_API_KEY=
ENV TO_MAIL_USER=
ENV REPLY_TO_MAIL=
ENV FROM_MAIL_USER=
ARG port
ENV PORT=${port}
EXPOSE ${port}/tcp
ARG ghost_key
ENV GHOST_KEY=${ghost_key}
ARG hcaptcha_key
ENV HCAPTCHA_KEY=${hcaptcha_key}
ARG sendgrid_key
ENV SENDGRID_API_KEY=${sendgrid_key}
ARG mail_to
ENV TO_MAIL_USER=${mail_to}
ARG reply_to
ENV REPLY_TO_MAIL=${reply_to}
ARG mail_from
ENV FROM_MAIL_USER=${mail_from}
WORKDIR /app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install
RUN npm install && npm install nodemon
COPY . .
CMD [ "npm", "start" ]
EXPOSE ${port}/tcp