Skip to content

Commit

Permalink
Merge pull request #10 from sekjun9878/redis-url
Browse files Browse the repository at this point in the history
Export REDIS_URL when enabling/starting Redis. Fixes #8
  • Loading branch information
msjyoo committed Mar 17, 2015
2 parents d6f6c56 + 73df9f5 commit 8d2de1e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion commands
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ case "$1" in

sleep 1
;;

redis:start)
verify_app_name $APP

Expand Down Expand Up @@ -84,6 +84,10 @@ case "$1" in
dokku_log_info1 "Redis container linked: $APP -> $REDIS_CONTAINER_NAME"
sleep 1

# Create REDIS_URL env variable for library / connector autoconfiguration
dokku config:set $APP REDIS_URL="redis://redis:6379/0"
dokku_log_info1 "Creating Redis autoconfiguration environment variable"

dokku_log_info2 "Redis started:"
dokku_log_verbose "Application: $APP"
dokku_log_verbose "Redis: $REDIS_CONTAINER_NAME"
Expand Down Expand Up @@ -169,6 +173,9 @@ case "$1" in
rm -rf $HOST_DIR
fi

# Remove Redis autoconfiguration variable
dokku config:unset $APP REDIS_URL

dokku_log_info2 "Redis container destroyed:"
dokku_log_verbose "Application: $APP"

Expand Down

0 comments on commit 8d2de1e

Please sign in to comment.