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

Move the docker-compose config files to lib/

This commit is contained in:
Shane Kilkelly 2020-06-30 14:52:40 +01:00
parent 0da51c19df
commit 27cc7dbfc0
10 changed files with 28 additions and 39 deletions

View file

@ -21,14 +21,18 @@ are convenience wrappers around `bin/docker-compose`.
- `config/overleaf.rc`
- `config/variables.env`
- `config/docker-compose.base.yml`
- `config/docker-compose.mongo.yml`
- `config/docker-compose.redis.yml`
- `config/docker-compose.sibling-containers.yml`
If `config/docker-compose.override.yml` is present, it will also be loaded.
## Docker Compose files
- `lib/docker-compose.base.yml`
- `lib/docker-compose.mongo.yml`
- `lib/docker-compose.redis.yml`
- `lib/docker-compose.sibling-containers.yml`
### overleaf.rc
The `config/overleaf.rc` file controls top-level configuration,

View file

@ -22,15 +22,15 @@ function __main__() {
fi
# Select which docker-compose files to load
compose_file_flags=("-f ./config/docker-compose.base.yml")
compose_file_flags=("-f ./lib/docker-compose.base.yml")
if [[ "$RC_REDIS_ENABLED" == "true" ]]; then
compose_file_flags+=("-f ./config/docker-compose.redis.yml")
compose_file_flags+=("-f ./lib/docker-compose.redis.yml")
fi
if [[ "$RC_MONGO_ENABLED" == "true" ]]; then
compose_file_flags+=("-f ./config/docker-compose.mongo.yml")
compose_file_flags+=("-f ./lib/docker-compose.mongo.yml")
fi
if [[ "$RC_SIBLING_CONTAINERS_ENABLED" == "true" ]]; then
compose_file_flags+=("-f ./config/docker-compose.sibling-containers.yml")
compose_file_flags+=("-f ./lib/docker-compose.sibling-containers.yml")
fi
# Include docker-compose.override.yml if it is present

View file

@ -120,10 +120,6 @@ function check_config_files() {
config_files=(
"config/overleaf.rc"
"config/variables.env"
"config/docker-compose.base.yml"
"config/docker-compose.mongo.yml"
"config/docker-compose.redis.yml"
"config/docker-compose.sibling-containers.yml"
)
for config_file in "${config_files[@]}"
do

View file

@ -18,7 +18,6 @@ function check_existing_config() {
function set_up_config_files() {
echo "Copying config files to 'config/'"
cp ./examples/*.yml ./config/
cp ./examples/overleaf.rc ./config/
cp ./examples/variables.env ./config/
}

View file

@ -68,12 +68,11 @@ Now check the contents of the `config/` directory
```sh
$ ls config
docker-compose.base.yml docker-compose.redis.yml overleaf.rc
docker-compose.mongo.yml docker-compose.sibling-containers.yml variables.env
overleaf.rc variables.env
```
You can mostly ignore the `docker-compose.*` files. The two files you will interact with
are:
These are the two configuration files you will interact with:
- `overleaf.rc` : top-level configuration
- `variables.env` : environment variables loaded into the docker container

View file

@ -1,22 +0,0 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# NOTE: This file is generated by the init tool, and should not #
# be edited manually. #
# #
# Local configuration and environment should be set #
# in overleaf.rc and variables.env #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
---
version: '2.2'
services:
sharelatex:
restart: always
image: "${RC_IMAGE}"
container_name: sharelatex
volumes:
- "${RC_SHARELATEX_DATA_PATH}:/var/lib/sharelatex"
ports:
- 80:80
env_file: ./variables.env

View file

@ -0,0 +1,13 @@
---
version: '2.2'
services:
sharelatex:
restart: always
image: "${RC_IMAGE}"
container_name: sharelatex
volumes:
- "${RC_SHARELATEX_DATA_PATH}:/var/lib/sharelatex"
ports:
- 80:80
env_file: ../config/variables.env