use defauölt traefik pw

This commit is contained in:
olli 2024-11-25 16:53:48 +01:00
parent a7a94fdd18
commit afe83c4811
2 changed files with 6 additions and 25 deletions

View File

@ -394,3 +394,4 @@ https://t.me/dabobotcrypto
- Emergency stop if balance falls below defined value
- Analysis tool for collected historical values to try out buy or sell conditions based on them
- Consideration of trading and funding fees
- Liquidation Heatmap (https://www.coinglass.com/pro/futures/LiquidationHeatMap)

View File

@ -29,25 +29,6 @@
block: |
cd /home/docker/dabo.{{inventory_hostname}}
if [ -f env ]
then
. ./env
echo "${WEBPASSWDCRYPT}"
else
webpassword=$(pwgen -s 32 1)
webuser=bot
webpasswordcrypted=$(htpasswd -nb ${webuser} ${webpassword} | sed -e 's/\\$/\\$\\$/g')
echo "WEBUSER=${webuser}
WEBPASSWD='${webpassword}'
WEBPASSWDCRYPT='${webpasswordcrypted}'
" >env
chmod 440 env
chown root:docker env
echo "${webpasswordcrypted}"
fi
if ! [ -d home/.ssh ]
then
mkdir -p home/.ssh
@ -84,10 +65,10 @@
- Restart dabo
- name: Get crypted PW
shell: bash /home/docker/dabo.{{inventory_hostname}}/genpw.sh
register: cryptpw
changed_when: false
#- name: Get crypted PW
# shell: bash /home/docker/dabo.{{inventory_hostname}}/genpw.sh
# register: cryptpw
# changed_when: false
- name: /home/docker/dabo.{{inventory_hostname}}/docker-compose.override.yml Container Configuration
blockinfile:
@ -118,8 +99,7 @@
# cert via letsencrypt
- traefik.http.routers.dabo.tls.certresolver=letsencrypt
# activate secHeaders@file
- traefik.http.routers.dabo.middlewares=secHeaders@file,dabo-basicauth
- traefik.http.middlewares.dabo-basicauth.basicauth.users={{ cryptpw.stdout }}
- traefik.http.routers.dabo.middlewares=secHeaders@file,default-basic-auth@file
# Traefik network
- traefik.docker.network=traefik
networks: