Skip to content

Commit

Permalink
fix(dockerfiles): fixed spacing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Eventyret committed May 24, 2023
1 parent 27c23ba commit 8e232fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions templates/Dockerfile-prod.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,5 +39,5 @@ EXPOSE 1337
{%- if packageManager == "yarn" %}
CMD ["yarn", "start"]
{%- else %}
CMD ["npm", "run","start"]
{%-endif%}
CMD ["npm", "run", "start"]
{%- endif %}
4 changes: 2 additions & 2 deletions templates/Dockerfile.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

0 comments on commit 8e232fc

Please sign in to comment.