fail2ban service in docker container ()

docker container

Co-authored-by: Dmitrij Vinogradov <dmitrij.vinogradov@gmail.com>
This commit is contained in:
Dmitiry Vinogradov 2025-01-11 15:41:48 +03:00 committed by GitHub
parent 0c47771671
commit a4c38ec8ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 1 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
# Start fail2ban
fail2ban-client -x start
[ $X_UI_ENABLE_FAIL2BAN == "true" ] && fail2ban-client -x start
# Run x-ui
exec /app/x-ui

View file

@ -48,6 +48,7 @@ RUN chmod +x \
/app/x-ui \
/usr/bin/x-ui
ENV X_UI_ENABLE_FAIL2BAN="true"
VOLUME [ "/etc/x-ui" ]
CMD [ "./x-ui" ]
ENTRYPOINT [ "/app/DockerEntrypoint.sh" ]

View file

@ -11,6 +11,7 @@ services:
- $PWD/cert/:/root/cert/
environment:
XRAY_VMESS_AEAD_FORCED: "false"
X_UI_ENABLE_FAIL2BAN: "true"
tty: true
network_mode: host
restart: unless-stopped