forked from mysociety/alaveteli
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
34 lines (25 loc) · 1.03 KB
/
Dockerfile
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
28
29
30
31
32
33
34
FROM ruby
MAINTAINER [email protected]
# Set noninteractive mode for apt-get
ENV DEBIAN_FRONTEND noninteractive
ENV RAILS_ENV production
# Update
RUN apt-get update && apt-get upgrade -y
# Install required packages
RUN apt-get -y install supervisor ca-certificates git postgresql-client build-essential catdoc elinks \
gettext ghostscript gnuplot-nox imagemagick unzip \
libicu-dev libmagic-dev libmagickwand-dev libmagickcore-dev libpq-dev libxml2-dev libxslt1-dev links \
sqlite3 lockfile-progs mutt pdftk poppler-utils \
postgresql-client tnef unrtf uuid-dev wkhtmltopdf wv xapian-tools
# Clone develop branch
RUN mkdir /opt/alaveteli
ADD . /opt/alaveteli
WORKDIR /opt/alaveteli
# Add yaml configuration which take environment variables
RUN rm config/database.yml
RUN rm config/general.yml
RUN cp script/docker/database.yml config/database.yml
RUN cp script/docker/general.yml config/general.yml
RUN mkdir -p cache
RUN bundle install --without development debug test --deployment --retry=10 --clean
CMD ./script/docker/setup.sh