1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 07:18:06 +02:00

Merge remote-tracking branch 'origin/master' into jpa-loud-warning

This commit is contained in:
Jakob Ackermann 2024-09-11 09:37:41 +01:00
commit f2bbfc9a3e
No known key found for this signature in database
GPG key ID: 30C56800FCA3828A
7 changed files with 54 additions and 1 deletions

View file

@ -1,5 +1,9 @@
# Changelog
## 2024-09-03
### Added
- Add a new config option `OVERLEAF_LOG_PATH` for making [application logs](https://github.com/overleaf/overleaf/wiki/Log-files) available on the Docker host.
## 2024-08-27
### Added
- Add loud warning to `bin/doctor` when not using Sandboxed Compiles/`SIBLING_CONTAINERS_ENABLED=true`

View file

@ -41,6 +41,9 @@ function build_environment() {
fi
fi
fi
if [[ "${OVERLEAF_LOG_PATH:-null}" != "null" ]]; then
set_logging_vars
fi
if [[ $NGINX_ENABLED == "true" ]]; then
set_nginx_vars
fi
@ -56,6 +59,9 @@ function build_environment() {
function canonicalize_data_paths() {
OVERLEAF_DATA_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$OVERLEAF_DATA_PATH")
if [[ "${OVERLEAF_LOG_PATH:-null}" != "null" ]]; then
OVERLEAF_LOG_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$OVERLEAF_LOG_PATH")
fi
MONGO_DATA_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$MONGO_DATA_PATH")
REDIS_DATA_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$REDIS_DATA_PATH")
GIT_BRIDGE_DATA_PATH=$(cd "$TOOLKIT_ROOT"; realpath "$GIT_BRIDGE_DATA_PATH")
@ -159,6 +165,19 @@ function set_sibling_containers_vars() {
export OVERLEAF_DATA_PATH
}
# Set environment variables for docker-compose.logging.yml
function set_logging_vars() {
DOCKER_COMPOSE_FLAGS+=(-f "$TOOLKIT_ROOT/lib/docker-compose.logging.yml")
if [[ $IMAGE_VERSION_MAJOR -ge 5 ]]; then
OVERLEAF_IN_CONTAINER_LOG_PATH="/var/log/overleaf"
else
OVERLEAF_IN_CONTAINER_LOG_PATH="/var/log/sharelatex"
fi
export OVERLEAF_IN_CONTAINER_LOG_PATH
export OVERLEAF_LOG_PATH
}
# Set environment variables for docker-compose.nginx.yml
function set_nginx_vars() {
DOCKER_COMPOSE_FLAGS+=(-f "$TOOLKIT_ROOT/lib/docker-compose.nginx.yml")

View file

@ -210,6 +210,11 @@ function check_config_files() {
print_point 2 "OVERLEAF_DATA_PATH: MISSING !"
add_warning "rc file, OVERLEAF_DATA_PATH not set"
fi
if [[ "${OVERLEAF_LOG_PATH:-null}" != "null" ]]; then
print_point 2 "OVERLEAF_LOG_PATH: $OVERLEAF_LOG_PATH"
else
print_point 2 "OVERLEAF_LOG_PATH: not set, keeping logs in container"
fi
print_point 2 "SERVER_PRO: $SERVER_PRO"
print_point 2 "SIBLING_CONTAINERS_ENABLED: $SIBLING_CONTAINERS_ENABLED"

View file

@ -77,6 +77,8 @@ For instructions on how to migrate `nginx`, please see [TLS Proxy for Overleaf T
The location of the data volume for the `sharelatex` container will need to be set using `OVERLEAF_DATA_PATH` in the **config/overleaf.rc** file.
In case you are bind-mounting the [application logs](https://github.com/overleaf/overleaf/wiki/Log-files), you can use `OVERLEAF_LOG_PATH` to configure the host path.
### MongoDB ###
The location of the data volume for the `mongo` container will need to be set using `MONGO_DATA_PATH` in the **config/overleaf.rc** file.

View file

@ -18,10 +18,18 @@ This is useful when running multiple instances of Overleaf on one host, as each
### `OVERLEAF_DATA_PATH`
Sets the path to the directory that will be mounted into the main `sharelatex` container, and used to store compile data. This can be either a full path (beginning with a `/`), or relative to the base directory of the toolkit.
Sets the path to the directory that will be mounted into the main `sharelatex` container, and used to store project and compile data. This can be either a full path (beginning with a `/`), or relative to the base directory of the toolkit.
- Default: data/sharelatex
### `OVERLEAF_LOG_PATH`
Sets the path to the directory that will be mounted into the main `sharelatex` container, and used for making application logs available on the Docker host. This can be either a full path (beginning with a `/`), or relative to the base directory of the toolkit.
Remove the config entry to disable the bind-mount. When not set, logs will be discarded when recreating the container.
- Default: not set
### `OVERLEAF_LISTEN_IP`
Sets the host IP address(es) that the container will bind to. For example, if this is set to `0.0.0.0`, then the web interface will be available on any host IP address.

View file

@ -74,6 +74,15 @@ These are the three configuration files you will interact with:
- `variables.env` : environment variables loaded into the docker container
- `version` : the version of the docker images to use
## Selecting Overleaf Community Edition or Server Pro
By default, the Overleaf Toolkit uses the free Overleaf Community Edition.
Overleaf Server Pro is a commercial version of Overleaf, with extra features and commercial support.
See https://www.overleaf.com/for/enterprises/features for more details about Server Pro and how to
buy a license.
In case you are a Server Pro customer, or want to set up a Server Pro trial instance, please follow the [docs on switching to Server Pro](getting-server-pro.md) before continuing with the next step.
## Starting Up

View file

@ -0,0 +1,6 @@
---
version: '2.2'
services:
sharelatex:
volumes:
- "${OVERLEAF_LOG_PATH}:${OVERLEAF_IN_CONTAINER_LOG_PATH}"