Move user creation from base to discourse and dev
[discourse_docker.git] / image / discourse_dev / Dockerfile
CommitLineData
3447089f
JR
1# NAME: discourse/discourse_dev
2# VERSION: 1.3.7
3FROM discourse/base:1.3.7
1383e6a4
S
4
5MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
6
4ca4c161
RSS
7# Create discourse user and /var/www location for both
8# discourse and dev images.
9RUN useradd discourse -s /bin/bash -m -U &&\
10 mkdir -p /var/www
11
3447089f
JR
12# Give discourse user no-passwd sudo permissions (for bundle install)
13ADD sudoers.discourse /etc/sudoers.d/discourse
da1fb55e
S
14
15# get redis going
16ADD redis.template.yml /pups/redis.yml
17RUN /pups/bin/pups /pups/redis.yml
18
19RUN locale-gen en_US.UTF-8
20ENV LANG en_US.UTF-8
21ENV LANGUAGE en_US:en
22ENV LC_ALL en_US.UTF-8
23
24# get postgres going
25ADD postgres.template.yml /pups/postgres.yml
26RUN LANG=en_US.UTF-8 /pups/bin/pups /pups/postgres.yml
27
3447089f 28# move default postgres_data out of the way
da1fb55e
S
29RUN mv /shared/postgres_data /shared/postgres_data_orig
30
3447089f
JR
31# re-instantiate data on boot if needed (this will allow it to persist across
32# invocations when used with a mounted volume)
da1fb55e 33ADD ensure-database /etc/runit/1.d/ensure-database