erikras / react-redux-universal-hot-example

A starter boilerplate for a universal webapp using express, react, redux, webpack, and react-transform
MIT License
11.99k stars 2.5k forks source link

How to deploy this boilerplate to Elastic Beanstalk? #1085

Open yoihito opened 8 years ago

yoihito commented 8 years ago

Hey guys! I tried to publish my app based on this boilerplate to AWS Elastic Beanstalk. Deploy failed. I got something like this:

 react-redux-universal-hot-example@0.9.0 start /var/app/current
 concurrent --kill-others "npm run start-prod" "npm run start-prod-api"
 sh: concurrent: command not found

How can i resolve it?

jaraquistain commented 8 years ago

I believe the command is supposed to be: concurrently --kill-others "npm run start-prod" "npm run start-prod-api" concurrently not concurrent

ghost commented 8 years ago

Same problem, concurrently dosen't fix it.

hanjukim commented 8 years ago

You should remind that ElasticBeanstalk(EB) npm install's with --production option. So you have to move concurrently module to "dependencies" from "devDependencies" in package.json.

mpisanko commented 8 years ago

Alternatively you can install it globally (so that the executable is on the path). Add a file .ebextensions/01_install_concurrently.config with content:

commands:
  01_install_concurrently:
    command: "npm i -g concurrently"
gimdongwoo commented 8 years ago

@mpisanko Thanks for your advise. But, it has 'npm not found' error. some changing needed to following.

container_commands:
  01_install_concurrently:
    command: "export PATH=$PATH; npm install -g concurrently@0.1.1"

But, I failed deploy to Beanstalk.

gimdongwoo commented 8 years ago

Sadly, Timeout error on t2.micro.

If using docker, it success.

Create the docker image, push to docker hub and deploy to AWS EB Docker.

https://github.com/erikras/react-redux-universal-hot-example/pull/946 & https://github.com/jlchereau/Docker-AWS/blob/master/docs/NGINX.md

@hanjukim Thank you!!

demobo-com commented 8 years ago

Did anyone successfully deploy this example app to Beanstalk?

hanjukim commented 8 years ago

@demobo-com Yes I did, after some modifications

demobo-com commented 8 years ago

@hanjukim can you shed some light on this? Maybe share a README guide on deployment on Beanstalk. Thanks a lot.

hanjukim commented 8 years ago

@demobo-com Check out #946 you better use docker because node.js version that ElasticBeanstalk uses is 4.x

gimdongwoo commented 8 years ago

@demobo-com Maybe, you need to study docker.

yoihito commented 8 years ago

@demobo-com I used docker for deployment too, but It wasn't enough memory for npm install with t2.micro or t2.small so I used t2.medium.

2016-06-18 13:02 GMT+03:00 Dongwoo Gim notifications@github.com:

@demobo-com https://github.com/demobo-com Maybe, you need to study docker.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/erikras/react-redux-universal-hot-example/issues/1085#issuecomment-226933532, or mute the thread https://github.com/notifications/unsubscribe/ABn8atzUT9_PuPvYZK1lLypOfOPJwPoPks5qM8IggaJpZM4IC2tE .

Best regard Vadim Gribanov

Linkedin: https://www.linkedin.com/in/yoihito Skype: v1mk550 Github: https://github.com/yoihito

gimdongwoo commented 8 years ago

@yoihito docker image make localy and push to docker-hub.

elastic beanstalk only running your docker-image, don't run npm install.