iheanyi / ember-cli-deploy-digitalocean

Deploy your FastBoot Ember applications to DigitalOcean droplets. www.digitalocean.com
MIT License
22 stars 4 forks source link

Difficulty setting up, possibly update readme? #14

Open openhouse opened 7 years ago

openhouse commented 7 years ago

Yay! It works! Here are the steps I took to get this working:

# ember -v
ember-cli: 2.10.1
node: 7.4.0
os: darwin x64

Tested my app, fastboot works locally.

# install addons
ember install ember-cli-deploy
ember install ember-cli-deploy-build
ember install ember-cli-deploy-digitalocean
cd node_modules/ember-cli-deploy-digitalocean
npm install

Get Digital Ocean Access Token https://cloud.digitalocean.com/settings/api/tokens

Generate SSH keys https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

Set terminal's environment variables in ~/.bash_profile

# add to bottom of ~/.bash_profile
export DO_ACCESS_TOKEN=digitalOceanAccessTokenHere
export PRIVATE_KEY_DIR=pathToYourPrivateSSHKeyFile
export PASSPHRASE=passphraseYouUsedToGenerateYourSSHKey

Create "one-click app" digital ocean droplet

Once your droplet is created...

In your project directory ember do:provision In the wizard

Use DNS to point your domain name at the ip address given.

Whitelist your domain name for fastboot in config/environment.js https://github.com/ember-fastboot/ember-cli-fastboot#host

ember deploy production

takes a minute, then presto! it works! Thanks @iheanyi!

iheanyi commented 7 years ago

Hey, I would love it if you could open up a PR and help with this one. If not, I'll try and get to it soon.

openhouse commented 7 years ago

My steps from earlier aren't working today. I have a fresh "ember-welcome-page" fastboot app with all the dependencies up to date. I follow the steps above, which used to work, but after deploying to Digital Ocean I see 502 Bad Gateway.

It must be due to updated dependencies. Will dig into this more tomorrow.

#ember -v
ember-cli: 2.13.1
node: 7.10.0
os: darwin x64