Files
talk/Dockerfile
T
Kiwi 097294909b [next] Embed: Defer login/logout until ready (#2123)
* feat: Embed defer login/-out until ready

* fix: make remove work with lazy render

* fix: typo

* fix: another typo

* fix: test

* chore: replace query-string for querystringify

* fix: types

* chore: small refactor

* feat: added webpack analzyer

* chore: rename compile -> generate

* fix: fix scripts and improve bundle size

* fix: lodash webpack plugin
2018-12-15 00:07:09 +00:00

43 lines
921 B
Docker

FROM node:8-alpine
# Install build dependancies.
RUN apk --no-cache add git
# Create app directory.
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Setup the environment for production.
ENV NODE_ENV production
# Bundle application source.
COPY . /usr/src/app
# Install build static assets and clear caches.
RUN NODE_ENV=development npm install && \
npm run generate && \
npm run build && \
npm prune --production
FROM node:8-alpine
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Copy the compiled source into the new stage.
COPY --from=0 /usr/src/app .
# Setup the environment
ENV PATH /usr/src/app/bin:$PATH
ENV PORT 5000
EXPOSE 5000
ENV NODE_ENV production
# Store the current git revision.
ARG REVISION_HASH
RUN mkdir dist/core/common/__generated__ && \
echo "{\"revision\": \"${REVISION_HASH}\"}" > dist/core/common/__generated__/revision.json
CMD ["npm", "run", "start"]