Commit 0c20778b authored by Pablo Panero's avatar Pablo Panero
Browse files

docker: update docker file to use from cern-search-rest-api-base

parent 1276f5e4
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Use CentOS7: # Use CentOS7:
FROM inveniosoftware/centos7-python:3.6 FROM gitlab-registry.cern.ch/webservices/cern-search/cern-search-rest-api/cern-search-rest-api-base:1276f5e4eec8b282d1d1ce9b0290f1d117847288
ARG build_devel ARG build_devel
ENV DEVEL=$build_devel ENV DEVEL=$build_devel
# Install pre-requisites
RUN yum update -y && \
yum install -y \
gcc \
openssl \
openldap-devel \
https://linuxsoft.cern.ch/cern/centos/7/cern/x86_64/Packages/CERN-CA-certs-20180516-1.el7.cern.noarch.rpm
# CERN Search installation # CERN Search installation
WORKDIR /${WORKING_DIR}/src WORKDIR /${WORKING_DIR}/src
ADD . /${WORKING_DIR}/src ADD . /${WORKING_DIR}/src
# Install dependencies globally
RUN pipenv install --system --deploy
# If env is development, install development dependencies # If env is development, install development dependencies
RUN if [ -n "${DEVEL-}" ]; then pip install -r requirements-devel.txt; fi RUN if [ -n "${DEVEL-}" ]; then pip install -r requirements-devel.txt; fi
# Install CSaS # Install CSaS
RUN pip install -e .[all,postgresql,elasticsearch6] RUN pip install -e .
# PID File for uWSGI # PID File for uWSGI
RUN touch /${WORKING_DIR}/src/uwsgi.pid RUN touch /${WORKING_DIR}/src/uwsgi.pid
...@@ -32,7 +23,7 @@ RUN chmod 666 /${WORKING_DIR}/src/uwsgi.pid ...@@ -32,7 +23,7 @@ RUN chmod 666 /${WORKING_DIR}/src/uwsgi.pid
RUN sh /${WORKING_DIR}/src/scripts/patch/oauth_patch.sh RUN sh /${WORKING_DIR}/src/scripts/patch/oauth_patch.sh
# Install UI # Install UI
USER invenio
RUN invenio collect -v RUN invenio collect -v
RUN invenio webpack buildall RUN invenio webpack buildall
# Move static files to instance folder # Move static files to instance folder
...@@ -50,4 +41,6 @@ ENV UWSGI_PROCESSES ${UWSGI_PROCESSES:-2} ...@@ -50,4 +41,6 @@ ENV UWSGI_PROCESSES ${UWSGI_PROCESSES:-2}
ARG UWSGI_THREADS=2 ARG UWSGI_THREADS=2
ENV UWSGI_THREADS ${UWSGI_THREADS:-2} ENV UWSGI_THREADS ${UWSGI_THREADS:-2}
USER invenio
CMD ["/bin/sh", "-c", "uwsgi --module ${UWSGI_WSGI_MODULE} --socket 0.0.0.0:${UWSGI_PORT} --master --processes ${UWSGI_PROCESSES} --threads ${UWSGI_THREADS} --stats /tmp/stats.socket"] CMD ["/bin/sh", "-c", "uwsgi --module ${UWSGI_WSGI_MODULE} --socket 0.0.0.0:${UWSGI_PORT} --master --processes ${UWSGI_PROCESSES} --threads ${UWSGI_THREADS} --stats /tmp/stats.socket"]
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment