iheanyi / ember-cli-deploy-digitalocean

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

sample configuration #12

Open alidcast opened 8 years ago

alidcast commented 8 years ago

Is there a sample configuration for how to specify environment variables in config?

Also, does this deploy only work with ember fastboot applications?

iheanyi commented 8 years ago

@alidcastano - I probably should add one of those, huh? D'oh, I'll get on it!

And for the moment, yes, it only works with Ember Fastboot applications, but I'm hoping to change this in the future so that it's rendering-agnostic

brandensilva commented 8 years ago

@iheanyi I'm confused at how you have the environment variables setup. I've been trying to define these in config/deploy.js without much luck. Can you please share your config/deploy.js file?

After running ember do:provision I continue to hit the "Environment Variable DO_ACCESS_TOKEN is not set!" error.

iheanyi commented 8 years ago

So we figured out what the issue was for @brandensilva's case in that you have to actually have the access token set in your environment variables. Not in your config/environment.js or a dotfiles file, but your actual system environment vars.

ryanponce commented 7 years ago

So something like this won't work? I'm running into some of the same issues.

do: {
  DO_ACCESS_TOKEN: process.env.DO_ACCESS_TOKEN,
  PRIVATE_KEY_DIR: process.env.PRIVATE_KEY_DIR,
  PASSPHRASE: process.env.PASSPHRASE,
  DROPLET_USERNAME: process.env.DROPLET_USERNAME,
  DROPLET_PASSWORD: process.env.DROPLET_PASSWORD
}
brandensilva commented 7 years ago

@ryanponce Yeah I don't think that will work after discussing this with @iheanyi. So you need to run the commands in your bash shell or store them in your .bashrc file for them to persist.

What would be really cool though is if we can hook into the deploy.js ENV file or the Ember app ENV file for these configuration variables. I haven't had time to look over how one might approach this yet, but I imagine there are some examples out there from other ember-cli-deploy addons that do incorporate the ENV variables.

ryanponce commented 7 years ago

@brandensilva Oh I see. Thanks for the quick reply.

Yeah, it seems like there are some good examples out there like the s3 plugin. I'll see if I can look into it a little.

iheanyi commented 7 years ago

@brandensilva - I'm gonna look at maybe integration with Ember-CLI-dotenv perhaps to get that working. I need to finish rewriting the app first, though, to work with Fastboot App Server.

iheanyi commented 7 years ago

@ryanponce - The reasons why I personally don't expose those in that regard is because of security concerns. Can look into it more though.