Rick
Rick

Reputation: 8846

Set Dokku ENV vars on first app push?

I am deploying an app which requires certain ENV vars to be set in order to run (app shuts down if they are not set).

When I try to deploy the app, I get the following error:

-----> Waiting for 10 seconds ...
remote: App container failed to start!!

this is because

  1. The app can't start without certain ENV vars.
  2. (as far as I know) I can't set Dokku ENV vars for an app that doesn't exist yet.

Is it possible to set ENV vars when pushing an app for the first time?

I tried to set the ENV vars before I push, but obviously:

ssh dokku@server config:set 00-default FOO=bar
App 00-default does not exist

Additional Information: I would prefer not to put the ENV vars in the procfile, because it is for an open source project. Putting configuration into source control would not be ideal.

Upvotes: 0

Views: 778

Answers (1)

mikabytes
mikabytes

Reputation: 2167

  1. Create the app using dokku apps:create <name>
  2. Set the ENV virables using dokku config:set <name> <ENVS...>
  3. Push code

Upvotes: 3

Related Questions