<commit_before>FROM debian:jessie
MAINTAINER <NAME> <<EMAIL>>

# Install all system requirements
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
    apt-get -y -qq install openssl ca-certificates build-essential python-dev python-setuptools \
    libmagickwand-dev && apt-get clean && rm -rf /var/lib/apt/lists/*

RUN easy_install virtualenv
RUN mkdir -p /app/conf /app/pjuu

WORKDIR /app

# PIP stuff
COPY ./requirements-base.txt /app/requirements-base.txt
COPY ./requirements-prod.txt /app/requirements-prod.txt

RUN virtualenv /app/venv
RUN venv/bin/pip install -r /app/requirements-prod.txt

# Copy the Pjuu source code, "pjuu/" in the current directory
COPY ./pjuu /app/pjuu

# Pjuu needs config from the host!
VOLUME ["/app/conf"]

# Gunicorn available to the Docker container
EXPOSE 8000

# Run Gunicorn
ENTRYPOINT ["venv/bin/gunicorn"]
CMD ["-c/app/conf/gunicorn.py", "pjuu.wsgi"]<commit_msg>Updated Dockerfile for production.<commit_after>FROM debian:jessie
MAINTAINER <NAME> <<EMAIL>>

# Install all system requirements
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
    apt-get -y -qq install openssl ca-certificates build-essential python-dev python-setuptools \
    libmagickwand-dev && apt-get clean && rm -rf /var/lib/apt/lists/*

RUN easy_install virtualenv
RUN mkdir -p /data/conf /data/pjuu

WORKDIR /data

# PIP stuff
COPY ./requirements-base.txt /data/requirements-base.txt

RUN virtualenv /data/venv
RUN /data/venv/bin/pip install -r /data/requirements-base.txt

# Copy the Pjuu source code, "pjuu/" in the current directory
COPY ./pjuu /data/pjuu

# Pjuu needs config from the host!
VOLUME ["/data/conf"]

# Gunicorn available to the Docker container
EXPOSE 8000

# Run Gunicorn
ENTRYPOINT ["/data/venv/bin/gunicorn"]
CMD ["-b 0.0.0.0:8000", "-k gevent", "PJUU_SETTINGS=/data/conf/pjuu.conf", "pjuu.wsgi:application"]
{'fraction_non_alphanumeric': 0.11922663802363051, 'fraction_numerical': 0.008592910848549946, 'mean_word_length': 4.008064516129032, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '4382521', 'n_tokens_mistral': 691, 'n_tokens_neox': 652, 'n_words': 187}