histograph / deploy

Deploy scripts for Histograph
MIT License
0 stars 0 forks source link

Fix docker image #10

Open wires opened 9 years ago

wires commented 9 years ago

Build new Dockerfile that uses the https://github.com/phusion/passenger-docker image.

Postgresql is kind of tricky to run properly, this seems doable https://github.com/atbaker/sd-postgres/blob/master/Dockerfile

wires commented 9 years ago

this is a start

FROM phusion/passenger-customizable:0.9.15

MAINTAINER jelle@waag.org

CMD ["/sbin/my_init"]

RUN /pd_build/utilities.sh
RUN /pd_build/nodejs.sh
RUN /pd_build/redis.sh
RUN rm -f /etc/service/redis/down
RUN rm -f /etc/service/nginx/down

RUN apt-get install -y --no-install-recommends openjdk-7-jre-headless postgresql

RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# put SSL cert here
VOLUME /etc/nginx/ssl

#RUN mkdir /tmp/nodejs
#WORKDIR /tmp/nodejs
#RUN curl -LO http://nodejs.org/dist/v0.12.2/node-v0.12.2.tar.gz | tar xzvf node-v0.12.2.tar.gz
#WORKDIR /tmp/nodejs/node-v0.12.2/
#RUN ./configure --prefix /usr/local
#RUN make install
#RUN mkdir /histograph
#RUN useradd --shell /bin/bash --system histograph
#RUN git clone https://github.com/histograph/api.git /histograph/api
#EXPOSE 22 3000

nginx

# /etc/nginx/sites-enabled/webapp.conf:

server {
    listen 443;
    server_name api.histograph.io
    root /home/histograph/api

    passenger_enabled on;
    passenger_user histograph;
}
sbocconi commented 8 years ago

Hi Jelle, ik gebruik vagrant + puppet voor provisioning, het schijnt dat vagrant ook een docker image kan maken. Voordeel van de combinatie is dat jij hebt een website (https://puphpet.com/) waar met een web interface jouw configuratie wordt gemaakt, ik heb het regelmatig gebruikt en bijvoorbeeld postgres is goed ondersteund.

ryanfb commented 8 years ago

For what it's worth, I'm experimenting with a docker-compose based approach for running Histograph here: https://github.com/ryanfb/docker_histograph