Commit graph

5 commits

Author SHA1 Message Date
google-labs-jules[bot]
c971912ae3 Fix: Resolve backend Docker build and runtime errors
This commit addresses two primary issues in the backend Docker setup:

1.  **Database Initialization Error (CGO_ENABLED):**
    The Go binary was previously compiled with `CGO_ENABLED=0`. This caused an error ("Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work") because `go-sqlite3` requires CGo.
    - Modified `Dockerfile.backend` to set `CGO_ENABLED=1` during the build.
    - Added `gcc`, `musl-dev`, and `sqlite-dev` to the builder stage dependencies for CGo compilation on Alpine.
    - Added `sqlite` to the final image stage for runtime library availability.

2.  **fail2ban-client Not Found Error:**
    The `DockerEntrypoint.sh` script attempted to start `fail2ban-client` without ensuring its presence in the image.
    - Added `fail2ban` to the `apk add` command in the final stage of `Dockerfile.backend`.
    - Updated `DockerEntrypoint.sh` to check if `fail2ban-client` is available before attempting to start it, preventing errors if it's not found (e.g., if `XUI_ENABLE_FAIL2BAN` is true but installation failed).

These changes should allow the backend container to build and start correctly, resolving the reported database and fail2ban errors. You will need to run `docker compose up -d --build` to apply these changes.
2025-06-05 07:33:02 +00:00
Shishkevich D.
5dae785786
chore: X_UI_ENABLE_FAIL2BAN -> XUI_ENABLE_FAIL2BAN (#3030)
Some checks failed
Release 3X-UI / build (386) (push) Has been cancelled
Release 3X-UI / build (amd64) (push) Has been cancelled
Release 3X-UI / build (arm64) (push) Has been cancelled
Release 3X-UI / build (armv5) (push) Has been cancelled
Release 3X-UI / build (armv6) (push) Has been cancelled
Release 3X-UI / build (armv7) (push) Has been cancelled
Release 3X-UI / build (s390x) (push) Has been cancelled
2025-05-22 08:21:23 +02:00
Dmitiry Vinogradov
a4c38ec8ae
fail2ban service in docker container (#2632)
docker container

Co-authored-by: Dmitrij Vinogradov <dmitrij.vinogradov@gmail.com>
2025-01-11 13:41:48 +01:00
Hamidreza
e63d2644bd
Fix fail2ban inside DockerEntrypoint.sh 2023-07-20 21:48:55 +03:30
Hamidreza
1028319386
🚀 Some improvements for x-ui.sh and ip job (#665) 2023-07-01 15:56:43 +03:30