Dockerfile 1.06 KB
Newer Older
Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
FROM ruby
MAINTAINER Friedrich Lindenberg <pudo@occrp.org>, Michał Woźniak <rysiek@occrp.org>
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get install -y \
    libmagic-dev \
    libgpgme11-dev \
    wget \
    git \
    git-core \
    --no-install-recommends && rm -rf /var/lib/apt/lists/*

# get and install schleuder-conf
RUN git clone https://git.codecoop.org/schleuder/schleuder-conf.git /opt/schleuder-conf && \
    cd /opt/schleuder-conf && \
    bundle install --without development
    
RUN git clone https://git.codecoop.org/schleuder/webschleuder3.git /opt/webschleuder3 && \
    cd /opt/schleuder-conf && \
    cd /opt/webschleuder3 && \
    bin/setup
#    && cp -R /webschleuder/config /webschleuder/config.tmpl

COPY webschleuder.yml /opt/webschleuder3/config/webschleuder.yml

WORKDIR /opt/webschleuder3 
EXPOSE 3000
Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
28
CMD export SECRET_KEY_BASE="$( echo $RANDOM | sha256sum | sed -r -e 's/\s+-//' )$( echo $RANDOM | sha256sum | sed -r -e 's/\s+-//' )" && bundle exec rake db:setup RAILS_ENV=production && bundle exec rails server -b 0.0.0.0 -e production