Skip to content
Snippets Groups Projects
Commit 04b6dc4c authored by Armin Co's avatar Armin Co
Browse files

p

parent 3304c0df
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ Collection of online tools for teaching at CVH.
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`
- 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.
......
......@@ -3,15 +3,15 @@
# Get the path to all docker-compose files
# with the "-f" flag.
# Comment the services out that
# you do not want to use.
# Comment the services out that you do not want to use.
# var that holds all
# docker-compose files
# Variable that holds all docker-compose files.
# This is the main compose file which includes letsencrypt
# for your auto generated certificates. Don not remove!
docker_compose_files=" -f docker-compose.yml "
# noVNC
# noVNC - Screen sharing with VNC
# docker_compose_files+=" -f ./novnc/docker-compose.yml "
# letsencrypt
......
......@@ -28,13 +28,22 @@ novnc_dir=novnc
novnc_url="$git_url$novnc_dir".git
# Do not request new certificates while developing
dbg_delete_letsencrypt=false
# Remove all existing repositories
# and configurations.
function remove_all() {
echo "Removing all previous configs..."
git clean -fd
git pull
rm -rf $mumble_dir $jitsi_dir $le_dir $novnc_dir
rm -rf $mumble_dir $jitsi_dir $novnc_dir
if [$dbg_delete_letsencrypt = "true"]
rm -rf $le_dir
fi
echo "Removed all repositories."
}
......@@ -57,10 +66,15 @@ function configure_letsencrypt() {
echo "Setting your letsencrypt domain settings."
echo ""
le_compose=$le_dir/docker-compose.yml
# Adds your domain to docker-compose
sed -i "s/your-domain.com/$domain/" $le_compose
# Adds the list of subdomains to use to docker-compose
sed -i "s/your_subdomains/$sub_domains/" $le_compose
# Add E-Mail address that will be used to notify you
# about for example expiring certificates.
sed -i "s/your_email/$mail/" $le_compose
# to use not only subdomains disable next line
# For using not only your subdomains uncomment the following line.
# sed -i "s/- ONLY_SUBDOMAINS=true/- ONLY_SUBDOMAINS=false/" $le_dir
# start once to generate directories and certificates
......
......@@ -3,5 +3,41 @@
# Update repos
sudo apt update
# show available upgrades
# Show list of available upgrades
apt list --upgradable
# Proceed with upgrades
sudo apt upgrade -y
# Install neccessary repositorys
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg
# Add Docker's GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Verify fingerprint
sudo apt-key fingerprint 0EBFCD88
# Add docker repository
RELEASE_NAME=$(lsb_release -cs)
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $RELEASE_NAME stable"
sudo apt update
# Install docker-ce
sudo apt install -y docker-ce
# Notify admin about user group.
echo "";
echo "If you like you can add a user to the docker group";
echo "sudo usermod -aG docker user_name";
# Installing docker-compose
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
docker-compose --version
# Optional create symbolic link:
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment