diff --git a/Dockerfile.onbuild b/Dockerfile.onbuild index b9cf8ce87..a4bff7095 100644 --- a/Dockerfile.onbuild +++ b/Dockerfile.onbuild @@ -1,5 +1,11 @@ FROM coralproject/talk:latest +# Setup the build arguments +ONBUILD ARG TALK_THREADING_LEVEL=3 +ONBUILD ARG TALK_DEFAULT_STREAM_TAB=all +ONBUILD ARG TALK_DEFAULT_LANG=en +ONBUILD ARG TALK_PLUGINS_JSON + # Bundle app source ONBUILD COPY . /usr/src/app @@ -8,4 +14,4 @@ ONBUILD COPY . /usr/src/app # clear out the development dependancies again. After this we of course need to # clear out the yarn cache, this saves quite a lot of size. ONBUILD RUN cli plugins reconcile && \ - yarn build + yarn build \ No newline at end of file diff --git a/docs/_docs/01-02-installation-from-docker.md b/docs/_docs/01-02-installation-from-docker.md index 0126c0901..fc699f127 100644 --- a/docs/_docs/01-02-installation-from-docker.md +++ b/docs/_docs/01-02-installation-from-docker.md @@ -95,10 +95,12 @@ FROM coralproject/talk:latest-onbuild And running the following to build the docker image: ```bash -docker build -t my-awesome-talk-image . +docker build -t my-awesome-talk-image --build-arg TALK_DEFAULT_LANG=es . ``` -Don't forget to replace `my-awesome-talk-image` with your own image name. +Don't forget to replace `my-awesome-talk-image` with your own image name, and +specify your build variables with the `--build-arg`. Refer to [Dockerfile.onbuild](https://github.com/coralproject/talk/blob/master/Dockerfile.onbuild){:target="_blank"} for the +available build variables. {: .code-aside} This accomplishes a lot: @@ -108,6 +110,9 @@ This accomplishes a lot: 2. Installs any new dependencies that were required by any new plugins. 3. Builds the new static bundles so that they are ready to serve when the image is running. +4. Specifies a build time variable [TALK_DEFAULT_LANG]({{ "/advanced-configuration/#talk_default_lang" | relative_url }}){:.param}. Refer +to [Dockerfile.onbuild](https://github.com/coralproject/talk/blob/master/Dockerfile.onbuild){:target="_blank"} for the +available build variables. This means that you can create a repository for your organization that simply includes the above `Dockerfile`, a directory of `plugins`, and a `plugins.json` diff --git a/docs/_docs/02-02-advanced-configuration.md b/docs/_docs/02-02-advanced-configuration.md index 7db27fb1c..73e72e2cb 100644 --- a/docs/_docs/02-02-advanced-configuration.md +++ b/docs/_docs/02-02-advanced-configuration.md @@ -26,10 +26,18 @@ Configure the duration for which comment counts are cached for, parsed by ## TALK_DEFAULT_LANG +This is a **Build Variable** and must be consumed during build. If using the +[Docker-onbuild]({{ "/installation-from-docker/#onbuild" | relative_url }}) +image you can specify it with `--build-arg TALK_DEFAULT_LANG=en`. + Specify the default translation language. (Default `en`) ## TALK_DEFAULT_STREAM_TAB +This is a **Build Variable** and must be consumed during build. If using the +[Docker-onbuild]({{ "/installation-from-docker/#onbuild" | relative_url }}) +image you can specify it with `--build-arg TALK_DEFAULT_STREAM_TAB=all`. + Specify the default stream tab in the admin. (Default `all`) ## TALK_DISABLE_AUTOFLAG_SUSPECT_WORDS @@ -397,6 +405,10 @@ CDN/Storage url. (Defaults to value of ## TALK_THREADING_LEVEL +This is a **Build Variable** and must be consumed during build. If using the +[Docker-onbuild]({{ "/installation-from-docker/#onbuild" | relative_url }}) +image you can specify it with `--build-arg TALK_THREADING_LEVEL=3`. + Specify the maximum depth of the comment thread. (Default `3`) **Note that a high value for `TALK_THREADING_LEVEL` will result in large diff --git a/docs/_sass/talk.scss b/docs/_sass/talk.scss index e967d10e4..dfacc549c 100644 --- a/docs/_sass/talk.scss +++ b/docs/_sass/talk.scss @@ -273,7 +273,8 @@ pre { p a:not(.plain-link) { @extend .coral-link; } - ul:not(.toc__menu) li a { + ul:not(.toc__menu) li a, + ol li a { @extend .coral-link; } }