Skip to content

Commit

Permalink
changing to only download files
Browse files Browse the repository at this point in the history
  • Loading branch information
paleozogt authored and Aaron Simmons committed Nov 24, 2015
1 parent be504e8 commit b21ae5f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
22 changes: 11 additions & 11 deletions README.md
@@ -1,52 +1,52 @@
# S3 Tarball Buildpack
# S3 Download Buildpack

This is a [Heroku Buildpack](https://devcenter.heroku.com/articles/buildpacks)
that can download tarballs from private [Amazon S3](http://aws.amazon.com/s3/)
that can download files from private [Amazon S3](http://aws.amazon.com/s3/)
buckets. It gives you a way of deploying pre-built code to
[Heroku](http://www.heroku.com/) without making it publicly accessible.

## Usage

$ heroku config:add BUILDPACK_URL=https://github.com/paulhammond/s3-tarball-buildpack.git
$ heroku config:add BUILDPACK_URL=https://github.com/paleozogt/s3-download-buildpack.git

$ cat .buildpack-s3-tarballs
$ cat .buildpack-s3-downloads
AWS_ACCESS_KEY_ID=AKIA0000000000000000
AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
s3://bucket/path/to/tarball.tgz
s3://bucket/path/to/somethingelse.tgz
s3://bucket/path/to/somethingelse.zip

You probably want to use an [IAM key](http://aws.amazon.com/iam/) with limited
access. This code only requires `s3:GetObject` access to files.

If you don't want to check your IAM keys into revision control, you can store
them in Heroku's config system. Keys specified in the .buildpack-s3-tarballs
them in Heroku's config system. Keys specified in the .buildpack-s3-downloads
file have precedence over keys in the config system.

$ heroku config:add BUILDPACK_URL=https://github.com/paulhammond/s3-tarball-buildpack.git
$ heroku config:add BUILDPACK_URL=https://github.com/paleozogt/s3-download-buildpack.git
$ heroku config:add AWS_ACCESS_KEY_ID=AKIA0000000000000000
$ heroku config:add AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

$ cat .buildpack-s3-tarballs
$ cat .buildpack-s3-downloads
s3://bucket/path/to/tarball.tgz

In most cases you'll use this buildpack in conjunction with other buildpacks
using [heroku-buildpack-multi](https://github.com/ddollar/heroku-buildpack-multi):

$ heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git

$ cat .buildpack-s3-tarballs
$ cat .buildpack-s3-downloads
AWS_ACCESS_KEY_ID=AKIA0000000000000000
AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
s3://bucket/path/to/tarball.tgz

$ cat .buildpacks
https://github.com/paulhammond/s3-tarball-buildpack.git
https://github.com/paleozogt/s3-download-buildpack.git
https://github.com/ryandotsmith/null-buildpack.git

## See also

* [heroku-buildpack-vendorbinaries](https://github.com/peterkeen/heroku-buildpack-vendorbinaries)
* [s3simple](https://github.com/paulhammond/s3simple)
* [s3simple](https://github.com/paleozogt/s3simple)
* [Heroku Slug API](https://blog.heroku.com/archives/2013/12/20/programmatically_release_code_to_heroku_using_the_platform_api)

## Licence
Expand Down
8 changes: 4 additions & 4 deletions bin/compile
@@ -1,6 +1,6 @@
#!/bin/bash
# bin/compile <build-dir> <cache-dir> <env-dir>
# See https://github.com/paulhammond/s3-tarball-buildpack for license and docs
# See https://github.com/paleozogt/s3-download-buildpack for license and docs

working=$(pwd)
mkdir -p "$2"
Expand Down Expand Up @@ -75,11 +75,11 @@ while read line; do
export "$line"
;;
s3://*)
echo "-----> s3tarballing $line"
s3simple get "$line" | tar -zx
echo "-----> s3 downloading $line"
s3simple get "$line" > `basename $line`
;;
*)
echo "unknown line $line"
;;
esac
done < .buildpack-s3-tarballs
done < .buildpack-s3-downloads
6 changes: 3 additions & 3 deletions bin/detect
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
# bin/detect <build-dir>
# See https://github.com/paulhammond/s3-tarball-buildpack for license and docs
# See https://github.com/paleozogt/s3-download-buildpack for license and docs

if [ -f $1/.buildpack-s3-tarballs ]; then
echo "S3Tarball"
if [ -f $1/.buildpack-s3-downloads ]; then
echo "S3Download"
exit 0
else
exit 1
Expand Down
2 changes: 1 addition & 1 deletion bin/release
@@ -1,5 +1,5 @@
#!/bin/sh
# bin/release <build-dir>
# See https://github.com/paulhammond/s3-tarball-buildpack for license and docs
# See https://github.com/paleozogt/s3-download-buildpack for license and docs

echo "--- {}"

0 comments on commit b21ae5f

Please sign in to comment.