From 67af32b69a76799a58a3b428a955aecd1ced77a7 Mon Sep 17 00:00:00 2001 From: Armin Co <armin.co@hs-bochum.de> Date: Mon, 26 Oct 2020 08:34:04 +0100 Subject: [PATCH] Documentation --- README.md | 65 ++++++++++++++++++++--- config.sh | 7 ++- docker-compose.base.yml | 1 - setup.sh | 2 +- tools/{start_containers.sh => start.sh} | 0 tools/{stop_containers.sh => stop.sh} | 0 tools/{update_containers.sh => update.sh} | 0 7 files changed, 63 insertions(+), 12 deletions(-) rename tools/{start_containers.sh => start.sh} (100%) rename tools/{stop_containers.sh => stop.sh} (100%) rename tools/{update_containers.sh => update.sh} (100%) diff --git a/README.md b/README.md index 5642834..3ebd5aa 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,18 @@ Collection of online tools for teaching at CVH. ### Prerequisites - Docker-CE - Installation script (`install_docker.sh`) is provided for current Ubuntu installations. - For other distributions look for installation instructions at [Install Docker Engine](https://docs.docker.com/engine/install/) + For other distributions look for installation instructions at [Install Docker Engine](https://docs.docker.com/engine/install/). - Docker Compose - Will also be installed with the script for Docker-CE - Else run: `sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose` - Git - Git is required to clone the related repositories. - Is probably already installed on the system. +- A Domain + - You need control over a domain like `your-domain.com` with the subdomains you would like to use pointing to your server. + - The domain is required to sign your keys with Let`s Encrypt. +- For the reverse proxy you will need to open at least the ports `80` and `443`. + Further services might require additional ports. ### CVH - OLP (Meta repository) @@ -36,18 +41,66 @@ and can be recreated if neccessary. This helps also to unify the paths to all configuration files. Every relative path will be defined from the location of the `docker-compose.base.yml` file. +### Configuration + +The configuration of the CVH Online Learning platform is located at `config.sh`. + +```sh +## YOUR SETTINGS +## Configure domains and letsencrypt. +# +DOMAIN=your-domain.com +SUB_DOMAINS="" +MAIL=webmaster@your-organisation.com + +USE_JITSI="true" +USE_NOVNC="true" +USE_MUMBLE="true" +``` + +- DOMAIN + - Specify your domain here +- SUB_DOMAINS + - Add additional subdomains here, services like Jitsi add them automatically. +- MAIL + - E-Mail address for notifications about your letsencrypt certificate. +- USE_XYZ + - Set to "true" if you want to use the service or to "false" to disable it. + +### Install + +After you have applied your changes to the `config.sh` file. You can install all services by running the `setup.sh` script. +Make sure that your server is reachable under your specified domain and the ports `80` and `443` + +If you changed your configuration run the script again. + +### Usage + +In the directory tools there are three scripts to start, stop and update the services. + + ## Nice to know -### Creating a new user +**Creating a new user** + +On your system you may want to add a new user like this: ```sh adduser $new_user_name ``` -### Adding a user to a group +**Adding a user to a group** + +The user can be added to a group with. ```sh -usermod -aG sudo $new_user_name +usermod -aG $grou_name $new_user_name ``` +**Changing the ownership of a file or directory** +```sh +chmod $user:$user -R $path +``` - -## Add todo change ownership and allow execution \ No newline at end of file +**Mark file as executable** +```sh +chmod +x $file +``` \ No newline at end of file diff --git a/config.sh b/config.sh index f4dced7..1bda148 100755 --- a/config.sh +++ b/config.sh @@ -4,7 +4,7 @@ # with the "-f" flag. ## YOUR SETTINGS -## Configure domains and letsencrypt +## Configure domains and letsencrypt. # DOMAIN=armin-co.de SUB_DOMAINS="" @@ -14,10 +14,10 @@ USE_JITSI="true" USE_NOVNC="true" USE_MUMBLE="true" + # Git GIT_URL="https://gitlab.cvh-server.de/aco/" - # Variable that holds all docker-compose files. # This is the main compose file. Don not remove! # Required for unified a unified path layout. @@ -47,9 +47,8 @@ novnc_compose_file=" -f novnc/docker-compose.yml " DOCKER_COMPOSE_FILES+="$novnc_compose_file" fi -# Mumble +# Mumble - Murmur server and mumble web client MUMBLE_WEB_DIR=build-mumble-web -#MUMBLE_URL=https://github.com/Johni0702/mumble-web.git MUMBLE_WEB_URL=https://gitlab.cvh-server.de/aco/build-mumble-web.git if [ "$USE_MUMBLE" == "true" ]; then mumble_compose_file=" -f build-mumble-web/docker-compose.production.yml" diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 07466c8..52130f8 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -1,4 +1,3 @@ # Base docker-compose file for unified path structure. version: '3.4' - diff --git a/setup.sh b/setup.sh index 8d26bb2..51309aa 100755 --- a/setup.sh +++ b/setup.sh @@ -78,4 +78,4 @@ git clone $NOVNC_URL fi -./tools/update_containers.sh \ No newline at end of file +./tools/update.sh \ No newline at end of file diff --git a/tools/start_containers.sh b/tools/start.sh similarity index 100% rename from tools/start_containers.sh rename to tools/start.sh diff --git a/tools/stop_containers.sh b/tools/stop.sh similarity index 100% rename from tools/stop_containers.sh rename to tools/stop.sh diff --git a/tools/update_containers.sh b/tools/update.sh similarity index 100% rename from tools/update_containers.sh rename to tools/update.sh -- GitLab