Deploy untracked files with git and elastic beanstalk

While deploying an update to Jewelbots.com (transitioning the site over to node.js so that we can use Mailchimp’s server-side API), I ran into an issue where Elastic Beanstalk’s integrated eb deploy feature will only deploy files git is tracking when a git repository is present.

If you want to deploy API Keys, but don’t want them tracked in git, this presents a problem.

I took to twitter to ask for help:

The responses trickled in:

This is… sub-optimal, to say the least.

Luckily, a member of the Elastic Beanstalk team responded:

And further elaborated:

Excellent! By adding an .ebignore file that is set up to ignore files I don’t want deployed, I can ensure that all of my project files are deployed. The .ebignore is in fact, an .ebdontdeploy.

This is a very new development; so new that it was still being requested in April. My hat’s off to the Elastic Beanstalk team (and especially Nick Humrich) for cluing me in to it. I only wish it was linked to by other parts of the Elastic Beanstalk 3.0 CLI docs.

If you need to deploy files that aren’t tracked by git to elastic beanstalk, .ebignore is the answer.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s