Open sglebs opened 8 years ago
I see this in the way you run:
docker run $(bind_ip_options) -d -v "$PSQL_ROOT/data:/var/lib/postgresql/data" --name "$PSQL_CONTAINER_NAME" "$PSQL_IMAGE" > /dev/null
But in order to export the port to the outside, one also needs do pass the option -p. Example:
docker run -d -p 9200:9200 elasticsearch
Should we create a fork and always export or should we make it configurable? I think dokku supports extra docker options? Can that be used here?
It looks like the docker option can be added for an app, but not for a plugin: https://github.com/dokku/dokku/commit/df8f4fb8824550518b07c87ac56aba568bd81295
The problem is the documentation, at "Binding Postgresql port to another IP". It should say "You should do it before running dokku plugins-install" like in the other sections. Because once you start it, it will reuse the docker image and it will never pass -p.
I ran into this problem awhile back. I added a rebuild command that builds an image off the old container, renames the old container as a backup, and rebuilds a new container with the new port options.
See: https://github.com/Flink/dokku-psql-single-container/compare/master...Zren:dev
Hi,
I am trying to connect to the database with pgadmin. I have a MacOS running dokku via vagrant. I tried this option:
I also defined this port mapping in Virtualbox:
external:5432 --> internal:5432
It still did not work. So I used vagrant ssh to get into the machine. I can see the docker image:
I guess what is missing is a mapping from this Linux itself into the docker image. This would normally be doable in docker by passing the mapping from external port to internal port. How can I override this in your docker container?
Thanks!