mirror of
https://github.com/overleaf/toolkit.git
synced 2025-04-19 15:28:06 +02:00
Move mongo and redis connection to top level
This commit is contained in:
parent
260147d838
commit
acaab52c59
4 changed files with 28 additions and 7 deletions
|
@ -9,6 +9,10 @@ function __main__() {
|
|||
MONGO_IMAGE="mongo:3.6"
|
||||
REDIS_IMAGE="redis:5.0"
|
||||
|
||||
MONGO_URL="mongodb://mongo/sharelatex"
|
||||
REDIS_HOST="redis"
|
||||
REDIS_PORT="6379"
|
||||
|
||||
if [[ ! "$SHARELATEX_IMAGE_VERSION" \
|
||||
=~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "ERROR: invalid version '${SHARELATEX_IMAGE_VERSION}'"
|
||||
|
@ -70,8 +74,11 @@ function __main__() {
|
|||
export DOCKER_SOCKET_PATH
|
||||
export MONGO_IMAGE
|
||||
export MONGO_DATA_PATH
|
||||
export MONGO_URL
|
||||
export REDIS_IMAGE
|
||||
export REDIS_DATA_PATH
|
||||
export REDIS_HOST
|
||||
export REDIS_PORT
|
||||
|
||||
echo ">> Running with sharelatex-image=$IMAGE"
|
||||
|
||||
|
|
17
bin/doctor
17
bin/doctor
|
@ -151,8 +151,25 @@ function check_config_files() {
|
|||
fi
|
||||
|
||||
print_point 2 "SERVER_PRO: $SERVER_PRO"
|
||||
|
||||
print_point 2 "MONGO_ENABLED: $MONGO_ENABLED"
|
||||
if [[ "${MONGO_URL:-null}" != "null" ]]; then
|
||||
print_point 2 "MONGO_URL: [set here]"
|
||||
fi
|
||||
if [[ "${MONGO_IMAGE:-null}" != "null" ]]; then
|
||||
print_point 2 "MONGO_IMAGE: $MONGO_IMAGE"
|
||||
fi
|
||||
|
||||
print_point 2 "REDIS_ENABLED: $REDIS_ENABLED"
|
||||
if [[ "${REDIS_HOST:-null}" != "null" ]]; then
|
||||
print_point 2 "REDIS_HOST: [set here]"
|
||||
fi
|
||||
if [[ "${REDIS_PORT:-null}" != "null" ]]; then
|
||||
print_point 2 "REDIS_PORT: [set here]"
|
||||
fi
|
||||
if [[ "${REDIS_IMAGE:-null}" != "null" ]]; then
|
||||
print_point 2 "REDIS_IMAGE: $REDIS_IMAGE"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
SHARELATEX_APP_NAME=Overleaf Community Edition XYZ
|
||||
|
||||
SHARELATEX_MONGO_URL=mongodb://mongo/sharelatex
|
||||
|
||||
# Same property, unfortunately with different names in
|
||||
# different locations
|
||||
SHARELATEX_REDIS_HOST=redis
|
||||
REDIS_HOST=redis
|
||||
|
||||
ENABLED_LINKED_FILE_TYPES=url,project_file
|
||||
|
||||
# Enables Thumbnail generation using ImageMagick
|
||||
|
|
|
@ -10,4 +10,8 @@ services:
|
|||
- "${SHARELATEX_DATA_PATH}:/var/lib/sharelatex"
|
||||
ports:
|
||||
- 80:80
|
||||
environment:
|
||||
SHARELATEX_MONGO_URL: "${MONGO_URL}"
|
||||
SHARELATEX_REDIS_HOST: "${REDIS_HOST}"
|
||||
REDIS_HOST: "${REDIS_HOST}"
|
||||
env_file: ../config/variables.env
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue