Merging the postgres container back into the api container (simpler
[arvados.git] / docker / api / Dockerfile
1 # Arvados API server Docker container.
2
3 FROM arvados/base
4 MAINTAINER Tim Pierce <twp@clinicalfuture.com>
5
6 # TODO(twp): parameterize variables via autoconf or similar.
7 ENV POSTGRES_ROOT_PW   dummy_pw
8
9 ENV ARVADOS_DEV_DB     arvados_development
10 ENV ARVADOS_DEV_USER   arvados
11 ENV ARVADOS_DEV_PW     dummy_pw
12
13 ENV ARVADOS_TEST_DB    arvados_test
14 ENV ARVADOS_TEST_USER  arvados
15 ENV ARVADOS_TEST_PW    dummy_pw
16
17 ENV ARVADOS_PROD_DB    arvados_production
18 ENV ARVADOS_PROD_USER  arvados
19 ENV ARVADOS_PROD_PW    dummy_pw
20
21 # Install postgres and apache
22 RUN apt-get -q -y install procps postgresql postgresql-server-dev-9.1 apache2
23
24 # Configure databases and users.
25 ADD postgresql_config.sh /tmp/postgresql_config.sh
26 RUN /tmp/postgresql_config.sh
27 RUN rm /tmp/postgresql_config.sh
28
29 # Install gems needed for API server
30 RUN bundle install --gemfile=/usr/src/arvados/services/api/Gemfile
31
32 # Set up the Rails database. This has to be done in a script so that
33 # postgres can run in the background while running rake db:setup.
34 ENV RAILS_ENV production
35 ADD database.yml /usr/src/arvados/services/api/config/database.yml
36 ADD config_rake.sh /tmp/config_rake.sh
37 RUN /tmp/config_rake.sh
38