Dockerfile 706 Bytes
Newer Older
Sam Galson's avatar
Sam Galson committed
1 2 3
FROM pubsweet/pubsweet:base

COPY package.json yarn.lock ./
4
COPY lerna.json .eslintignore .eslintrc .prettierrc .stylelintignore .stylelintrc commitlint.config.js ./
Sam Galson's avatar
Sam Galson committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
COPY packages packages

RUN [ "yarn", "config", "set", "workspaces-experimental", "true" ]

# We do a development install because react-styleguidist is a dev dependency
RUN [ "yarn", "install", "--frozen-lockfile" ]

# Remove cache and offline mirror
RUN [ "yarn", "cache", "clean"]
RUN [ "rm", "-rf", "/npm-packages-offline-cache"]

ENV NODE_ENV "production"

WORKDIR ${HOME}/packages/ui
RUN [ "npm", "run", "styleguide:build" ]
# Create file for kubernetes health checks
RUN touch ./styleguide/health

EXPOSE 3000

WORKDIR ${HOME}
CMD []