Closed briand617 closed 2 years ago
Seems like you need to put 5656:5656
instead of just 5656
in the ports
list.
Also, renaming the default database is generally not recommended (unless you have a specific reason), as this only complicates the workflows.
Thank you, the mis-configured port was definitely part of the problem. Please note then that the instructions https://www.edgedb.com/docs/guides/deployment/docker are incorrect
And I was calling the default database "default" but I guess it's actually "edgedb"?
When I try to connect now, I get
$ edgedb --dsn=edgedb://edgedb@localhost:5656
[2022-04-18T20:50:15Z WARN rustls::session] Sending fatal alert BadCertificate
edgedb error: ClientConnectionFailedError: invalid certificate: UnknownIssuer
But I thought
EDGEDB_SERVER_SECURITY: insecure_dev_mode
made it so I didn't have to do that. How can I make it work like that?
EDGEDB_SERVER_SECURITY
specifies the server security mode. On the client side it's either the --tls-security=insecure
CLI argument or the EDGEDB_CLIENT_SECURITY=insecure_dev_mode
environment variable or the ?tls_security=insecure
DSN argument (the latter two also work in the language bindings).
I've pushed a PR to fix the docs to avoid future confusion.
Also, if I may, look into using edgedb project for local development as it handles all this setup automatically.
That's how I started... but I don't get the "Docker" option that the website infers:
$ edgedb --version
EdgeDB CLI 1.1.1+5bb8bad
$ edgedb project init
No `edgedb.toml` found in `/home/brian/projects/edgedb-test2` or above
Do you want to initialize a new project? [Y/n]
> Y
Specify the name of EdgeDB instance to use with this project [default: edgedb_test2]:
> edgedb_test2
Checking EdgeDB versions...
Specify the version of EdgeDB to use with this project [default: 1.3]:
> 1.0
Do you want to start instance automatically on login? [y/n]
> y
┌─────────────────────┬───────────────────────────────────────────────┐
│ Project directory │ /home/brian/projects/edgedb-test2 │
│ Project config │ /home/brian/projects/edgedb-test2/edgedb.toml │
│ Schema dir (empty) │ /home/brian/projects/edgedb-test2/dbschema │
│ Installation method │ portable package │
│ Start configuration │ auto │
│ Version │ 1.3+5d0197d │
│ Instance name │ edgedb_test2 │
└─────────────────────┴───────────────────────────────────────────────┘
Version 1.3+5d0197d is already installed
Initializing EdgeDB instance...
[systemctl] Created symlink /home/brian/.config/systemd/user/default.target.wants/edgedb-server@edgedb_test2.service → /home/brian/.config/systemd/user/edgedb-server@edgedb_test2.service.
[systemctl] Failed to connect to bus: No such file or directory
Applying migrations...
Edit: added edgedb CLI version
but I don't get the "Docker" option that the website infers
It's just documenting how to use EdgeDB with Docker if you absolutely have to. If you don't, ignore it, edgedb project
and (edgedb instance
) commands have everything you need to install, initialize, and manage local EdgeDB instances.
With my
docker-compose.yml
set to this on Ubuntu-18:I am able to go into the edgedb shell and create a database and make queries. My username is set to
edgedb
and my database is nameddefault
However, when I'm outside the edgedb shell, I can't make the remote connection....
Likewise, from another docker container running a Typescript image, I get corresponding errors when I use this connection:
Is there a working example of remote EdgeDB connections within the context of a Docker container environment?