mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-12-31 04:02:10 +08:00
ea93edcc86
* Add embedded runtime for evaluating code in the Livebook VM * Update lib/livebook_web/live/session_live/embedded_live.ex Co-authored-by: José Valim <jose.valim@dashbit.co> * Use standard error proxy globally in the Livebook node * Add configuration env variable for setting the default runtime * Increase evaluation response assertion timeouts Co-authored-by: José Valim <jose.valim@dashbit.co>
32 lines
981 B
Elixir
32 lines
981 B
Elixir
import Config
|
|
require Logger
|
|
|
|
config :livebook, LivebookWeb.Endpoint,
|
|
secret_key_base:
|
|
Livebook.Config.secret!("LIVEBOOK_SECRET_KEY_BASE") ||
|
|
Base.encode64(:crypto.strong_rand_bytes(48))
|
|
|
|
config :livebook, :root_path, Livebook.Config.root_path!("LIVEBOOK_ROOT_PATH")
|
|
|
|
if password = Livebook.Config.password!("LIVEBOOK_PASSWORD") do
|
|
config :livebook, authentication_mode: :password, password: password
|
|
else
|
|
config :livebook, token: Livebook.Utils.random_id()
|
|
end
|
|
|
|
if port = Livebook.Config.port!("LIVEBOOK_PORT") do
|
|
config :livebook, LivebookWeb.Endpoint, http: [port: port]
|
|
end
|
|
|
|
if ip = Livebook.Config.ip!("LIVEBOOK_IP") do
|
|
config :livebook, LivebookWeb.Endpoint, http: [ip: ip]
|
|
end
|
|
|
|
config :livebook,
|
|
:cookie,
|
|
Livebook.Config.cookie!("LIVEBOOK_COOKIE") || Livebook.Utils.random_cookie()
|
|
|
|
config :livebook,
|
|
:default_runtime,
|
|
Livebook.Config.default_runtime!("LIVEBOOK_DEFAULT_RUNTIME") ||
|
|
Livebook.Runtime.ElixirStandalone
|