<commit_before>FROM elixir:1.5.3

# Set up deploy user and working directory
RUN adduser --disabled-password --gecos '' deploy

RUN apt-get update && \
      apt-get -y install sudo

# install Node.js (>= 6.0.0) and NPM in order to satisfy brunch.io dependencies
# See http://www.phoenixframework.org/docs/installation#section-node-js-5-0-0-
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && apt-get update && sudo apt-get install -y nodejs

RUN apt-get -y install nginx
RUN rm -v /etc/nginx/nginx.conf
RUN rm -v /etc/nginx/sites-enabled/default
ADD conf/nginx.conf /etc/nginx/
ADD conf/apr-backend.conf /etc/nginx/conf.d/

# Set up working directory
RUN mkdir /app
ADD . /app
WORKDIR /app
RUN chown -R deploy:deploy /app

# Switch to deploy user
USER deploy
ENV USER deploy
ENV HOME /home/deploy

RUN mix local.hex --force
RUN mix local.rebar --force

# install the Phoenix Mix archive
RUN mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

ENV PORT 4000
ENV MIX_ENV prod

RUN mix deps.get
RUN mix compile

RUN npm install
RUN node assets/node_modules/brunch/bin/brunch build assets --production
RUN mix phoenix.digest

CMD service nginx start && mix phoenix.server
<commit_msg>Not use deploy user<commit_after>FROM elixir:1.5.3

# Set up deploy user and working directory
# RUN adduser --disabled-password --gecos '' deploy

RUN apt-get update && \
      apt-get -y install sudo apt-utils

# install Node.js (>= 6.0.0) and NPM in order to satisfy brunch.io dependencies
# See http://www.phoenixframework.org/docs/installation#section-node-js-5-0-0-
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && apt-get update && sudo apt-get install -y nodejs

RUN apt-get -y install nginx
RUN rm -v /etc/nginx/nginx.conf
RUN rm -v /etc/nginx/sites-enabled/default
ADD conf/nginx.conf /etc/nginx/
ADD conf/apr-backend.conf /etc/nginx/conf.d/

# Set up working directory
RUN mkdir /app
ADD . /app
WORKDIR /app
# RUN chown -R deploy:deploy /app

# Switch to deploy user
# USER deploy
# ENV USER deploy
# ENV HOME /home/deploy

RUN mix local.hex --force
RUN mix local.rebar --force

# install the Phoenix Mix archive
RUN mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

ENV PORT 4000
ENV MIX_ENV prod

RUN mix deps.get
RUN mix compile

RUN npm install
RUN node assets/node_modules/brunch/bin/brunch build assets --production
RUN mix phoenix.digest

CMD service nginx start && mix phoenix.server

{'fraction_non_alphanumeric': 0.10488390712570056, 'fraction_numerical': 0.01120896717373899, 'mean_word_length': 3.4704830053667264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '553634', 'n_tokens_mistral': 881, 'n_tokens_neox': 850, 'n_words': 288}