Dockerfile 899 Bytes
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
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/*
    
RUN git clone https://git.codecoop.org/schleuder/webschleuder3.git /opt/webschleuder3 && \
    cd /opt/webschleuder3 && \
    bin/setup
Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
16 17 18
    
# remove the default config files
RUN rm /opt/webschleuder3/config/webschleuder.yml /opt/webschleuder3/config/secrets.yml /opt/webschleuder3/config/database.yml
Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
19

Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
20 21
COPY entrypoint.sh /sbin/entrypoint.sh
RUN chmod a+x /sbin/entrypoint.sh
Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
22 23 24

WORKDIR /opt/webschleuder3 
EXPOSE 3000
Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
25 26
ENTRYPOINT ["/sbin/entrypoint.sh"]
CMD ["bundle", "exec", "rails", "server", "-b", "$$WEBSCHLOCKER_BIND_ADDRESS", "-p", "$$WEBSCHLOCKER_BIND_PORT", "-e", "production"]