<commit_before>FROM node:14.15.4-alpine AS builder

# Should be built with `npm run docker`
# Then run with `docker run --init --env-file=.env --network host docker.dallas.languagetechnology.org/node-ldapi:latest`
#
# This assumes a .env file that looks something like this:
# PORT=3000
# MYSQL_USER=mysqlusername
# MYSQL_PASSWORD=<PASSWORD>

WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY static ./static
COPY svelte.config.js snowpack.config.js tsconfig.json ./
COPY src ./src
RUN npm run build && npm run adapt

FROM node:14.15.4-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY --from=builder app/build ./
COPY static assets
EXPOSE 3000
USER node
ENTRYPOINT ["node", "index.js"]<commit_msg>Dockerfile: copy static content sooner<commit_after>FROM node:14.15.4-alpine AS builder

# Should be built with `npm run docker`
# Then run with `docker run --init --env-file=.env --network host docker.dallas.languagetechnology.org/node-ldapi:latest`
#
# This assumes a .env file that looks something like this:
# PORT=3000
# MYSQL_USER=mysqlusername
# MYSQL_PASSWORD=<PASSWORD>

WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY static ./static
COPY svelte.config.js snowpack.config.js tsconfig.json ./
COPY src ./src
RUN npm run build && npm run adapt

FROM node:14.15.4-alpine
WORKDIR /app
COPY static assets
COPY package*.json ./
RUN npm ci
COPY --from=builder app/build ./
EXPOSE 3000
USER node
ENTRYPOINT ["node", "index.js"]
{'fraction_non_alphanumeric': 0.113273106323836, 'fraction_numerical': 0.02501737317581654, 'mean_word_length': 4.088339222614841, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '7334072', 'n_tokens_mistral': 526, 'n_tokens_neox': 469, 'n_words': 163}