-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from lauraquellmalz/36
#36: Fixed problem with port 80
- Loading branch information
Showing
6 changed files
with
201 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: "3.5" | ||
services: | ||
%TPL_PROJECT_NAME%: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: doil/%TPL_PROJECT_NAME%:stable | ||
container_name: %TPL_PROJECT_NAME% | ||
hostname: %TPL_PROJECT_NAME% | ||
domainname: local | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./volumes/ilias:/var/www/html | ||
- ./volumes/data:/var/ilias/data | ||
- ./volumes/db/:/var/lib/mysql | ||
- ./volumes/index:/var/ilias/index | ||
- ./volumes/logs:/var/ilias/logs | ||
- ./volumes/logs/error/:/var/ilias/logs/error | ||
- ./volumes/logs/apache:/var/log/apache2 | ||
- ./conf/minion.cnf:/etc/salt/minion | ||
- type: bind | ||
source: ./conf/salt-minion.conf | ||
target: /etc/supervisor/conf.d/salt-minion.conf | ||
environment: | ||
- ILIAS_INI_PATH=/var/www/html/ilias.ini.php | ||
- TZ=Europe/Berlin | ||
- JAVA_SERVER_PATH=/var/www/html/Services/WebServices/RPC/lib | ||
- JAVA_SERVER_START | ||
networks: | ||
- main_saltnet | ||
networks: | ||
main_saltnet: | ||
external: true | ||
volumes: | ||
persistent: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
#!/bin/bash | ||
|
||
# doil is a tool that creates and manages multiple docker container | ||
# with ILIAS and comes with several tools to help manage everything. | ||
# It is able to download ILIAS and other ILIAS related software | ||
# like cate. | ||
# | ||
# Copyright (C) 2020 - 2021 Laura Herzog ([email protected]) | ||
# Permission to copy and modify is granted under the AGPL license | ||
# | ||
# Contribute: https://github.com/conceptsandtraining/ilias-tool-doil | ||
# | ||
# .-. | ||
# / / | ||
# / | | ||
# |\ ._ ,-"" `. | ||
# | |,,_/ 7 ; | ||
# `;= ,=( , / | ||
# |`q q ` | \_,| | ||
# .=; <> _ ; / ,/'/ | | ||
# ';|\,j_ \;=\ ,/ `-' | ||
# `--'_|\ ) | ||
# ,' | / ;' | ||
# (,,/ (,,/ Thanks to Concepts and Training for supporting doil | ||
# | ||
# Last revised 2021-03-23 | ||
|
||
# sudo user check | ||
if [ "$EUID" -ne 0 ] | ||
then | ||
echo -e "\033[1mREQUIREMENT ERROR:\033[0m" | ||
echo -e "\tPlease execute this script as sudo user!" | ||
exit | ||
fi | ||
|
||
CHECK_DOCKER=$(docker --version | tail -n 1 | cut -d " " -f 3 | cut -c 1-5) | ||
vercomp () { | ||
if [[ $1 == $2 ]] | ||
then | ||
return 0 | ||
fi | ||
local IFS=. | ||
local i ver1=($1) ver2=($2) | ||
# fill empty fields in ver1 with zeros | ||
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)) | ||
do | ||
ver1[i]=0 | ||
done | ||
for ((i=0; i<${#ver1[@]}; i++)) | ||
do | ||
if [[ -z ${ver2[i]} ]] | ||
then | ||
# fill empty fields in ver2 with zeros | ||
ver2[i]=0 | ||
fi | ||
if ((10#${ver1[i]} > 10#${ver2[i]})) | ||
then | ||
return 1 | ||
fi | ||
if ((10#${ver1[i]} < 10#${ver2[i]})) | ||
then | ||
return 2 | ||
fi | ||
done | ||
return 0 | ||
} | ||
|
||
testvercomp () { | ||
vercomp $1 $2 | ||
case $? in | ||
0) op='=';; | ||
1) op='>';; | ||
2) op='<';; | ||
esac | ||
if [[ $op != $3 ]] | ||
then | ||
echo -e "\033[1mREQUIREMENT ERROR:\033[0m" | ||
echo -e "\tYour docker version is not supported!" | ||
echo -e "\tdoil requires at least docker version \033[1m19.03\033[0m. You have \033[1m${CHECK_DOCKER}\033[0m installed." | ||
exit | ||
fi | ||
} | ||
testvercomp ${CHECK_DOCKER} "19.02" ">" | ||
|
||
# check the OS | ||
OPS="" | ||
case "$(uname -s)" in | ||
Darwin) | ||
OPS="mac" | ||
;; | ||
Linux) | ||
OPS="linux" | ||
;; | ||
*) | ||
echo -e "\033[1mREQUIREMENT ERROR:\033[0m" | ||
echo -e "\tYour operating system is not supported!" | ||
exit | ||
;; | ||
esac | ||
|
||
################################ | ||
# Removing old version if needed | ||
NOW=$(date +'%d.%m.%Y %I:%M:%S') | ||
echo "[${NOW}] Removing old version" | ||
|
||
if [ -f "/usr/local/bin/doil" ] | ||
then | ||
rm /usr/local/bin/doil | ||
fi | ||
if [ -d "/usr/local/lib/doil" ] | ||
then | ||
rm -rf /usr/local/lib/doil/lib | ||
fi | ||
|
||
######################### | ||
# Copying the doil system | ||
NOW=$(date +'%d.%m.%Y %I:%M:%S') | ||
echo "[${NOW}] Copying the doil system" | ||
|
||
# Move the base script to the /usr/local/bin folder and make it executeable | ||
cp src/doil.sh /usr/local/bin/doil | ||
chmod a+x /usr/local/bin/doil | ||
|
||
# Move the script library to /usr/local/lib/doil | ||
if [ ! -d "/usr/local/lib/doil" ] | ||
then | ||
mkdir /usr/local/lib/doil | ||
fi | ||
cp -r src/lib /usr/local/lib/doil/lib | ||
chmod -R a+x /usr/local/lib/doil/lib | ||
|
||
################# | ||
# Everything done | ||
NOW=$(date +'%d.%m.%Y %I:%M:%S') | ||
echo "[${NOW}] Everything done" |