edgedb / edgedb-docker

Official Docker Image packaging for EdgeDB
83 stars 16 forks source link

An assortment of fixes and improvements #21

Closed elprans closed 3 years ago

elprans commented 3 years ago

Changes:

Add edbdocker_check_instance callback

The edbdocker_check_instance is intended to be overloaded in a derived image to check the validity of an existing database instance, e.g. to check catalog version compatibility.

Make edbdocker_run_temp_server() non-fatal by itself

Currently, edbdocker_run_temp_server() calls die on all errors. To allow uses where server failure is expected, delegate the decision to abort the whole thing to the abort callback.

Fix entrypoint sourcing

Two fixes:

Apply migrations during bootstrap instead of restarting server

Remove the need to restart the server to apply the migrations when bootstrapping a new instance.

elprans commented 3 years ago

I think we should move functions

Fair enough.

elprans commented 3 years ago

OK, I reorganized the entrypoint to source functions and dropped the need to restart the entire script. Privilege drop is now applied granularly on server/CLI invocations.