Skip to content

Commit

Permalink
Dockerfile for b2share
Browse files Browse the repository at this point in the history
Dockerfile for b2share
  • Loading branch information
llehtine committed Apr 13, 2016
1 parent 8881ee6 commit b5d0245
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions devenv/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM centos:7
EXPOSE 5000
RUN rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
RUN yum -y update
RUN yum -y install wget
RUN yum -y install python34
RUN yum -y install npm
RUN yum -y install supervisor
WORKDIR /tmp
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python3.4 get-pip.py
RUN pip3 install --upgrade pip
RUN yum -y install git
ENV DB_NAME="b2share-evolution"
ENV MACHINE_NAME="b2share"
ENV B2SHARE_UI_PATH="/app/b2share/webui/app"
ENV B2SHARE_BROKER_URL="redis://redis:6379/0"
ENV B2SHARE_CELERY_RESULT_BACKEND="redis://redis:6379/1"
ENV B2SHARE_SECRET_KEY="sX5BwQI8cZQmxmM6RfI08zSDm6tPt8Tc"
ENV B2SHARE_SEARCH_ELASTIC_HOSTS="172.17.0.2:9200"
ENV B2SHARE_SERVER_NAME="localhost:5000"
RUN mkdir /app
WORKDIR /app
RUN git clone https://github.com/EUDAT-B2SHARE/b2share.git --branch evolution b2share
WORKDIR /app/b2share
RUN pip install -r requirements.txt
WORKDIR /app/b2share/demo
RUN pip install -e .
ENV LANG=en_US.UTF-8
RUN pip install Flask-CORS
RUN b2share db create
RUN b2share schemas init
RUN b2share index init
RUN b2share demo load
WORKDIR /app/b2share/webui
RUN npm install
RUN node_modules/webpack/bin/webpack.js -p
WORKDIR /apps/b2share
RUN echo "[supervisord]" > /etc/supervisord.conf && \
echo "nodaemon=true" >> /etc/supervisord.conf && \
echo "" >> /etc/supervisord.conf && \
echo "[program:celery]" >> /etc/supervisord.conf && \
echo "command=/usr/bin/celery worker -D -E -A b2share.celery -l INFO --workdir=/app/b2share" >> /etc/supe$
echo "[program:b2share]" >> /etc/supervisord.conf && \
echo "command=/usr/bin/b2share --debug run" >> /etc/supervisord.conf
ENTRYPOINT ["/usr/bin/supervisord"]

0 comments on commit b5d0245

Please sign in to comment.