<commit_before>FROM node:6.10.3-alpine

# Common ENV
ENV API_SECRET="This is a local API secret for everyone. BsscSHqSHiwrBMJsEGqbvXiuIUPAjQXU" \
    SERVER_SECRET="This needs to be the same secret everywhere. YaHut75NsK1f9UKUXuWqxNN0RUwHFBCy" \
    LONGTERM_KEY="<KEY>" \
    DISCOVERY_HOST=hakken:8000 \
    PUBLISH_HOST=hakken \
    METRICS_SERVICE="{ \"type\": \"static\", \"hosts\": [{ \"protocol\": \"http\", \"host\": \"highwater:9191\" }] }" \
    USER_API_SERVICE="{ \"type\": \"static\", \"hosts\": [{ \"protocol\": \"http\", \"host\": \"shoreline:9107\" }] }" \
    SEAGULL_SERVICE="{ \"type\": \"static\", \"hosts\": [{ \"protocol\": \"http\", \"host\": \"seagull:9120\" }] }" \
    GATEKEEPER_SERVICE="{ \"type\": \"static\", \"hosts\": [{ \"protocol\": \"http\", \"host\": \"gatekeeper:9123\" }] }" \
    PORT=3000 \
    MOCK=false \
    DEV_TOOLS=true \
    WEBPACK_DEVTOOL="cheap-module-eval-source-map" \
    API_HOST="http://localhost:8009" \
    UPLOAD_API="http://localhost/uploader"

WORKDIR /app

COPY package.json /app/package.json

RUN apk add --no-cache fontconfig \
 && apk add --no-cache --virtual .build-deps curl git \
 && echo "Fixing PhantomJS to run on alpine" \
 && curl -Ls "https://github.com/tidepool-org/tools/raw/master/alpine_phantomjs_dependencies/dockerized-phantomjs.tar.xz" | tar xJ -C / \
 && mkdir /app/dist && chown node:node -R /app \
 && mkdir -p /@tidepool/viz/node_modules && chown node:node -R /@tidepool/viz \
 && mkdir -p /tideline/node_modules && chown node:node -R /tideline \
 && mkdir -p /tidepool-platform-client/node_modules && chown node:node -R /tidepool-platform-client \
 && apk del .build-deps \
 && rm -rf /usr/share/man /tmp/* /var/tmp/* /root/.npm /root/.node-gyp

USER node

RUN yarn install

COPY . /app

VOLUME /app
VOLUME /app/node_modules
VOLUME /@tidepool/viz/node_modules
VOLUME /tideline/node_modules
VOLUME /tidepool-platform-client/node_modules
<commit_msg>Small change to blip dockerfile for node_modules perms<commit_after>FROM node:6.10.3-alpine

# Common ENV
ENV API_SECRET="This is a local API secret for everyone. <KEY>" \
    SERVER_SECRET="This needs to be the same secret everywhere. <KEY>" \
    LONGTERM_KEY="<KEY>" \
    DISCOVERY_HOST=hakken:8000 \
    PUBLISH_HOST=hakken \
    METRICS_SERVICE="{ \"type\": \"static\", \"hosts\": [{ \"protocol\": \"http\", \"host\": \"highwater:9191\" }] }" \
    USER_API_SERVICE="{ \"type\": \"static\", \"hosts\": [{ \"protocol\": \"http\", \"host\": \"shoreline:9107\" }] }" \
    SEAGULL_SERVICE="{ \"type\": \"static\", \"hosts\": [{ \"protocol\": \"http\", \"host\": \"seagull:9120\" }] }" \
    GATEKEEPER_SERVICE="{ \"type\": \"static\", \"hosts\": [{ \"protocol\": \"http\", \"host\": \"gatekeeper:9123\" }] }" \
    PORT=3000 \
    MOCK=false \
    DEV_TOOLS=true \
    WEBPACK_DEVTOOL="cheap-module-eval-source-map" \
    API_HOST="http://localhost:8009" \
    UPLOAD_API="http://localhost/uploader"

WORKDIR /app

COPY package.json /app/package.json

RUN apk add --no-cache fontconfig \
 && apk add --no-cache --virtual .build-deps curl git \
 && echo "Fixing PhantomJS to run on alpine" \
 && curl -Ls "https://github.com/tidepool-org/tools/raw/master/alpine_phantomjs_dependencies/dockerized-phantomjs.tar.xz" | tar xJ -C / \
 && mkdir /app/dist && mkdir /app/node_modules && chown node:node -R /app \
 && mkdir -p /@tidepool/viz/node_modules && chown node:node -R /@tidepool/viz \
 && mkdir -p /tideline/node_modules && chown node:node -R /tideline \
 && mkdir -p /tidepool-platform-client/node_modules && chown node:node -R /tidepool-platform-client \
 && apk del .build-deps \
 && rm -rf /usr/share/man /tmp/* /var/tmp/* /root/.npm /root/.node-gyp

USER node

RUN yarn install

COPY . /app

VOLUME /app
VOLUME /app/node_modules
VOLUME /@tidepool/viz/node_modules
VOLUME /tideline/node_modules
VOLUME /tidepool-platform-client/node_modules

{'fraction_non_alphanumeric': 0.19577537351880475, 'fraction_numerical': 0.01777434312210201, 'mean_word_length': 3.216069489685125, 'pattern_counts': {'":': 32, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3331404', 'n_tokens_mistral': 1522, 'n_tokens_neox': 1438, 'n_words': 305}