From 8e232fc16e16c59d7a090116d29aab7d54d935ad Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Wed, 24 May 2023 15:34:10 +0100 Subject: [PATCH] fix(dockerfiles): fixed spacing issues --- templates/Dockerfile-prod.liquid | 12 ++++++------ templates/Dockerfile.liquid | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/Dockerfile-prod.liquid b/templates/Dockerfile-prod.liquid index e3a91ef..3fc1ac8 100644 --- a/templates/Dockerfile-prod.liquid +++ b/templates/Dockerfile-prod.liquid @@ -8,18 +8,18 @@ WORKDIR /opt/ {%- if packageManager == "yarn" %} COPY package.json yarn.lock ./ RUN yarn config set network-timeout 600000 -g && yarn install --production -{%- else%} +{%- else %} COPY package.json package-lock.json ./ RUN npm config set network-timeout 600000 -g && npm install --only=production -{%- endif%} +{%- endif %} ENV PATH /opt/node_modules/.bin:$PATH WORKDIR /opt/app COPY . . {%- if packageManager == "yarn" %} RUN yarn build -{%- else%} +{%- else %} RUN npm run build -{%-endif%} +{%- endif %} # Creating final production image FROM node:16-alpine @@ -39,5 +39,5 @@ EXPOSE 1337 {%- if packageManager == "yarn" %} CMD ["yarn", "start"] {%- else %} -CMD ["npm", "run","start"] -{%-endif%} +CMD ["npm", "run", "start"] +{%- endif %} \ No newline at end of file diff --git a/templates/Dockerfile.liquid b/templates/Dockerfile.liquid index 5d7f1d0..69406ee 100644 --- a/templates/Dockerfile.liquid +++ b/templates/Dockerfile.liquid @@ -25,11 +25,11 @@ COPY . . {%- if packageManager == "yarn" %} RUN ["yarn", "build"] {%- else %} -RUN ["npm", "run","build"] +RUN ["npm", "run", "build"] {%- endif %} EXPOSE 1337 {%- if packageManager == "yarn" %} CMD ["yarn", "develop"] {%- else %} -CMD ["npm", "run","develop"] +CMD ["npm", "run", "develop"] {% endif %} \ No newline at end of file