<commit_before>FROM          nginx
MAINTAINER    <NAME> "<EMAIL>"

# Build args required to work behind proxy
ARG           http_proxy
ARG           https_proxy

# Install curl (used to install nodejs) and build-essential (for compiling native nodejs libraries)
RUN           apt-get update -qq
RUN           apt-get install -qqy curl build-essential

# Install nodejs and update npm to latest version
RUN           curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN           apt-get install -y nodejs
#RUN           npm install -g npm

# Install angular-cli
RUN           npm install -g @angular/cli@1.5.0

# Copies all files and maintains directory structure
COPY          / /research-hub-web/

# Build research hub with angular-cli
WORKDIR       /research-hub-web/
RUN           npm install
ARG           WEB_ENVIRONMENT
RUN           node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod --environment=$WEB_ENVIRONMENT

# Configure nginx
RUN           cp -a ./dist/. /usr/share/nginx/www/
RUN           cp nginx.conf /etc/nginx/nginx.conf
<commit_msg>Install git for npm deps that need to be cloned from github<commit_after>FROM          nginx
MAINTAINER    <NAME> "<EMAIL>"

# Build args required to work behind proxy
ARG           http_proxy
ARG           https_proxy

# Install curl (used to install nodejs) and build-essential (for compiling native nodejs libraries)
RUN           apt-get update -qq
RUN           apt-get install -qqy curl build-essential git

# Install nodejs and update npm to latest version
RUN           curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN           apt-get install -y nodejs
#RUN           npm install -g npm

# Install angular-cli
RUN           npm install -g @angular/cli@1.5.0

# Copies all files and maintains directory structure
COPY          / /research-hub-web/

# Build research hub with angular-cli
WORKDIR       /research-hub-web/
RUN           npm install
ARG           WEB_ENVIRONMENT
RUN           node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod --environment=$WEB_ENVIRONMENT

# Configure nginx
RUN           cp -a ./dist/. /usr/share/nginx/www/
RUN           cp nginx.conf /etc/nginx/nginx.conf

{'fraction_non_alphanumeric': 0.07899461400359066, 'fraction_numerical': 0.00718132854578097, 'mean_word_length': 2.2071942446043167, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1001846', 'n_tokens_mistral': 691, 'n_tokens_neox': 645, 'n_words': 228}