Created
April 5, 2018 22:06
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: this is a template, not the actual docker file... | |
# | |
# It will be turned into a dockerfile and processed by | |
# jenkins and the corresponding jenkinsfile contained in | |
# this working directory. | |
FROM centos:7 | |
MAINTAINER ${maintainers} | |
LABEL JENKINS_BUILD=${build_number} | |
LABEL JENKINS_BUILD_TAG=${build_tag} | |
LABEL JENKINS_BUILD_URL=${build_url} | |
RUN yum -y install ${epel_cent7_url} | |
RUN yum -y clean all | |
RUN yum -y install git python-devel gcc make python-pip \ | |
python-virtualenv openssl-devel | |
RUN yum -y install mailcap | |
RUN mkdir -p /opt/ara | |
COPY ansible.cfg /opt/ara/ansible.cfg | |
COPY requirements.txt /opt/ara/requirements.txt | |
RUN virtualenv /opt/ara/venv | |
RUN source /opt/ara/venv/bin/activate && \ | |
pip install pip --upgrade | |
RUN source /opt/ara/venv/bin/activate && \ | |
pip install -r /opt/ara/requirements.txt | |
# Remove when https://review.openstack.org/#/c/524427/ merges... | |
COPY patches/Add-support-for-configuring-sqlalchemy-pool-size-tim.patch /opt/ara/venv/lib/python2.7/site-packages/ | |
RUN cd /opt/ara/venv/lib/python2.7/site-packages/ && \ | |
git apply Add-support-for-configuring-sqlalchemy-pool-size-tim.patch | |
RUN cd /opt/ara/venv/lib/python2.7/site-packages/ && \ | |
rm Add-support-for-configuring-sqlalchemy-pool-size-tim.patch | |
CMD /opt/ara/venv/bin/gunicorn -w 8 \ | |
-k gthread \ | |
--threads 2 \ | |
-b 0.0.0.0:80 \ | |
--timeout 120 \ | |
--graceful-timeout 30 \ | |
--max-requests 25 \ | |
-e ANSIBLE_CONFIG=/opt/ara/ansible.cfg \ | |
ara.wsgi:application |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment