Giter Site home page Giter Site logo

ember-deploy-s3-index's Issues

Pretty URL's

Hi, I'm looking into deploying my app to amazon, and it seems that a lot of people recommend putting it in S3.

My question is, being that this is an Ember App, how will URL's work? Is the use of hashtags mandatory in this case, or is there a way to redirect all requests to index.html ?

Thanks.

Tag releases

It would be great if this project tagged releases that were published to npm so it is possible to easily see what version corresponds to what point in the git commit history.

Support aws-sdk's IAM Roles

Right now, I have a CI server (Jenkins) doing deployments. That server has an IAM Role giving it READ/WRITE access to S3.

aws-sdk knows about role and will use them, but I believe the metadata_service is too strict.
Would it be possible to remove that validation and let aws-sdk fail later on if no credentials at all are given?

CredentialsError: Missing credentials in config
    at Object.parse (native)
    at /workspace/node_modules/ember-deploy-s3-index/node_modules/aws-sdk/lib/metadata_service.js:115:38

Readme: 404 in redirect XML should be 403?

@Kerry350 great plugin!

One thing, in your redirect XML in the Readme you redirect from a 404 error, for me I found I have to use 403. Any thoughts on this?

<RoutingRules>
    <RoutingRule>
        <Condition>
            <HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals>
        </Condition>
        <Redirect>
            <HostName><your-bucket-endpoint-from-static-website-hosting-options></HostName>
            <ReplaceKeyPrefixWith>#/</ReplaceKeyPrefixWith>
        </Redirect>
    </RoutingRule>
</RoutingRules>

Document deploying index and assets to same bucket

I'm trying to use ember-deploy-s3 and ember-deploy-s3-index together and I'm having trouble.

I want to host a number of files at the root of my domain: robots.txt, humans.txt, favicon.ico, opensearch.xml, etc. Instead of placing them in an assets.mydomain.com bucket I want to put them in my mydomain.com bucket along with my index files. These two plugins seem to trample on each other when the same bucket is used though.

I assume I am probably approaching this all wrong. What is the recommended way to host all assets out of the same bucket?

Thanks! ๐Ÿ˜„

Make this plugin 0.5.0 compatible

Hi Kerry,

Aaron from the ember-cli-deploy team here.

We're in the process of getting things ready for our 0.5.0 release of ember-cli-deploy which is quite a shift away from how the addon currently works. With this change comes the need to make sure existing ember-cli-deploy plugins (this is the new name for them, as opposed to adapters) are compatible with the new version.

Are you in a position to make a 0.5.0 compatible version of this plugin? Or to update this one?

I'm am more than happy to help out or guide you along the way if needed.

Please get in touch and let me know if this is something you're able to help, or if you need any help in doing so.

Cheers,
Aaron

Authentication method error

I get the following error after following the guide

Unable to sync: InvalidRequest: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.

Adapter cannot deploy index file

Here's an exerpt from the logs when running ember deploy --environment production C:\Users\Quantik\git\whatsyourimpact\impact-frontend>ember deploy --environment production
DEPRECATION: ember-cli/lib/errors/silent.js is deprecated, use silent-error instead.
DEPRECATION: ember-cli/lib/errors/silent.js is deprecated, use silent-error instead.
DEPRECATION: ember-cli/lib/errors/silent.js is deprecated, use silent-error instead.
DEPRECATION: ember-cli/lib/errors/silent.js is deprecated, use silent-error instead.
DEPRECATION: ember-cli/lib/errors/silent.js is deprecated, use silent-error instead.
DEPRECATION: ember-cli/lib/errors/silent.js is deprecated, use silent-error instead.
DEPRECATION: ember-cli/lib/errors/silent.js is deprecated, use silent-error instead.
Future versions of Ember CLI will not support v0.10.32. Please update to Node 0.12 or io.js
version: 1.13.1
Built project successfully. Stored in "dist/".
Uploading assets...
Assets upload successful. Done uploading.

Uploading dist/index.html...

You tried to use an unknown adapter: undefined. Please pass a supported adapter-type.

Here's an exerpt from my deploy.js file:

