-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker container for local development
- Loading branch information
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |