Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Update and improve Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Mar 10, 2015
1 parent b76f135 commit c34011e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Dockerfile to build and run Gratipay
# Version 0.1 (April 15, 2014)
# Version 0.2 (March 10, 2015)

################################################## General Information ##################################################

FROM ubuntu:12.04
FROM ubuntu:14.04
MAINTAINER Mihir Singh (@citruspi)

ENV DEBIAN_FRONTEND noninteractive

################################################## Install Dependencies #################################################

RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" > /etc/apt/sources.list.d/pgdg.list

RUN apt-get -y install wget

Expand All @@ -29,26 +29,26 @@ RUN apt-get -y install \
python-pip \
postgresql-9.3 \
postgresql-contrib-9.3 \
unzip \
language-pack-en

################################################## Configure Postgres #################################################

RUN /etc/init.d/postgresql start && su postgres -c "createuser --superuser root" && su postgres -c "createdb gratipay"

################################################# Clone + Setup Gratipay ################################################
################################################# Copy files + Setup Gratipay ##########################################

RUN cd /srv && wget --quiet https://github.com/gratipay/gratipay.com/archive/master.zip && unzip master.zip
RUN cd /srv/gratipay.com-master && make env && /etc/init.d/postgresql start && make schema && make schema data
COPY ./ /srv/gratipay.com/
WORKDIR /srv/gratipay.com
RUN make env && /etc/init.d/postgresql start && make schema && make schema data

################################################ Create a Launch Script ###############################################

RUN echo "#!/bin/bash" >> /usr/bin/gratipay
RUN echo "/etc/init.d/postgresql start" >> /usr/bin/gratipay
RUN echo "cd /srv/gratipay.com-master && make run" >> /usr/bin/gratipay
RUN chmod +x /usr/bin/gratipay
RUN echo "#!/bin/bash" >> /usr/bin/gratipay && \
echo "/etc/init.d/postgresql start" >> /usr/bin/gratipay && \
echo "cd /srv/gratipay.com && make run" >> /usr/bin/gratipay && \
chmod +x /usr/bin/gratipay

################################################### Set an Entrypoint #################################################
################################################### Launch command #####################################################

ENTRYPOINT ["/usr/bin/gratipay"]
CMD ["/usr/bin/gratipay"]

0 comments on commit c34011e

Please sign in to comment.