bbc / speculate

Automatically generates an RPM Spec file for your Node.js project
Other
66 stars 28 forks source link

add inline support to specify environment variables #15

Closed vtervo closed 8 years ago

robinjmurphy commented 8 years ago

Hi @vtervo. This is a nice feature.

I think I prefer specifying the environment is using an object. What do you reckon?

{
  "spec": {
    "environment": {
      "NODE_ENV": "prod",
      "FOO": "bar"
    }
  }
}
vtervo commented 8 years ago

Sounds good to me. I'll edit PR to use an object instead of an array.

robinjmurphy commented 8 years ago

Thanks for updating @vtervo.

Do you mind updating the configuration property to be environment rather than envVars? It just means that it matches the SystemdD directive a bit more closely.

I just have one question before merging.

Are you going to be deploying your RPM-packaged application to multiple environments? (e.g. staging/production)

Just checking because using this feature wouldn't work as well if you needed to change the environment variables on a per-environment basis.

vtervo commented 8 years ago

No problem. I missed envVars vs. environment in your previous comment. Updated version coming in soon.

No I'm not differentiating staging/production with environment systemd variable.

But I'm tinkering to add support for instantiated service files. I could then bring in instance name to node process using environment.

robinjmurphy commented 8 years ago

Released as 1.4.0.