Updated dockerfile

Uses git rather than copying. Made it more portable :3
This commit is contained in:
Esther 2021-02-19 16:12:06 +00:00
parent 643c6d0c95
commit 418552349d
No known key found for this signature in database
GPG Key ID: 162A307C5EBD40EA

View File

@ -3,31 +3,10 @@ FROM node:15.8.0
ENV IS_DOCKER=true ENV IS_DOCKER=true
ENV NODE_ENV=production ENV NODE_ENV=production
ARG port RUN git clone https://github.com/BlankFaces/pastel.codes.git
ENV PORT=${port} WORKDIR pastel.codes
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 && npm install nodemon RUN npm install && npm install nodemon
COPY . . COPY . .
CMD [ "npm", "start" ] CMD [ "npm", "start" ]