diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..2d2ecd68da83a75d12046559eaa4023dde8eafbd --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git/ diff --git a/Dockerfile b/Dockerfile index 6fdfebf712a558794bdeb14cf2fdf00d53b7f6cc..7a785619dbbb6b49500b1435240b31243d153fd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,13 @@ FROM heroku/heroku:16-build WORKDIR /app -ENV WORKSPACE_DIR=/app/builds +ENV WORKSPACE_DIR="/app/builds" \ + S3_BUCKET="lang-python" \ + S3_PREFIX="heroku-16/" -RUN apt-get update && apt-get install -y python-pip +RUN apt-get update && apt-get install -y python-pip && rm -rf /var/lib/apt/lists/* -# Install bob-builder application -RUN pip install bob-builder==0.0.5 +COPY requirements.txt /app/ +RUN pip install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt -COPY . /app \ No newline at end of file +COPY . /app diff --git a/Makefile b/Makefile index 617be31e10d022ab6314d1982263ac8af17e810e..19045674cc9510fb4a2e7150437352618adb6473 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,20 @@ test-heroku-16: @docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-16" heroku/heroku:16-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;' @echo "" +buildenv-heroku-16: + @echo "Creating build environment (heroku-16)..." + @echo + @docker build --pull -t python-buildenv-heroku-16 . + @echo + @echo "Usage..." + @echo + @echo " $$ export AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar # Optional unless deploying" + @echo " $$ bob build runtimes/python-2.7.13" + @echo " $$ bob deploy runtimes/python-2.7.13" + @echo + @docker run -it --rm python-buildenv-heroku-16 + tools: git clone https://github.com/kennethreitz/pip-pop.git mv pip-pop/bin/* vendor/pip-pop/ - rm -fr pip-pop \ No newline at end of file + rm -fr pip-pop diff --git a/builds/README.md b/builds/README.md index a33c3adb2612791ca344b745281f65758bd2ffbb..294974391e6d0b3ad34c01ca51094e44bdeb010e 100644 --- a/builds/README.md +++ b/builds/README.md @@ -1,5 +1,7 @@ # Python Buildpack Binaries +For Cedar-14 stack +------------------ To get started with it, create an app on Heroku inside a clone of this repository, and set your S3 config vars: @@ -28,4 +30,12 @@ If this works, run `bob deploy` instead of `bob build` to have the result upload To speed things up drastically, it'll usually be a good idea to `heroku run bash --size PX` instead. -Enjoy :) \ No newline at end of file +For Heroku-16 stack +------------------- + +1. Ensure GNU Make and Docker are installed. +2. From the root of the buildpack repository, run: `make buildenv-heroku-16` +3. Follow the instructions displayed! + + +Enjoy :) diff --git a/requirements.txt b/requirements.txt index 394d44ad5920310b068f095d0b2bc7b36d716396..eadd035c898e9befd2c70f0274d56b5858498287 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -bob-builder==0.0.5 +# TODO: Replace this once the bob-builder changes on master are released: +https://github.com/kennethreitz/bob-builder/archive/54211376a8fb49c67ecbd6798bd45b55f4d125f4.zip