mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-11 23:44:23 +08:00
Update airgapped Dockerfile
This commit is contained in:
parent
e9ab9dec91
commit
4eaea183ef
2 changed files with 18 additions and 13 deletions
|
@ -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
|
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".
|
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.
|
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
|
* 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.
|
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.
|
* 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
|
This is relevant when deploying airgapped apps. Must be set together with
|
||||||
LIVEBOOK_TEAMS_NAME, LIVEBOOK_TEAMS_KEY and LIVEBOOK_TEAMS_OFFLINE_KEY.
|
LIVEBOOK_TEAMS_NAME, LIVEBOOK_TEAMS_KEY, and LIVEBOOK_TEAMS_OFFLINE_KEY.
|
||||||
|
|
||||||
* LIVEBOOK_TOKEN_ENABLED - controls whether token authentication is enabled.
|
* LIVEBOOK_TOKEN_ENABLED - controls whether token authentication is enabled.
|
||||||
Enabled by default unless LIVEBOOK_PASSWORD is set. Set it to "false" to
|
Enabled by default unless LIVEBOOK_PASSWORD is set. Set it to "false" to
|
||||||
|
|
|
@ -198,8 +198,9 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
|
||||||
<p class="text-gray-700">
|
<p class="text-gray-700">
|
||||||
Then save the Dockerfile below in a repository with the Livebook notebooks
|
Then save the Dockerfile below in a repository with the Livebook notebooks
|
||||||
that belong to your Organization. <strong>You must change</strong>
|
that belong to your Organization. <strong>You must change</strong>
|
||||||
<code>/path/to/my/notebooks</code> in the template below to point to a directory
|
the value of the <code>APPS_PATH</code>
|
||||||
with all <code>.livemd</code> files you want to deploy.
|
argument in the template below to point to a directory with all <code>.livemd</code>
|
||||||
|
files you want to deploy.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div id="env-code" class="py-2">
|
<div id="env-code" class="py-2">
|
||||||
|
@ -239,18 +240,19 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="text-gray-700 py-2">
|
<p class="text-gray-700 py-2">
|
||||||
Finally, you must set the following environment variables in your deployment platform:
|
You may additionally perform the following optional steps:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul class="text-gray-700 pl-1 space-y-3 list-disc list-inside">
|
<ul class="text-gray-700 pl-1 space-y-3 list-disc list-inside">
|
||||||
<li>
|
<li>
|
||||||
<code>LIVEBOOK_TEAMS_KEY</code>
|
you may remove the default value for <code>TEAMS_KEY</code>
|
||||||
- set it to the "Livebook Teams key" value you can find at the top of this page
|
from your Dockerfile and set it as a build argument in your deployment
|
||||||
|
platform
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<code>LIVEBOOK_PASSWORD</code>
|
if you want to debug your deployed notebooks in production, you may
|
||||||
(optional) - set it to any value of your choice, if you want to access and debug
|
set the <code>LIVEBOOK_PASSWORD</code> environment variable with a
|
||||||
your deployed notebooks in production
|
value of at least 12 characters of your choice
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -455,8 +457,10 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
|
||||||
base =
|
base =
|
||||||
"""
|
"""
|
||||||
FROM ghcr.io/livebook-dev/livebook:#{version}
|
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_NAME "#{socket.assigns.hub.hub_name}"
|
||||||
ENV LIVEBOOK_TEAMS_OFFLINE_KEY "#{socket.assigns.hub.org_public_key}"
|
ENV LIVEBOOK_TEAMS_OFFLINE_KEY "#{socket.assigns.hub.org_public_key}"
|
||||||
ENV LIVEBOOK_TEAMS_SECRETS "#{encrypt_secrets_to_dockerfile(socket)}"
|
ENV LIVEBOOK_TEAMS_SECRETS "#{encrypt_secrets_to_dockerfile(socket)}"
|
||||||
|
@ -465,9 +469,10 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
|
||||||
apps =
|
apps =
|
||||||
"""
|
"""
|
||||||
|
|
||||||
COPY /path/to/my/notebooks /apps
|
|
||||||
ENV LIVEBOOK_APPS_PATH "/apps"
|
ENV LIVEBOOK_APPS_PATH "/apps"
|
||||||
ENV LIVEBOOK_APPS_PATH_WARMUP "manual"
|
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\
|
RUN /app/bin/warmup_apps.sh\
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue