<commit_before>FROM python:3.6
MAINTAINER <NAME> <<EMAIL>>

RUN apt-get update
RUN apt-get install -y python3 python3-dev python3-pip
#RUN apt-get update -y && apt-get install -y \
        #build-essential \
        #openssl \
    #&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /partypi

WORKDIR /partypi
COPY requirements.txt /partypi
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

COPY . /partypi

# Install partypi
RUN pip install .

#RUN openssl req \
    #-new \
    #-newkey rsa:4096 \
    #-days 365 \
    #-nodes \
    #-x509 \
    #-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.partypi.net" \
    #-keyout www.partypi.net.key \
    #-out www.partypi.net.cert

# Expose the web port
EXPOSE 5000

CMD ["gunicorn",  "-c", "gunicorn.conf", "main:app"]<commit_msg>Move ssl cert generation to separate container<commit_after>FROM alpine:edge as openssl
RUN apk upgrade --update-cache --available && \
    apk add openssl && \
    rm -rf /var/cache/apk/*

# Generate self-signed certificate
RUN openssl req \
    -new \
    -newkey rsa:4096 \
    -days 365 \
    -nodes \
    -x509 \
    -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.partypi.net" \
    -keyout www.partypi.net.key \
    -out www.partypi.net.cert

FROM python:3.6
MAINTAINER <NAME> <<EMAIL>>

RUN apt-get update
RUN apt-get install -y python3 python3-dev python3-pip \
	openssl \
	&& rm -rf /var/lib/apt/lists*

RUN mkdir -p /partypi

WORKDIR /partypi

COPY requirements.txt /partypi
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

COPY . /partypi

# Install partypi
RUN pip install .

# Expose the web port
EXPOSE 5000

COPY --from=openssl /www.partypi.* /partypi/
CMD ["gunicorn",  "-c", "gunicorn.conf", "main:app"]
{'fraction_non_alphanumeric': 0.13904653802497163, 'fraction_numerical': 0.021566401816118047, 'mean_word_length': 2.6805845511482254, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 7, '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': '3331351', 'n_tokens_mistral': 709, 'n_tokens_neox': 646, 'n_words': 181}