arangodb-docker
arangodb-docker copied to clipboard
entrypoint.sh should set foxx-cli default server
Users probably aren't aware that they have to make sure foxx-cli talks to the endpoint 127.0.0.1:8999 or whatever arangod happens to be set to listen to during the init phase if they want their init scripts to work correctly.
To simplify this, entrypoint.sh should run the following:
foxx server set default tcp://127.0.0.1:$ARANGO_INIT_PORT
before looping over the files in the init scripts directory and then
foxx server remove default
right after the loop.
This is a DX papercut but it seems like a low-hanging fruit as we're already shipping the foxx-cli.
This means users can run this:
foxx install /myapp /myapp.zip
instead of this:
foxx install /myapp /myapp.zip -H tcp://127.0.0.1:$ARANGO_INIT_PORT
(and don't have to dig into the code to figure out $ARANGO_INIT_PORT is even a thing)
/cc @joerg84 FYI
Looks like this was actually implemented before and then removed? https://github.com/arangodb/arangodb-docker/commit/50f31d72dac9440550f94e2878b76875ed0ec0ce
@dothebart I can't seem to find any explanation for this change. Can you clarify?
If this is a permissions thing, we should just create the file manually (~/.foxxrc):
[server.default]
url=tcp://127.0.0.1:8999
database=_system
username=root
password=
Please don't remove Foxx-related features without telling me.