1 # PostgreSQL Docker container for Arvados.
3 FROM arvados/debian:wheezy
4 MAINTAINER Tim Pierce <twp@curoverse.com>
6 # TODO(twp): parameterize variables via autoconf or similar.
7 ENV POSTGRES_ROOT_PW dummy_pw
9 ENV ARVADOS_DEV_DB arvados_development
10 ENV ARVADOS_DEV_USER arvados
11 ENV ARVADOS_DEV_PW dummy_pw
13 ENV ARVADOS_TEST_DB arvados_test
14 ENV ARVADOS_TEST_USER arvados
15 ENV ARVADOS_TEST_PW dummy_pw
17 ENV ARVADOS_PROD_DB arvados_production
18 ENV ARVADOS_PROD_USER arvados
19 ENV ARVADOS_PROD_PW dummy_pw
21 # Install postgres and apache
22 RUN apt-get -q -y install procps postgresql postgresql-server-dev-9.1
24 # Configure databases and users.
25 ADD postgresql.conf /etc/postgresql/9.1/main/
26 ADD pg_hba.conf /etc/postgresql/9.1/main/
28 ADD postgresql_config.sh /tmp/postgresql_config.sh
29 RUN /tmp/postgresql_config.sh
30 RUN rm /tmp/postgresql_config.sh
32 # Accept database connections on port 5432 from outside the container.
35 CMD ["/bin/su", "postgres", "-c", "/usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf"]