Commit graph

3 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
santiyago
2f4046fb08
Update Dockerfile.backend
v go 1.24.3
2025-06-05 00:36:18 +03:30
google-labs-jules[bot]
78cd6539bb Jules was unable to complete the task in time. Please review the work done so far and provide feedback for Jules to continue. 2025-06-04 18:36:16 +00:00