diff --git a/CHANGELOG.md b/CHANGELOG.md index b671fb2..f5afafc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ ## Change log +### 0.1.2 (2015-07-23) + +- Updated Node.js. +- Switched from Docker Hub to Quay.io as primary Docker Repository host (better auto-tagging). Docker Hub will still build the latest releases, but without tagging the version release. +- Updated Quickstart with new `FROM` directive. +- Updated Tupperbuild with latest dependencies. + +Bundles: + +- Node.js 0.10.40 +- Tupperbuild 0.1.1 +- Quickstart 0.1.1 +- PhantomJS 1.9.8 (optional) +- ImageMagick 8:6.7.7.10-5+deb7u3 (optional) + ### 0.1.1 (2015-07-03) - Updated Node.js. diff --git a/Dockerfile b/Dockerfile index f3b76ae..baea687 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM debian:wheezy MAINTAINER Chris Wessels (https://github.com/chriswessels) -ENV NODE_VERSION="0.10.39" PHANTOMJS_VERSION="1.9.8" IMAGEMAGICK_VERSION="8:6.7.7.10-5+deb7u3" +ENV NODE_VERSION="0.10.40" PHANTOMJS_VERSION="1.9.8" IMAGEMAGICK_VERSION="8:6.7.7.10-5+deb7u3" COPY includes /tupperware diff --git a/README.md b/README.md index 8084f61..ca50423 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This is a base Docker image that allows you to bundle your [Meteor.js](https://www.meteor.com) application into a lean, production-ready Docker image that you can deploy across your containerised infrastructure. +[![Docker Repository on Quay.io](https://quay.io/repository/chriswessels/meteor-tupperware/status "Docker Repository on Quay.io")](https://quay.io/repository/chriswessels/meteor-tupperware) + It includes [Node.js](https://nodejs.org/) and your bundled application (with platform-correct native extensions where required by included npm modules). You can also configure meteor-tupperware to install PhantomJS and ImageMagick if these are dependencies of your application. Please see the [CHANGELOG](https://github.com/chriswessels/meteor-tupperware/blob/master/CHANGELOG.md) for the latest bundled library versions and changes. @@ -24,7 +26,7 @@ After running the quickstart script, and assuming you have Docker running, you c Using meteor-tupperware is very simple. Create a `Dockerfile` in your Meteor project directory with the following contents: - FROM chriswessels/meteor-tupperware + FROM quay.io/chriswessels/meteor-tupperware This base image contains build triggers that will run when you build your app image. These triggers will build your app, install any dependencies, and leave you with a lean, production-ready image. @@ -56,7 +58,7 @@ This example will run your Meteor application configured to connect to Mongo at Example of baking options into your image using your `Dockerfile` so you don't have to pass them in at runtime: - FROM chriswessels/meteor-tupperware + FROM quay.io/chriswessels/meteor-tupperware ENV MONGO_URL="mongodb://url" MONGO_OPLOG_URL="mongodb://oplog_url" ROOT_URL="http://yourapp.com" ## Build configuration diff --git a/includes/scripts/start_app.sh b/includes/scripts/start_app.sh index 753cd67..a77f8ee 100644 --- a/includes/scripts/start_app.sh +++ b/includes/scripts/start_app.sh @@ -19,4 +19,6 @@ if [ -z "$METEOR_ENV" ]; then export METEOR_ENV="production" fi +echo "> meteor-tupperware is starting your application with NODE_ENV=$NODE_ENV and METEOR_ENV=$METEOR_ENV..." + exec node $OUTPUT_DIR/bundle/main.js "$@" diff --git a/includes/tupperbuild/main.js b/includes/tupperbuild/main.js index fdd2cae..e28638a 100644 --- a/includes/tupperbuild/main.js +++ b/includes/tupperbuild/main.js @@ -18,7 +18,8 @@ var tupperwareJsonDefaults = { }; var copyPath = '/app', - meteorRelease, + meteorReleaseString, + meteorVersion, tupperwareJson = {}; /* Error out function */ @@ -54,7 +55,7 @@ function printBanner (done) { function checkCopyPath (done) { /* Check for .meteor folder in Dockerfile app copy path and extract meteor release version */ try { - meteorRelease = fs.readFileSync(copyPath + '/.meteor/release'); + meteorReleaseString = fs.readFileSync(copyPath + '/.meteor/release'); } catch (e) { suicide("This doesn't look like a Meteor project.", e.toString()); } @@ -218,10 +219,10 @@ function installAppDeps (done) { } function downloadMeteorInstaller (done) { - var meteorVersion, - versionRegex = new RegExp('^METEOR@(.*)\n', 'ig'); + var versionRegex = new RegExp('^METEOR@(.*)\n', 'ig'); + + var matches = versionRegex.exec(meteorReleaseString); - var matches = versionRegex.exec(meteorRelease); meteorVersion = matches[1]; console.log('Downloading Meteor ' + meteorVersion + ' Installer...'); @@ -252,6 +253,8 @@ function downloadMeteorInstaller (done) { } function installMeteor (done) { + console.log('Installing Meteor ' + meteorVersion + '...'); + child_process.spawn('sh', ['/tmp/install_meteor.sh'], { stdio: 'inherit' }).on('exit', function (code) { if (code !== 0) { suicide('installer exit code: ' + code); @@ -318,11 +321,3 @@ async.series([ npmInstall, printDone ]); - -// steps -// check meteor project validiity -// attempt reading tupperware.json -// download and install deps (phantom or imagemagick) -// check meteor version and download and install meteor -// use meteor build on project -// remove meteor diff --git a/includes/tupperbuild/package.json b/includes/tupperbuild/package.json index 283ee47..71d960c 100644 --- a/includes/tupperbuild/package.json +++ b/includes/tupperbuild/package.json @@ -1,6 +1,6 @@ { "name": "tupperbuild", - "version": "0.1.0", + "version": "0.1.1", "description": "Dockerfile ON BUILD script for meteor-tupperware", "main": "main.js", "scripts": { @@ -9,7 +9,7 @@ "author": "Chris Wessels ", "license": "MIT", "dependencies": { - "async": "^0.9.0", + "async": "^0.9.2", "lodash": "^3.8.0", "request": "^2.55.0" } diff --git a/quickstart.sh b/quickstart.sh index 1760048..ebaee17 100644 --- a/quickstart.sh +++ b/quickstart.sh @@ -1,6 +1,6 @@ #!/bin/sh -QUICKSTART_VERSION="0.1.0" +QUICKSTART_VERSION="0.1.1" PWD=`pwd` # Defaults @@ -33,7 +33,7 @@ cat < ./Dockerfile # https://github.com/chriswessels/meteor-tupperware # Inherit from chriswessels/meteor-tupperware image -FROM chriswessels/meteor-tupperware +FROM quay.io/chriswessels/meteor-tupperware # The maintainer of your app image $maintainer_string