这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@josegonzalez
Copy link
Member

This will allow users to inspect the underlying environment and conditionally run different commands based upon the DYNO_TYPE_NUMBER. The values will be set in the following format:

web.1
web.2
worker.1
worker.2
clock.1

Users of process managing plugins and dockerfiles can check the DYNO_TYPE_NUMBER and set a specific command to run.

Closes #1350

This will allow users to inspect the underlying environment and conditionally run different commands based upon the `DYNO_TYPE_NUMBER`. The values will be set in the following format:

    web.1
    web.2
    worker.1
    worker.2
    clock.1

Users of process managing plugins and dockerfiles can check the `DYNO_TYPE_NUMBER` and set a specific command to run.

Closes #1350
@josegonzalez
Copy link
Member Author

I have to test what the env vars look like in the container (do they have quotes or not) before merging

@josegonzalez
Copy link
Member Author

Seems legit:

root@dokku:~/dokku# dokku enter ruby-sample web
u32414@dc396d0e2d47:~$ env
HOSTNAME=dc396d0e2d47
CURL_CONNECT_TIMEOUT=5
DYNO_TYPE_NUMBER=web.1
CACHE_PATH=/cache
HEROKUISH_VERSION=0.3.2
RACK_ENV=production
DYNO=web
PATH=/app/bin:/app/vendor/bundle/bin:/app/vendor/bundle/ruby/2.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SELF=/exec
PWD=/app
LANG=en_US.UTF-8
SELF_EXECUTABLE=/bin/herokuish
HOME=/app
SHLVL=3
GEM_PATH=/app/vendor/bundle/ruby/2.1.0:
CURL_TIMEOUT=30
PORT=5000
_=/usr/bin/env

josegonzalez added a commit that referenced this pull request Aug 30, 2015
Set `DYNO_TYPE_NUMBER` environment variable for each container
@josegonzalez josegonzalez merged commit ae2e0bc into master Aug 30, 2015
@josegonzalez josegonzalez deleted the 1350-dyno-type-number branch August 30, 2015 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants