Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Extract storage package from backend
  • Loading branch information
jdleesmiller committed May 23, 2020
1 parent 2419e7f commit 89212a4
Show file tree
Hide file tree
Showing 18 changed files with 1,685 additions and 526 deletions.
12 changes: 11 additions & 1 deletion todo/Dockerfile
Expand Up @@ -3,10 +3,18 @@
#
FROM node:12 AS development-backend

RUN mkdir -p /srv/todo/backend && chown -R node:node /srv/todo
RUN mkdir -p /srv/todo/backend &&\
mkdir -p /srv/todo/storage &&\
chown -R node:node /srv/todo

USER node

WORKDIR /srv/todo/storage

COPY --chown=node:node storage/package.json storage/package-lock.json ./

RUN npm install --quiet

WORKDIR /srv/todo/backend

COPY --chown=node:node backend/package.json backend/package-lock.json ./
Expand Down Expand Up @@ -48,6 +56,8 @@ WORKDIR /srv/todo/backend

COPY --from=development-backend --chown=root:root /srv/todo/backend/node_modules ./node_modules

COPY --from=development-backend --chown=root:root /srv/todo/storage/node_modules ../storage/node_modules

COPY --from=build-frontend --chown=root:root /srv/todo/frontend/dist ./dist

COPY . .
Expand Down

0 comments on commit 89212a4

Please sign in to comment.