--- /dev/null
+# Official repo only has a ppa for postgresql 9.3 at the moment (14/3/2014)
+# When new LTS ships we can upgrade
+
+# VERSION 0.1.0
+FROM samsaffron/discourse_base:1.0.7
+
+MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
+
+RUN apt-get -y install ruby bison autoconf &&\
+ echo install_package "openssl-1.0.1l" "https://www.openssl.org/source/openssl-1.0.1l.tar.gz#b2cf4d48fe5d49f240c61c9e624193a6f232b5ed0baf010681e725963c40d1d4" mac_openssl --if has_broken_mac_openssl > /src/2.2.2-github &&\
+ echo install_package "ruby-2.2.2-github" "https://github.com/SamSaffron/ruby/archive/2.2.2-github.tar.gz#407654b4fe9dd61ca7e26d8d7e4c8631" autoconf ldflags_dirs standard verify_openssl >> /src/2.2.2-github &&\
+ ruby-build /src/2.2.2-github /usr/local &&\
+ apt-get -y remove ruby &&\
+ gem update --system &&\
+ gem install bundler &&\
+ rm -fr /src/ruby-build
--- /dev/null
+# Current version 1.0.8
+FROM samsaffron/discourse_base_22:1.0.0
+
+MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
+
+# Discourse specific bits
+RUN useradd discourse -s /bin/bash -m -U &&\
+ mkdir -p /var/www && cd /var/www &&\
+ git clone https://github.com/discourse/discourse.git &&\
+ cd discourse &&\
+ git remote set-branches --add origin tests-passed &&\
+ chown -R discourse:discourse /var/www/discourse &&\
+ cd /var/www/discourse &&\
+ sudo -u discourse bundle install --deployment \
+ --without test --without development &&\
+ find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} +
+
+
+# For a smaller but less flexible image:
+#RUN apt-get -y autoremove build-essential gcc gcc-4.7 .+-dev
+#RUN echo image size: $(du -hsx /)
-FROM samsaffron/discourse_21:2.1.2.1
+FROM samsaffron/discourse_22:1.0.0
MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
-RUN apt-get install -y vim &&\
- wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 &&\
- tar -xjf phantomjs-1.9.7-linux-x86_64.tar.bz2 &&\
- rm phantomjs-1.9.7-linux-x86_64.tar.bz2 &&\
- cp phantomjs-1.9.7-linux-x86_64/bin/phantomjs /bin/phantomjs &&\
- rm -fr phantomjs-1.9.7-linux-x86_64
-
RUN cd /var/www/discourse &&\
chown -R discourse . &&\
rm -fr .bundle &&\
sudo -u discourse bundle install --standalone &&\
chown -R discourse /var/run/postgresql
-# RUN cd /var/www/discourse &&\
-# sudo -u discourse git pull &&\
-# sudo -u discourse bundle install --standalone
-
WORKDIR /var/www/discourse
ENV LANG en_US.UTF-8
ENTRYPOINT sudo -E -u discourse ruby script/docker_test.rb