From 921ad4c19dae630cc4778c181ebc736b341ba730 Mon Sep 17 00:00:00 2001 From: Louise Yang Date: Wed, 30 Aug 2017 09:24:48 -0700 Subject: [PATCH 1/4] Add node & npm to requirements --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dddda8a..65e87c7 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ The following things are assumed to be true in this documentation. * You are running OSX. * You are using Python 2.7. (Probably the version that came OSX.) * You have [virtualenv](https://pypi.python.org/pypi/virtualenv) and [virtualenvwrapper](https://pypi.python.org/pypi/virtualenvwrapper) installed and working. +* You have [node and npm](https://www.npmjs.com/get-npm) installed and working. What's in here? ------------- From d5c50701d4be2857188fe4a4c06ac958b2e45148 Mon Sep 17 00:00:00 2001 From: Louise Yang Date: Wed, 30 Aug 2017 14:42:07 -0700 Subject: [PATCH 2/4] Dockerfile runs lunchbox --- .dockerignore | 1 + Dockerfile | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..63ff1d7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +tests/**/* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c8292be --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM artursmet/python-2.7-node-6 + +MAINTAINER Louise Yang + +COPY . /lunchbox/ +WORKDIR /lunchbox + +RUN pip install --no-cache-dir virtualenv virtualenvwrapper +RUN echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc +RUN /bin/bash -c 'source ~/.bashrc; mkvirtualenv lunchbox' +RUN pip install -r requirements.txt +RUN /bin/bash -c 'npm install' + +EXPOSE 80 + +ENTRYPOINT ["fab", "app"] \ No newline at end of file From 45f99c9afe6473dac9306724f6f5564d82e5edc2 Mon Sep 17 00:00:00 2001 From: Louise Yang Date: Wed, 30 Aug 2017 14:58:57 -0700 Subject: [PATCH 3/4] Adds docker instructions to readme --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 65e87c7..ab236b3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ * [What is this?](#what-is-this) * [Assumptions?](#assumptions) * [What's in here?](#what-is-in-here) -* [Quick start](#quick-start) +* [Docker Container quick start](#docker) +* [Bootstrap quick start](#quick-start) * [Configuration](#configuration) * [Deploy the desktop app](#deploy-the-desktop-app) * [About](#about) @@ -18,6 +19,14 @@ What is this? * *Factlist*: Produces a branded image with a list of items. * *Waterbug*: Creates a watermarked image with attribution. +Docker +------------- +*This is assuming you already have docker set up on your machine* + +1. `docker pull scprdev/lunchbox` +2. `docker run -p 80:8000 scprdev/lunchbox` +3. Visit http://localhost/ + Assumptions ------------- From 41302e309cd44bdb5e39789eb998121df0e9f076 Mon Sep 17 00:00:00 2001 From: Louise Yang Date: Wed, 30 Aug 2017 16:06:37 -0700 Subject: [PATCH 4/4] Updates Dockerfile towards more transparency * Uses 2.7.13-alpine3.6 https://hub.docker.com/_/python/ --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c8292be..166da31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ -FROM artursmet/python-2.7-node-6 +FROM python:2.7.13-alpine3.6 MAINTAINER Louise Yang COPY . /lunchbox/ WORKDIR /lunchbox +RUN apk add --update nodejs nodejs-npm alpine-sdk bash RUN pip install --no-cache-dir virtualenv virtualenvwrapper RUN echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc RUN /bin/bash -c 'source ~/.bashrc; mkvirtualenv lunchbox'