Skip to content

Commit

Permalink
Adding a Dockerfile and updating README
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Trac committed Jun 10, 2016
1 parent 6b7a083 commit cbdf2ae
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ubuntu:12.04

MAINTAINER cmfatih

# Env
ENV PHANTOMJS_VERSION 1.9.7

# Commands
RUN \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y vim git wget libfreetype6 libfontconfig bzip2 && \
mkdir -p /srv/var && \
wget -q --no-check-certificate -O /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 && \
tar -xjf /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C /tmp && \
rm -f /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 && \
mv /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/ /srv/var/phantomjs && \
ln -s /srv/var/phantomjs/bin/phantomjs /usr/bin/phantomjs && \
git clone https://github.com/n1k0/casperjs.git /srv/var/casperjs && \
ln -s /srv/var/casperjs/bin/casperjs /usr/bin/casperjs && \
apt-get autoremove -y && \
apt-get clean all


ADD . /opt/ge_checker

VOLUME ["/logs"]

WORKDIR /opt/ge_checker

CMD ["/usr/bin/phantomjs", "--ssl-protocol=any", "ge-cancellation-checker.phantom.js", "-v"]
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ The following must be installed and available in your `$PATH`:

**Note:** Many ISP's block port 25, used for email. If you want to set up email notifications for appointment cancellations and your ISP blocks port 25, a good way around this is to [set up Sendmail to send email through Gmail](http://linuxconfig.org/configuring-gmail-as-sendmail-email-relay).

### Docker ###
One simple way to run this without installing PhantomJS on your local machine is to use the included DockerFile.

docker build -t ge-cancellation-checker .
cp config.json.example config.json
# Make your edits to config.json
docker run ge-cancellation-checker

### Configuration ###

To get started, copy `config.json.example` to `config.json`. In your new config, fill out the following settings:
Expand Down Expand Up @@ -64,4 +72,4 @@ If you're interested in contributing, here are a few feature ideas that might im

* Add ability to not send an email when running `go-checker-cron.py` (maybe a `--no-email` flag?)
* Ignored dates: allow the user to provide a list of days for the checker to ignore
* Plugin system: update `ge-checker-cron.py` to allow configuration for running multiple phantom scripts and keeping track of multiple appointment systems (not just a Global Entry cheker - e.g., the DMV).
* Plugin system: update `ge-checker-cron.py` to allow configuration for running multiple phantom scripts and keeping track of multiple appointment systems (not just a Global Entry cheker - e.g., the DMV).

0 comments on commit cbdf2ae

Please sign in to comment.