Skip to content

Commit

Permalink
Merge pull request jmapio#1 from thomas-hilaire/docker
Browse files Browse the repository at this point in the history
Upgrade the proxy code base and the Docker stuff
  • Loading branch information
Romain Pignolet committed Oct 27, 2015
2 parents fe979d1 + f19aaa1 commit 943b4fd
Show file tree
Hide file tree
Showing 30 changed files with 5,043 additions and 7,238 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
config.json
68 changes: 68 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
FROM phusion/baseimage:0.9.0
MAINTAINER Romain Pignolet <[email protected]>

WORKDIR /root

RUN apt-get update
RUN apt-get -y install build-essential \
libanyevent-httpd-perl \
libdata-uuid-libuuid-perl \
libdatetime-perl \
libdbd-sqlite3-perl \
libdbi-perl \
libemail-address-perl \
libemail-mime-perl \
libhtml-parser-perl \
libhtml-strip-perl \
libhttp-tiny-perl \
libhttp-date-perl \
libimage-size-perl \
libio-socket-ssl-perl \
libjson-perl \
libjson-xs-perl \
liblocale-gettext-perl \
libswitch-perl \
libexpat1-dev \
git \
nginx

RUN cpan; true

RUN curl -L -O http://search.cpan.org/CPAN/authors/id/C/CI/CINDY/AnyEvent-HTTPD-SendMultiHeaderPatch-v0.1.2.tar.gz && \
tar xf AnyEvent-HTTPD-SendMultiHeaderPatch-v0.1.2.tar.gz && \
cd AnyEvent-HTTPD-SendMultiHeaderPatch-v0.1.2 && \
perl Makefile.PL && \
make install

RUN git clone https://github.com/brong/Net-CardDAVTalk.git && \
cd Net-CardDAVTalk && \
perl Makefile.PL && \
make install

RUN perl -MCPAN -e 'my $c = "CPAN::HandleConfig"; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => "follow"); $c->edit(build_requires_install_policy => "yes"); $c->commit'

RUN cpan Class::ReturnValue Class::Accessor Set::Infinite \
DateTime::Set DateTime::Event::Recurrence DateTime::TimeZone DateTime::Event::ICal \
Text::vFile::asData Test::LongString Test::Warn \
Data::ICal UNIVERSAL::require Mail::IMAPTalk XML::Parser \
XML::SemanticDiff XML::Spice Email::Sender::Transport::SMTPS \
Net::DAVTalk Net::CalDAVTalk AnyEvent::HTTPD::CookiePatch \
AnyEvent::IMAP Cookie::Baker Date::Parse HTML::GenerateUtil \
Email::Sender:Simple Moose IO:All AnyEvent:HTTP Net::Server::PreFork \
List::Pairwise IO::LockedFile Template EV Net::DNS || true

RUN mkdir -p /home/jmap/data

COPY . /home/jmap/jmap-perl

WORKDIR /home/jmap/jmap-perl

RUN rm /etc/nginx/sites-enabled/default

COPY docker/nginx.conf /etc/nginx/sites-enabled/

COPY docker/entrypoint.sh /root/

EXPOSE 80

ENTRYPOINT ["sh", "/root/entrypoint.sh"]
36 changes: 18 additions & 18 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ Debian install instructions (port to your own OS as you like)
# Might need some software too

apt-get install build-essential \
libanyevent-httpd-perl \
libdata-uuid-libuuid-perl \
libdatetime-perl \
libdbd-sqlite3-perl \
libdbi-perl \
libemail-address-perl \
libemail-mime-perl \
libhtml-parser-perl \
libhtml-strip-perl \
libhttp-tiny-perl \
libhttp-date-perl \
libimage-size-perl \
libio-socket-ssl-perl \
libjson-perl \
libjson-xs-perl \
liblocale-gettext-perl \
libswitch-perl
libanyevent-httpd-perl \
libdata-uuid-libuuid-perl \
libdatetime-perl \
libdbd-sqlite3-perl \
libdbi-perl \
libemail-address-perl \
libemail-mime-perl \
libhtml-parser-perl \
libhtml-strip-perl \
libhttp-tiny-perl \
libhttp-date-perl \
libimage-size-perl \
libio-socket-ssl-perl \
libjson-perl \
libjson-xs-perl \
liblocale-gettext-perl \
libswitch-perl

cpan AnyEvent::HTTPD::CookiePatch
cpan AnyEvent::IMAP
Expand All @@ -40,7 +40,7 @@ config.example to config.json and replace XXX and YYY with your details.

Replace /etc/nginx/sites-available/default with the a symlink to nginx.conf

Run bin/blocking.pl in one screen
Run bin/apiendpoint.pl in one screen
Run bin/server.pl in another screen

There's various stuff hard coded too, oh well
Loading

0 comments on commit 943b4fd

Please sign in to comment.