erikras / react-redux-universal-hot-example

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

docs for deploying to digital ocean would be appreciated #541

Open rickbrunstedt opened 8 years ago

rickbrunstedt commented 8 years ago

I have quite hard to figure out how to deploy to digital ocean. Atm I git clone in the digital ocean machine every time. But that isn't very efficient.

quicksnap commented 8 years ago

I think we would consider a PR for some deployment instructions, but IMO it may be out of scope for this project.

Various platform deployments can differ significantly. It'd be tough to maintain that.

justingreenberg commented 8 years ago

@quicksnap i agree vendor-specific deployment instructions are outside the scope of this project... the heroku instructions are really just incidental to erik's live example

erikras commented 8 years ago

That said, if someone wanted to submit a docs/deployment/DigitialOcean.md, it wouldn't hurt anything. But it's not a support role that any of the project's primary contributors need concern themselves with. It would be nice, however, if as people figured out how to deploy to different platforms, they wanted to give back a little about their adventure to lubricate the path for subsequent travelers. Perhaps such a call to action in the readme would be beneficial.

whatifif commented 8 years ago

@erikras I have some trouble in deploying this app to Heroku, which you already succeeded as clearly seen in demo of this app. It would be great help if there is a document about how to deploy to Heroku.

Thanks for sharing this great work.

erikras commented 8 years ago

@whatifif Like this?

whatifif commented 8 years ago

I followed the procedure as mentioned in doc:

To get this project to work on Heroku, you need to: Remove the "PORT": 8080 line from the betterScripts / start-prod section of package.json. heroku config:set NODE_ENV=production heroku config:set NODE_PATH=./src heroku config:set NPM_CONFIG_PRODUCTION=false This is to enable webpack to run the build on deploy. The first deploy might take a while, but after that your node_modules dir should be cached.

But still there is error: /app/node_modules/babel/node_modules/babel-core/lib/polyfill.js:8 2015-11-18T04:47:22.761132+00:00 app[web.1]: [0] throw new Error("only one instance of babel/polyfill is allowed");

Heroku branch sends same error as above.

whatifif commented 8 years ago

I successfully launched the Heroku branch by commenting out the "require('babel/polyfill');" in "src/config.js (line 1)" and keeping "require('babel/polyfill');" in "src/client.js" (line 4).

bluematter commented 7 years ago

I am using git to deploy. So I have a repo on my Digital Ocean instance. I just push code and my work tree is always in sync with my local code.