From f3ea05b7ee60d09dab075760d8a8be9dffead0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 31 Jul 2021 10:09:21 +0200 Subject: [PATCH] Detail the possibility of using releases environment variables (#486) --- README.md | 5 +++++ config/runtime.exs | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8080af540..6c607ee10 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,11 @@ The following environment variables configure Livebook: +If running Livebook as a Docker image or an Elixir release, [the environment +variables used by Elixir releases are also available] +(https://hexdocs.pm/mix/Mix.Tasks.Release.html#module-environment-variables). +The notables ones are `RELEASE_NODE` and `RELEASE_DISTRIBUTION`. + ## Development Livebook is primarily a Phoenix web application and can be setup as such: diff --git a/config/runtime.exs b/config/runtime.exs index e2017c3c5..f97d7f231 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -24,7 +24,9 @@ end config :livebook, :cookie, - Livebook.Config.cookie!("LIVEBOOK_COOKIE") || Livebook.Utils.random_cookie() + Livebook.Config.cookie!("LIVEBOOK_COOKIE") || + Livebook.Config.cookie!("RELEASE_COOKIE") || + Livebook.Utils.random_cookie() config :livebook, :default_runtime,