Skip to content

Commit

Permalink
adds build args
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronschweig committed Mar 18, 2021
1 parent c1dd988 commit ab0d946
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
FROM node:latest as build

WORKDIR /app

ARG MONGO_CONNECTION_ARG
ARG JWT_SECRET_ARG
ARG REDIS_HOST_ARG
ARG REDIS_PORT_ARG
ARG REDIS_USER_ARG
ARG REDIS_PW_ARG
ARG REDIS_DB_ARG

ENV MONGO_CONNECTION=$MONGO_CONNECTION_ARG
ENV JWT_SECRET=$JWT_SECRET_ARG
ENV REDIS_HOST=$REDIS_HOST_ARG
ENV REDIS_PORT=$REDIS_PORT_ARG
ENV REDIS_USER=$REDIS_USER_ARG
ENV REDIS_PW=$REDIS_PW_ARG
ENV REDIS_DB=$REDIS_DB_ARG

COPY *.json ./
COPY yarn.lock .
RUN yarn install --link-duplicates --ignore-optional


COPY ./ ./
RUN yarn build
RUN yarn install --production --link-duplicates --ignore-optional
Expand Down

0 comments on commit ab0d946

Please sign in to comment.