...
production: {
store: {
type: "S3",
accessKeyId: "KEY",
secretAccessKey: "SECRET",
bucket: "BUCKET",
acl: 'public-read', //optional, e.g. 'public-read', if ACL is not configured, it is not sent
hostName: "BUCKET.s3-website-us-west-2.amazonaws.com", // To be set with 'direct' indexMode
indexMode: 'direct',
prefix: ""
},
assets: {
type: "s3",
accessKeyId: 'KEY',
secretAccessKey: 'SECRET',
bucket: 'BUCKET'
}
}

Am I doing something wrong? It's my first time using it, so I can't say if it's related to a specific version of ember-cli

here are my versions:
version: 1.13.1
node: 0.10.32
npm: 2.12.1

PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint.

i am trying to ember deploy:list --environment production and getting PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

i managed to console.log the complete error which shows:

{ Code: 'PermanentRedirect',
  Message: 'The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.',
  Bucket: 'my.bucket',
  Endpoint: 'my.bucket.s3.amazonaws.com',
  RequestId: 'xxx',
  HostId: 'xxx' }

i believe this error is due to the fact that my bucket name contains a . but i'm not sure.

# config/deploy.js

module.exports = {
  production: {
    store: {
      type: "S3",
      accessKeyId: process.env.S3_ACCESS_KEY_ID,
      secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
      bucket: 'my.bucket',
      acl: 'public-read',
      hostName: 'my.bucket.s3-website-us-west-1.amazonaws.com',
      indexMode: 'direct',
      prefix: ''
    },

    assets: {
      type: "s3",
      accessKeyId: process.env.S3_ACCESS_KEY_ID,
      secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
      bucket: 'my.bucket'
    }
  }
}

thanks!

Is it possible to use deploy:index without the revision prefix?

First off I must thank you for the project and this great blog post about how to get up/running :)

http://kerrygallagher.co.uk/deploying-an-ember-cli-application-to-amazon-s3/

I got a ton of value from your post and wanted to say "thank you" for the time you took to write it!

Now my question => I realize this isn't the ideal use case but for simplicity ... is it possible to deploy the index.html without a revision prefix? I'm looking for the simplest deploy step at the moment and having a revision seems to introduce a manual step for us (we are not (yet) using the full redis/ember deploy setup Luke often talks about).

Thanks again for such a great open source project!

Correctly set Cache-Control headers on anything not uploaded to assets/

Currently, anything in the store gets the following headers when uploaded using ember deploy --environment production:

Cache-Control: max-age=63072000, public
Expires: Tue, 01 Jan 2030 00:00:00 GMT

This is problematic particularly for the index.html file, since it will get cached forever by anything downstream.

This happens when indexMode is set to either "direct" or "indirect".

This behavior is not present if the assets and index are uploaded, then activated with ember deploy:activate --revision project:rev --environment production.

Expected Result

Cache headers should be set to

Cache-Control: max-age=0, no-cache

when deploying via ember deploy.

Please release a new version

Since the silent-error package is now included, could we please get a new release in order to silence the deprecation warning. Thanks

Compatibility with cloudfront

Is it possible to use this adapter with cloudfront (and s3) ?

It seems that cloudfront doesn't use the Index Document specified by ember-deploy-s3-index on revision activation. Can anyone confirm please ?

As a non satisfying workaround, I wanted to set manually the "Default Root Object" of my Cloudfront distribution to the latest index.html revision (something like myapp:6512e6a.html), but cloudfront does not accept the colon character.

Improve `deploy:activate`

I've been considering putting together a PR that improves the behavior of deploy:activate.

My thoughts:

  1. ember deploy:activate with no arguments should activate the most recent version, simplifying the process.
  2. Allow passing the numbers displayed in deploy:list as arguments to deploy:activate
$ ember deploy:list 
version: 0.1.15
Found the following revisions: 

1) my-app:5a77e50 
2) my-app:b8256de 
3) my-app:c239613  

Use activate() to activate one of these revisions

$ ember deploy:activate 
# would activate my-app:5a77e50

$ ember deploy: activate 2
# would activate  my-app:b8256de

Do you think these would be useful features?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.