<commit_before>########################################################
# Dockerfile to build Python application 'gold-digger'
# Based on Ubuntu
########################################################
#
# BUILD IMAGE
#   docker build --rm=true -t gold-digger:latest .
#
# RUN CONTAINER
#   docker run --rm -it --publish=8000:8000 --name=gold-digger gold-digger:latest
#   docker run --rm -it --publish=8000:8000 --name=gold-digger -v "<path to you gold_digger project>:/app" gold-digger:latest
#   docker run --detach --restart=always --publish=8000:8000 --name=gold-digger gold-digger:latest
#
#   docker run --rm --name gold-digger-cron -ti gold-digger:latest python -m gold_digger cron
#   docker run --detach --restart=always --name gold-digger-cron gold-digger:latest python -m gold_digger cron
#

FROM python:3.6
MAINTAINER <NAME>

# Install system dependencies
RUN apt-get update && apt-get install -y libpq-dev locales locales-all

# Setup system locale
RUN locale-gen en_US.utf8
ENV LANG en_US.utf8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.utf8
RUN update-locale LANG=en_US.utf8

# Timezone
ENV TZ=Europe/Prague
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN pip install pipenv

# Set the default directory
WORKDIR /app

COPY ./Pipfile .
COPY ./Pipfile.lock .

# Install Python dependencies
RUN pipenv install --deploy --system

# Add all files to container
COPY ./ ./

EXPOSE 8080

CMD gunicorn --config=gold_digger/settings/settings_gunicorn.py --log-config=gunicorn_logging_master gold_digger.api_server.app:app<commit_msg>Adds ENV variable to gunicorn command<commit_after>########################################################
# Dockerfile to build Python application 'gold-digger'
# Based on Ubuntu
########################################################
#
# BUILD IMAGE
#   docker build --rm=true -t gold-digger:latest .
#
# RUN CONTAINER
#   docker run --rm -it --publish=8000:8000 --name=gold-digger gold-digger:latest
#   docker run --rm -it --publish=8000:8000 --name=gold-digger -v "<path to you gold_digger project>:/app" gold-digger:latest
#   docker run --detach --restart=always --publish=8000:8000 --name=gold-digger gold-digger:latest
#
#   docker run --rm --name gold-digger-cron -ti gold-digger:latest python -m gold_digger cron
#   docker run --detach --restart=always --name gold-digger-cron gold-digger:latest python -m gold_digger cron
#

FROM python:3.6
MAINTAINER <NAME>

# Install system dependencies
RUN apt-get update && apt-get install -y libpq-dev locales locales-all

# Setup system locale
RUN locale-gen en_US.utf8
ENV LANG en_US.utf8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.utf8
RUN update-locale LANG=en_US.utf8

# Timezone
ENV TZ=Europe/Prague
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN pip install pipenv

# Set the default directory
WORKDIR /app

COPY ./Pipfile .
COPY ./Pipfile.lock .

# Install Python dependencies
RUN pipenv install --deploy --system

# Add all files to container
COPY ./ ./

EXPOSE 8080

CMD gunicorn --config=gold_digger/settings/settings_gunicorn.py --log-config=$LOGGING_GUNICORN gold_digger.api_server.app:app
{'fraction_non_alphanumeric': 0.1768987341772152, 'fraction_numerical': 0.021518987341772152, 'mean_word_length': 4.1819672131147545, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '2513643', 'n_tokens_mistral': 1126, 'n_tokens_neox': 1024, 'n_words': 300}