diff --git a/README.md b/README.md index d7adb113c..79818e417 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ The following environment variables can be used to configure Livebook on boot: cluster. Must be "name" (long names) or "sname" (short names). Note that this sets RELEASE_DISTRIBUTION if present when creating a release. Defaults to "sname". - * LIVEBOOK_FORCE_SSL_HOST - sets a host to redirect to if the request is not over HTTP. + * LIVEBOOK_FORCE_SSL_HOST - sets a host to redirect to if the request is not over HTTPS. Note it does not apply when accessing Livebook via localhost. Defaults to nil. * LIVEBOOK_HOME - sets the home path for the Livebook instance. This is the @@ -264,8 +264,8 @@ The following environment variables can be used to configure Livebook on boot: Must be set together with LIVEBOOK_TEAMS_NAME and LIVEBOOK_TEAMS_KEY. * LIVEBOOK_TEAMS_SECRETS - sets the Livebook Teams encrypted secrets for deploying apps with secrets. - This is relevant when deploying apps with offline hub. Must be set together with - LIVEBOOK_TEAMS_NAME, LIVEBOOK_TEAMS_KEY and LIVEBOOK_TEAMS_OFFLINE_KEY. + This is relevant when deploying airgapped apps. Must be set together with + LIVEBOOK_TEAMS_NAME, LIVEBOOK_TEAMS_KEY, and LIVEBOOK_TEAMS_OFFLINE_KEY. * LIVEBOOK_TOKEN_ENABLED - controls whether token authentication is enabled. Enabled by default unless LIVEBOOK_PASSWORD is set. Set it to "false" to diff --git a/lib/livebook_web/live/hub/edit/team_component.ex b/lib/livebook_web/live/hub/edit/team_component.ex index 474ee64a0..2b3b07c8e 100644 --- a/lib/livebook_web/live/hub/edit/team_component.ex +++ b/lib/livebook_web/live/hub/edit/team_component.ex @@ -198,8 +198,9 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do

Then save the Dockerfile below in a repository with the Livebook notebooks that belong to your Organization. You must change - /path/to/my/notebooks in the template below to point to a directory - with all .livemd files you want to deploy. + the value of the APPS_PATH + argument in the template below to point to a directory with all .livemd + files you want to deploy.

@@ -239,18 +240,19 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do

- Finally, you must set the following environment variables in your deployment platform: + You may additionally perform the following optional steps:

@@ -455,8 +457,10 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do base = """ FROM ghcr.io/livebook-dev/livebook:#{version} + ARG APPS_PATH /path/to/my/notebooks + ARG TEAMS_KEY "#{socket.assigns.hub.teams_key}" - ENV LIVEBOOK_APPS_PATH_HUB_ID "#{socket.assigns.hub.id}" + ENV LIVEBOOK_TEAMS_KEY ${TEAMS_KEY} ENV LIVEBOOK_TEAMS_NAME "#{socket.assigns.hub.hub_name}" ENV LIVEBOOK_TEAMS_OFFLINE_KEY "#{socket.assigns.hub.org_public_key}" ENV LIVEBOOK_TEAMS_SECRETS "#{encrypt_secrets_to_dockerfile(socket)}" @@ -465,9 +469,10 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do apps = """ - COPY /path/to/my/notebooks /apps ENV LIVEBOOK_APPS_PATH "/apps" ENV LIVEBOOK_APPS_PATH_WARMUP "manual" + ENV LIVEBOOK_APPS_PATH_HUB_ID "#{socket.assigns.hub.id}" + COPY ${APPS_PATH} /apps RUN /app/bin/warmup_apps.sh\ """