1
0
mirror of https://github.com/deStrO/eBot-docker.git synced 2025-12-10 03:22:49 +01:00

Patching scripts for SSL support configuration

This commit is contained in:
Julien Pardons 2023-11-07 10:24:39 +01:00
parent dc3b67d8ed
commit 1069f79575
5 changed files with 32 additions and 16 deletions

View File

@ -6,6 +6,7 @@ EBOT_ADMIN_PASSWORD=admin
EBOT_ADMIN_EMAIL=admin@admin
WEBSOCKET_SECRET_KEY=strongpassword
COMMAND_STOP_DISABLED=true
WEBSOCKET_URL=replaceme
# Database configuration
MYSQL_USER=ebotv3

View File

@ -9,21 +9,6 @@ cyan='\e[1;36m%s\e[0m\n'
printf "$green" "eBot configuration script"
# eBot configuration
EBOT_IP=10.10.10.91
LOG_ADDRESS_SERVER=http://10.10.10.91:12345
EBOT_ADMIN_LOGIN=admin
EBOT_ADMIN_PASSWORD=admin
EBOT_ADMIN_EMAIL=admin@tset.com
WEBSOCKET_SECRET_KEY=f0ad422482332a9a9a4fbcfaaa65a696
COMMAND_STOP_DISABLED=true
# Database configuration
MYSQL_USER=ebotv3
MYSQL_DATABASE=ebotv3
MYSQL_PASSWORD=a3368dabb311bb66540e9bb9030714e7
MYSQL_ROOT_PASSWORD=501e0a10b2702be5350915784ad2aca1
source .env
echo "Patching ./etc/eBotSocket/config.ini"
cp ./etc/eBotSocket/config.ini ./etc/eBotSocket/config.ini.bak
@ -45,6 +30,7 @@ sed -i "s|log_match_admin:.*|log_match_admin: /app/ebot-logs/log_match_admin|" .
sed -i "s|demo_path:.*|demo_path: /app/ebot-demos|" ./etc/eBotWeb/app_user.yml
sed -i "s|websocket_secret_key:.*|websocket_secret_key: $WEBSOCKET_SECRET_KEY|" ./etc/eBotWeb/app_user.yml
sed -i "s|ebot_ip:.*|ebot_ip: $EBOT_IP|g" ./etc/eBotWeb/app_user.yml
sed -i "s|websocket_url:.*|websocket_url: $WEBSOCKET_URL|g" ./etc/eBotWeb/app_user.yml
echo "Patching ./etc/eBotWeb/database.yml"
cp ./etc/eBotWeb/databases.yml ./etc/eBotWeb/databases.yml.bak

View File

@ -41,9 +41,17 @@ KO3_METHOD = "restart" ; restart or csay or esl
DEMO_DOWNLOAD = true ; true or false :: whether gotv demos will be downloaded from the gameserver after matchend or not
REMIND_RECORD = false ; true will print the 3x "Remember to record your own POV demos if needed!" messages, false will not
DAMAGE_REPORT = true ; true will print damage reports at end of round to players, false will not
USE_DELAY_END_RECORD = false ; use the tv_delay to record postpone the tv_stoprecord & upload
USE_DELAY_END_RECORD = true ; use the tv_delay to record postpone the tv_stoprecord & upload
TIMEOUT_ENABLED = false
TIMEOUT_USE_MATCH_CONFIG = false ; If false, eBot will sends the RCON commands for the timeout
TIMEOUT_TIME = 120 ; mp_team_timeout_time
TIMEOUT_PER_TEAM_PER_MATCH = 1 ; mp_team_timeout_max
TIMEOUT_OT_ADD_EACH = 0 ; mp_team_timeout_ot_add_each
TIMEOUT_OT_ADD_ONCE = 0 ; mp_team_timeout_ot_add_once
TIMEOUT_OT_MAX = 1 ; mp_team_timeout_ot_max
[MAPS]
MAP[] = "de_mirage"
MAP[] = "de_dust2"
MAP[] = "de_inferno"
MAP[] = "de_overpass"

View File

@ -8,6 +8,7 @@
default_max_round: 12
default_rules: rules
default_overtime_enable: false
default_overtime_max_round: 3
default_overtime_startmoney: 16000
@ -16,6 +17,7 @@
demo_download: true
websocket_url: http://127.0.0.1:12360
ebot_ip: 127.0.0.1
ebot_port: 12360

View File

@ -94,6 +94,25 @@ EBOT_IP=$(ask_with_default "Log address server" $EBOT_IP)
sed -i -e "s#EBOT_IP=.*#EBOT_IP=${EBOT_IP}#g" \
"$(dirname "$0")/.env"
echo "Finally, eBot now supports SSL, and then the customization of the domain name / URL for the websocket."
echo "This SSL configuration must be done on your side (using letsencrypt by example)"
if yesNo "Will you be using SSL ?"
then
WEBSOCKET_URL=$(ask_with_default "What will you be using as domain / url for the websocket server" $WEBSOCKET_URL)
sed -i -e "s#WEBSOCKET_URL=.*#WEBSOCKET_URL=${WEBSOCKET_URL}#g" \
"$(dirname "$0")/.env"
echo "Don't forget to create a reverse proxy for the websocket server, that normally listen on 12360"
sleep 5
else
if [ "$WEBSOCKET_URL" = "replaceme" ]
then
echo "Replacing WEBSOCKET_URL with EBOT_IP value"
sed -i -e "s#WEBSOCKET_URL=.*#WEBSOCKET_URL=http://${EBOT_IP}:12360#g" \
"$(dirname "$0")/.env"
fi
fi
if yesNo "Would you like regenerate all configuration files ?"
then
./configure.sh