Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENV Variables not expanded #7

Closed
defel opened this issue Feb 8, 2015 · 7 comments
Closed

ENV Variables not expanded #7

defel opened this issue Feb 8, 2015 · 7 comments

Comments

@defel
Copy link

defel commented Feb 8, 2015

Hi,

I installed the dokku-rethinkdb-plugin (HEAD) on dokku-alt (HEAD).

I have the problem, that all ENV variables except RETHINKDB_LINK_NAME are not expanded:

"RDB_HOST": "$RETHINKDB_LINK_PORT_28015_TCP_ADDR",
"RDB_PORT": "$RETHINKDB_LINK_PORT_28015_TCP_PORT",
"RETHINKDB_LINK_NAME": "/app_env_1423425716_27225/rethinkdb_link",
"RETHINKDB_HOST": "$RETHINKDB_LINK_PORT_28015_TCP_ADDR",
"RETHINKDB_PORT": "$RETHINKDB_LINK_PORT_28015_TCP_PORT",

Any ideas what the problem is and how I can fix it?

@defel
Copy link
Author

defel commented Feb 8, 2015

ok, it works after executing dokku rethinkdb:bind-webui foo

@defel defel closed this as completed Feb 8, 2015
@stuartpb
Copy link
Owner

stuartpb commented Feb 8, 2015

That's weird, you shouldn't have to bind the webui. In fact, binding the webui shouldn't have anything to do with it.

I mean, in general, I've given up on this plugin, having moved on to Plushu months ago (and having implemented a better alternative for attaching systems like RethinkDB with the plushu-addons plugin about a month ago), so if users have any problems with this plugin, my only advice moving forward is pretty much going to be "install Plusku and use addons:add rethinkdb instead".

But I still remember what was involved in the design of this plugin, and binding explicit ports shouldn't change the way the environment variables expand, unless Dokku has made some really weird changes upstream.

@defel
Copy link
Author

defel commented Feb 8, 2015

maybe the reason is that I use dokku-alt instead of dokku? I thought the plugins are compatible to each other, does not seems so.

It helps me, that port binding should not be necessary - i will try some things out then

@defel
Copy link
Author

defel commented Feb 8, 2015

hmm, I dont understand where the env var RETHINKDB_LINK_PORT_28015_TCP_PORT is created, it is named RETHINKDB_LINK_PORT_29015_TCP for me - is this env var set by docker? (and is obviously the port of the rethink cluster (not for connections))

So far, I only see that the port 49155 is created after I execute dokku rethinkdb:bind-cluster <app>, then the file /home/dokku/app/rethinkdb/PUBLISH is created and the env file BIND_FILE is available, in which the port is written (::29015).

I think the port 28015 should be already be created on start of the docker image, and it should be linkable to other apps. I will look into it and see if I can fix this for dokku-alt.

@stuartpb
Copy link
Owner

stuartpb commented Feb 8, 2015

hmm, I dont understand where the env var RETHINKDB_LINK_PORT_28015_TCP_PORT is created, it is named RETHINKDB_LINK_PORT_29015_TCP for me - is this env var set by docker?

Docker sets several env vars that start with RETHINKDB_LINK_PORT_29015_TCP when a container exposing port 28015 is linked with the name rethinkdb-link.

Which reminds me, this should be using the official RethinkDB Docker image now.

@defel
Copy link
Author

defel commented Feb 8, 2015

tested locally dockerfile/rethinkdb, looks good:

docker run -d -p 8080:8080 -p 28015:28015 -p 29015:29015 -v /data/rethinkdb:/data dockerfile/rethinkdb 

@stuartpb
Copy link
Owner

stuartpb commented Feb 8, 2015

dockerfile/rethinkdb is not the official image (dockerfile is the name Pilwon Huh nabbed to legitimize a bunch of images using an opinionated base that imports useless bloat like vim). rethinkdb (no prefix) is the official image.

I repeat: Official images do not have a prefix. The dockerfile prefix is just some guy who took the name dockerfile because it looks official.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants