Skip to content

Commit

Permalink
baseimage
Browse files Browse the repository at this point in the history
  • Loading branch information
n1koo committed May 17, 2024
1 parent a339bf4 commit 6d8c078
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 19 deletions.
4 changes: 2 additions & 2 deletions packages/auth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ FROM opencrvs/ocrvs-base:${VERSION}
USER node

WORKDIR /app/packages/commons
COPY --chown=node:node packages/commons/*.json /app/packages/commons/*.json
COPY --chown=node:node packages/commons/*.json /app/packages/commons/
RUN yarn install --production --frozen-lockfile
COPY --chown=node:node packages/commons /app/packages/commons
RUN yarn build


WORKDIR /app/packages/auth
COPY --chown=node:node packages/auth/*.json /app/packages/auth/*.json
COPY --chown=node:node packages/auth/*.json /app/packages/auth/
RUN yarn install --frozen-lockfile
COPY --chown=node:node packages/auth /app/packages/auth
RUN yarn build
Expand Down
5 changes: 2 additions & 3 deletions packages/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ FROM opencrvs/ocrvs-base:${VERSION}
USER node

WORKDIR /app/packages/components
COPY --chown=node:node packages/components/*.json /app/packages/components/*.json
COPY --chown=node:node packages/components/*.json /app/packages/components/
RUN yarn install --frozen-lockfile
COPY --chown=node:node packages/components /app/packages/components
RUN yarn build

ENV CONTENT_SECURITY_POLICY_WILDCARD "{{CONTENT_SECURITY_POLICY_WILDCARD}}"
ENV COUNTRY_CONFIG_URL "THIS_WILL_BE_REPLACED_BY_RUNTIME_ENV_VARIABLE"

WORKDIR /app/packages/client
COPY --chown=node:node packages/client/*.json /app/packages/client/*.json
COPY --chown=node:node packages/client/*.json /app/packages/client/
RUN yarn install --frozen-lockfile
COPY --chown=node:node packages/client /app/packages/client
RUN yarn build
Expand Down
2 changes: 1 addition & 1 deletion packages/components/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ USER node

# Copy packages
WORKDIR /app/packages/components
COPY --chown=node:node packages/components/*.json /app/packages/components/*.json
COPY --chown=node:node packages/components/*.json /app/packages/components/
RUN yarn install --frozen-lockfile
COPY --chown=node:node packages/components /app/packages/components
RUN yarn build-storybook
Expand Down
12 changes: 8 additions & 4 deletions packages/config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ FROM opencrvs/ocrvs-base:${VERSION}

USER node

WORKDIR /app/packages/commons
COPY --chown=node:node packages/commons/*.json /app/packages/commons/
RUN yarn install --production --frozen-lockfile
COPY --chown=node:node packages/commons /app/packages/commons
RUN cd packages/commons && yarn install --production --frozen-lockfile && yarn build

COPY --chown=node:node packages/config /app/packages/config
RUN cd packages/config && yarn install --frozen-lockfile && yarn build
RUN yarn build

WORKDIR /app/packages/config
COPY --chown=node:node packages/config/*.json /app/packages/config/
RUN yarn install --frozen-lockfile
COPY --chown=node:node packages/config /app/packages/config
RUN yarn build

CMD [ "yarn", "start" ]
13 changes: 8 additions & 5 deletions packages/documents/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ FROM opencrvs/ocrvs-base:${VERSION}

USER node

WORKDIR /app/packages/commons
COPY --chown=node:node packages/commons/*.json /app/packages/commons/
RUN yarn install --production --frozen-lockfile
COPY --chown=node:node packages/commons /app/packages/commons
RUN cd packages/commons && yarn install --production --frozen-lockfile && yarn build

COPY --chown=node:node packages/documents /app/packages/documents
RUN cd packages/documents && yarn install --frozen-lockfile && yarn build
RUN yarn build

WORKDIR /app/packages/documents

COPY --chown=node:node packages/documents/*.json /app/packages/documents/
RUN yarn install --frozen-lockfile
COPY --chown=node:node packages/documents /app/packages/documents
RUN yarn build

CMD [ "yarn", "start:prod" ]
12 changes: 8 additions & 4 deletions packages/gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ FROM opencrvs/ocrvs-base:${VERSION}

USER node

WORKDIR /app/packages/commons
COPY --chown=node:node packages/commons/*.json /app/packages/commons/
RUN yarn install --production --frozen-lockfile
COPY --chown=node:node packages/commons /app/packages/commons
RUN cd packages/commons && yarn install --production --frozen-lockfile && yarn build

COPY --chown=node:node packages/gateway /app/packages/gateway
RUN cd packages/gateway && yarn install --frozen-lockfile && yarn build
RUN yarn build

WORKDIR /app/packages/gateway
COPY --chown=node:node packages/gateway/*.json /app/packages/gateway/
RUN yarn install --frozen-lockfile
COPY --chown=node:node packages/gateway /app/packages/gateway
RUN yarn build

CMD [ "yarn", "start:prod" ]

0 comments on commit 6d8c078

Please sign in to comment.