From b6ef5af3d1e570ff38eb22121f5acd1bc10cf355 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 26 Aug 2015 00:35:12 -0400 Subject: [PATCH 1/2] Set `DYNO_TYPE_NUMBER` environment variable for each container 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 --- dokku | 1 + 1 file changed, 1 insertion(+) diff --git a/dokku b/dokku index dff382ed4..e692d1815 100755 --- a/dokku +++ b/dokku @@ -92,6 +92,7 @@ case "$1" in # start the app DOCKER_ARGS=$(: | pluginhook docker-args $APP deploy) DOCKER_ARGS+=" -e DYNO=$PROC_TYPE " + DOCKER_ARGS+=" -e DYNO_TYPE_NUMBER=$PROC_TYPE.$CONTAINER_INDEX " DOCKER_ARGS+=$(: | pluginhook docker-args-deploy $APP) BIND_EXTERNAL=$(pluginhook bind-external-ip $APP) From cd23310042142e3ad7ee4dcfc1c9835231a56b54 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 26 Aug 2015 02:30:57 -0400 Subject: [PATCH 2/2] Surround in single quotes --- dokku | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dokku b/dokku index e692d1815..f1adf488e 100755 --- a/dokku +++ b/dokku @@ -92,7 +92,7 @@ case "$1" in # start the app DOCKER_ARGS=$(: | pluginhook docker-args $APP deploy) DOCKER_ARGS+=" -e DYNO=$PROC_TYPE " - DOCKER_ARGS+=" -e DYNO_TYPE_NUMBER=$PROC_TYPE.$CONTAINER_INDEX " + DOCKER_ARGS+=" -e DYNO_TYPE_NUMBER='$PROC_TYPE.$CONTAINER_INDEX' " DOCKER_ARGS+=$(: | pluginhook docker-args-deploy $APP) BIND_EXTERNAL=$(pluginhook bind-external-ip $APP)