Skip to content

Commit

Permalink
Version 0.1.2 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswessels committed Jul 23, 2015
1 parent 3fc2ba8 commit ee12c40
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 20 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.

Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions includes/scripts/start_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
21 changes: 8 additions & 13 deletions includes/tupperbuild/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ var tupperwareJsonDefaults = {
};

var copyPath = '/app',
meteorRelease,
meteorReleaseString,
meteorVersion,
tupperwareJson = {};

/* Error out function */
Expand Down Expand Up @@ -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());
}
Expand Down Expand Up @@ -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...');
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions includes/tupperbuild/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -9,7 +9,7 @@
"author": "Chris Wessels <[email protected]>",
"license": "MIT",
"dependencies": {
"async": "^0.9.0",
"async": "^0.9.2",
"lodash": "^3.8.0",
"request": "^2.55.0"
}
Expand Down
4 changes: 2 additions & 2 deletions quickstart.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

QUICKSTART_VERSION="0.1.0"
QUICKSTART_VERSION="0.1.1"
PWD=`pwd`

# Defaults
Expand Down Expand Up @@ -33,7 +33,7 @@ cat <<EOF > ./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
Expand Down

0 comments on commit ee12c40

Please sign in to comment.