ember-cli-deploy / ember-cli-deploy-s3

An ember-cli-deploy plugin to upload to s3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for zipping files [FastBoot]

Jarred-Sumner opened this issue · comments

This downloader for the FastBoot App Server works with AWS S3 to download and unzip the latest version of your deployed application.

fastboot-s3-downloader appears to require files stored in S3 to be zipped but ember-cli-deploy-s3 does not have an option to zip files and then send it to s3. I believe this is true of fastboot-s3-notifier, too. This makes deploying a FastBoot app to S3 using ember-cli-deploy-s3 very tricky.

Is there a way to do this without writing my own ember-cli-deploy plugin?

Also, should I be filing this issue in the FastBoot App Server repo, in this repo, or in the fastboot-s3-notifier + fastboot-s3-downloader repos?

@Jarred-Sumner I expect that using this plugin with ember-cli-deploy/ember-cli-deploy-gzip would address this issue. Can you confirm?

Okay, I will read about how to configure ember-cli-deploy-gzip to take the dist folder, turn it into a .zip (vs a .gz) and then send that off to S3 via ember-cli-deploy-s3.

I've tried using ember-cli-deploy-zip but all it does is create a archive.zip of the current directory, and I'm having trouble figuring out how to get ember-cli-deploy-s3 to upload that to S3.

Does it make sense for what I'm trying to do to be officially supported, since Ember FastBoot is something officially supported and, unless I'm doing something dumb (probably am), the recommended way to deploy a FastBoot app doesn't work?

@Jarred-Sumner .gz (gzip) is a different format than .zip (ZIP), so my suggestion of ember-cli-deploy-gzip may not be a good one. I definitely agree that it should be easier and better documented than it is today to use ember-cli-deploy in fastboot scenarios. Adding ZIP archiving capabilities to the s3 plugin is not the way we would want to go though -- it is antithetical to the plugin/pipeline model. I think the ideal pipeline here would be something like this: ember-cli-deploy-build builds the app, then ember-cli-deploy-zip (or similar) prepares a ZIP archive of the dist dir, then ember-cli-deploy-s3 uploads that dist dir to an s3 bucket. That should be achievable by configuring the plugins to handle the previous plugins output correctly.

+1 for @lukemelia 's suggestion

@lukemelia That makes sense. I ended up fixing it temporarily by using ember-cli-deploy-ssh on a machine that wasn't powerful enough, and then the server fell over. I'm looking into how to setup Ember FastBoot now either using elastic beanstalk or AWS Lambda.

hey, you should check this out https://github.com/nicollejimenez/ember-cli-deploy-s3-zip it will create the zip and upload it to S3 into a given bucket and destination, we will be adding tests and documentation but it works

I use Ember CLI Deploy Fastboot S3. Works perfectly.

The only feature it's missing is revision activation, similar to ember-cli-deploy-s3-index.