# NAME: discourse/discourse_dev
-# VERSION: 1.3.8
-FROM discourse/base:1.3.8
+# VERSION: release
+FROM discourse/base:release
MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
-# Create discourse user and /var/www location for both
-# discourse and dev images.
-RUN useradd discourse -s /bin/bash -m -U &&\
- mkdir -p /var/www
+# Install for mailcatcher gem
+RUN apt-get update && apt-get install -y libsqlite3-dev \
+ && gem install mailcatcher && rm -rf /var/lib/apt/lists/*
+
+# Remove the code added on base image
+RUN rm -rf /var/www/*
# Give discourse user no-passwd sudo permissions (for bundle install)
ADD sudoers.discourse /etc/sudoers.d/discourse
ADD postgres.template.yml /pups/postgres.yml
RUN LANG=en_US.UTF-8 /pups/bin/pups /pups/postgres.yml
+# add dev databases
+ADD postgres_dev.template.yml /pups/postgres_dev.yml
+RUN /pups/bin/pups /pups/postgres_dev.yml
+
# move default postgres_data out of the way
RUN mv /shared/postgres_data /shared/postgres_data_orig