<commit_before>FROM podiobooks/podiobooks-centos-base

MAINTAINER <NAME> "<EMAIL>"

USER root

# Install uwsgi
RUN yum install -y python-devel libxml2-devel pcre-devel jansson-devel libcap-devel uuid-devel sqlite-devel openldap-devel libyaml-devel
RUN pip install uwsgi

# Install Psycopg2
RUN pip install psycopg2

# Install Pillow
RUN yum install -y libjpeg libjpeg-devel zlib zlib-devel libtiff libtiff-devel libfreetype libfreetype-devel littlecms littlecms-devel libwebp libwebp-devel openjpeg openjpeg-devel

# Install virtualenv
RUN pip install virtualenv

# Add nginx official repository
ADD nginx.repo /etc/yum.repos.d/nginx.repo

# Install openssl
RUN yum install -y openssl-devel openssl

# Install nginx
RUN yum install -y --disablerepo=* --enablerepo=nginx nginx

# Turn off Daemon of nginx so that it can be managed by Docker
RUN echo -e "\ndaemon off;" >> /etc/nginx/nginx.conf

# Delete default nginx configs
RUN rm /etc/nginx/conf.d/* 

# Add Supervisor Config File
ADD supervisord.conf /etc/nginx/supervisord.conf

# Add nginx config
ADD podiobooks-nginx.conf /etc/nginx/conf.d/podiobooks-nginx.conf

# Add nginx to user  group
RUN usermod -G podiobooks nginx

# Switch to user
USER podiobooks

# Add Uwsgi File
ADD podiobooks-uwsgi.xml /home/podiobooks/podiobooks-uwsgi.xml

# Add local app settings file to temp location - init setup will install
ADD podiobooks_local_settings.py /home/podiobooks/local_settings.py

# Get Code
RUN git clone https://github.com/podiobooks/podiobooks.git /home/podiobooks/data/podiobooks

# Install VirtualEnv
RUN cd /home/podiobooks/data/podiobooks && /devscripts/virtualenv/setup_prod_env.sh && \
	. .env/bin/activate && python manage.py collectstatic --noinput
	
RUN cp /home/podiobooks/local_settings.py /home/podiobooks/podiobooks/podiobooks/local_settings.py

# Switch to root to run supervisord
USER root

# Expose Web Port
EXPOSE 80

CMD ["supervisord", "-n", "-c", "/etc/nginx/supervisord.conf"]<commit_msg>trying to merge things<commit_after>FROM podiobooks/podiobooks-centos-base

MAINTAINER <NAME> "<EMAIL>"

USER root

# Install uwsgi
RUN yum install -y python-devel libxml2-devel pcre-devel jansson-devel libcap-devel uuid-devel sqlite-devel openldap-devel libyaml-devel
RUN pip install uwsgi

# Install Psycopg2
RUN pip install psycopg2

# Install Pillow
RUN yum install -y libjpeg libjpeg-devel zlib zlib-devel libtiff libtiff-devel libfreetype libfreetype-devel littlecms littlecms-devel libwebp libwebp-devel openjpeg openjpeg-devel

# Install virtualenv
RUN pip install virtualenv

# Add nginx official repository
ADD nginx.repo /etc/yum.repos.d/nginx.repo

# Install openssl
RUN yum install -y openssl-devel openssl

# Install nginx
RUN yum install -y --disablerepo=* --enablerepo=nginx nginx

# Turn off Daemon of nginx so that it can be managed by Docker
RUN echo -e "\ndaemon off;" >> /etc/nginx/nginx.conf

# Delete default nginx configs
RUN rm /etc/nginx/conf.d/* 

# Add Supervisor Config File
ADD supervisord.conf /etc/nginx/supervisord.conf

# Add nginx config
ADD podiobooks-nginx.conf /etc/nginx/conf.d/podiobooks-nginx.conf

# Add nginx to user  group
RUN usermod -G podiobooks nginx

# Switch to user
USER podiobooks

# Add Uwsgi File
ADD podiobooks-uwsgi.xml /home/podiobooks/podiobooks-uwsgi.xml

# Add local app settings file to temp location - init setup will install
ADD podiobooks_local_settings.py /home/podiobooks/local_settings.py

# Get Code
RUN git clone https://github.com/podiobooks/podiobooks.git /home/podiobooks/data/podiobooks

# Install VirtualEnv
RUN cd /home/podiobooks/data/podiobooks && ./devscripts/virtualenv/setup_prod_env.sh && \
	. .env/bin/activate && python manage.py collectstatic --noinput
	
#RUN cp /home/podiobooks/local_settings.py /home/podiobooks/podiobooks/podiobooks/local_settings.py

# Switch to root to run supervisord
USER root

# Expose Web Port
EXPOSE 80

CMD ["supervisord", "-n", "-c", "/etc/nginx/supervisord.conf"]
{'fraction_non_alphanumeric': 0.08821292775665399, 'fraction_numerical': 0.0025348542458808617, 'mean_word_length': 4.368707482993197, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '2195685', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1429, 'n_words': 396}