Franklin Build
![franklin](https://s-media-cache-ak0.pinimg.com/236x/d9/f9/97/d9f997346e9e651f152ad98f3ffde330.jpg)
Contributing
Two things to note about contributing to this project:
- Follow common Go best-practices as presented in the fantastic Effective Go document.
- Use gofmt before committing any code
Getting Started
Since this project is very lightweight and requires building docker images, we are NOT currently run it using docker to avoid "Docker in Docker" (DinD) for the moment. This will likely change in the future as the need arises.
To install, run go get in your go path:
go get github.com/istrategylabs/franklin-build
This will install all packages and dependencies
To install and compile manually use the following steps:
git clone https://github.com/istrategylabs/franklin-build/
go get
cd franklin-build
make build
Environment Variables
The following environment variables will need to be set:
BUILD_LOCATION
ENV
DEPLOY_ROOT_FOLDER
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_BUCKET
- Set the BUILD_LOCATION environment variable (location where project will build to):
export BUILD_LOCATION=<location>
- Set the ENV environment variable (production or test):
export ENV=test
- Set the DEPLOY_ROOT_FOLDER variable to the folder where successfully build projects will be rsync'd to. Nginx in
franklin
will have the same exact setting. export DEPLOY_ROOT_FOLDER=/var/www/franklin/
- Local dev only. Used to send built files to Amazon S3
- Local dev only.
- The name of the bucket on S3 to send the files to
Running
make run
- Make a POST request to
localhost:3000/build
with a body similar to what is found in test/sample_data.json
- You can run the test suite by running
make test
Deployment
All you need to do to deploy (if your keys are on the server) is run fab {{ environment }} deploy