Skip to content

Commit

Permalink
Docker container for local development
Browse files Browse the repository at this point in the history
  • Loading branch information
dhcole committed Aug 25, 2015
1 parent 67180e7 commit 68ddf64
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM node:0.10-onbuild

ENV BRANCH= \
GITHUB_TOKEN= \
GITHUB_CLIENT_ID= \
GITHUB_CLIENT_SECRET= \
GITHUB_CLIENT_CALLBACK_URL= \
GITHUB_WEBHOOK_URL= \
GITHUB_WEBHOOK_SECRET= \
FEDERALIST_S3_BUCKET= \
AWS_ACCESS_KEY_ID= \
AWS_SECRET_ACCESS_KEY= \
SAILS_LOG_LEVEL= \
PORT=3000

RUN npm run materialize

# Set up Jekyll
RUN apt-get update && \
apt-get install --yes ruby-full && \
gem install bundler && \
bundle install

EXPOSE 3000

ENTRYPOINT ["./scripts/docker-start.sh"]
11 changes: 11 additions & 0 deletions scripts/docker-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

if [ $BRANCH ]; then
git checkout -b $BRANCH master
git checkout $BRANCH
git pull https://github.com/18f/federalist.git $BRANCH
if [ "$BRANCH" != "master" ]; then
npm update
fi
fi
npm start

0 comments on commit 68ddf64

Please sign in to comment.