1 # NAME: discourse/discourse_bench
3 FROM discourse/discourse_test:1.4.0
5 MAINTAINER Gerhard Schlager <mail@gerhard-schlager.at>
8 RUN apt-get install -y apache2-utils libsqlite3-dev
10 # configure Git to suppress warnings
11 RUN git config --global user.email "you@example.com" &&\
12 git config --global user.name "Your Name"
15 sudo -u discourse bundle install --standalone
17 RUN gem install facter &&\
18 gem install mailcatcher
20 # reconfigure PostgreSQL template databases to use UTF-8
21 # otherwise rake db:create fails
22 RUN pg_dropcluster --stop 9.5 main &&\
23 pg_createcluster --start -e UTF-8 9.5 main
25 # create role "discourse"
26 RUN /etc/init.d/postgresql start &&\
28 sudo -u postgres createuser --superuser discourse
30 ADD run_bench.sh /tmp/run_bench.sh
31 RUN chmod +x /tmp/run_bench.sh
33 ENTRYPOINT ["/tmp/run_bench.sh"]