edgedb-cli icon indicating copy to clipboard operation
edgedb-cli copied to clipboard

Does not consider `-H` and `-P` when `project init`

Open notramo opened this issue 3 years ago • 3 comments

  • EdgeDB Version: latest
  • EdgeDB CLI Version: latest
  • OS Version: Void Linux musl

The official EdgeDB server binaries are compiled against glibc, and do not start on a musl system. The CLI runs fine on musl. I tried to use Docker to run the server, with the client on the host machine.

edgedb -P 5656 -H 127.0.0.1 project init

It tries to start the server in ~/.local/share/edgedb/portable/2.1/bin, which doesn't work because of not supporting musl. But why does it start that? It should use the Docker process.

I can't use the edgedb CLI shipped in Docker for project creation as it says project init is not allowed inside Docker.

notramo avatar Aug 11 '22 15:08 notramo

Yes, connection arguments do not work on project. They are not an error only because they are useful for other commands like edgedb -P 5656 migration create or bare edgedb -P 5656.

tailhook avatar Aug 11 '22 15:08 tailhook

Well, I was to fast to respond. It looks like you want edgedb project init --link it quite a different mode of operation from the normal init, and should work for you.

Edit: I mean you should be able to achieve your goal with:

$ edgedb -P 5656 -H 127.0.0.1 instance link "instance_name"
$ edgedb project init --link --server-instance "instance_name"

tailhook avatar Aug 11 '22 15:08 tailhook

Thank you, the command snippet works. Could you please add it to the EdgeDB Docker setup documentation? I know, Docker is recommended only for production setups, and it's unlikely to use project init in production as it's done in the dev environment. However, on musl based Linux systems, the official server binaries don't start, as those are linked against glibc. The CLI binary works on musl system too, so it's a possible workaround (until https://github.com/edgedb/edgedb/issues/4253 is fixed) to run the server in Docker (even in development environment), and connect to it from outside the container using the CLI.

notramo avatar Aug 12 '22 11:08 notramo

Looks like musl build should already be available. But, feel free to submit PR to the docker setup documentation, if you see this is still useful.

tailhook avatar Sep 12 '22 12:09 tailhook