Some checks failed
Master CI / yarn_install_and_build (push) Has been cancelled
- Add Dockerfile.unraid with multi-stage build (builds inside container) - Add docker-compose.unraid.yml for easy deployment - Add build-and-push.sh script for building and pushing to Gitea registry - Update root redirect to /unraid dashboard Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
46 lines
1.5 KiB
Bash
Executable File
46 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# Build and push Homarr Unraid UI to Gitea registry
|
|
# Uses multi-stage Dockerfile to build inside Docker
|
|
|
|
set -e
|
|
|
|
REGISTRY="git.xtrm-lab.org"
|
|
IMAGE_NAME="jazzymc/homarr"
|
|
TAG="${1:-latest}"
|
|
|
|
echo "=== Building Homarr Unraid UI ==="
|
|
echo "Using multi-stage Docker build (no local dependencies required)"
|
|
echo ""
|
|
|
|
# Build Docker image using the multi-stage Dockerfile
|
|
echo "Building Docker image (this may take 5-10 minutes)..."
|
|
docker build -f Dockerfile.unraid -t "${REGISTRY}/${IMAGE_NAME}:${TAG}" .
|
|
|
|
# Login to Gitea registry (if not already logged in)
|
|
echo ""
|
|
echo "Logging into Gitea registry..."
|
|
docker login "${REGISTRY}" || echo "Already logged in or use: docker login ${REGISTRY}"
|
|
|
|
# Push to registry
|
|
echo ""
|
|
echo "Pushing to registry..."
|
|
docker push "${REGISTRY}/${IMAGE_NAME}:${TAG}"
|
|
|
|
echo ""
|
|
echo "=== Build Complete ==="
|
|
echo "Image: ${REGISTRY}/${IMAGE_NAME}:${TAG}"
|
|
echo ""
|
|
echo "To deploy on Unraid:"
|
|
echo "1. SSH to Unraid: ssh root@192.168.10.20 -p 422"
|
|
echo "2. Create directory: mkdir -p /mnt/user/appdata/homarr-unraid/{data,configs}"
|
|
echo "3. Pull image: docker pull ${REGISTRY}/${IMAGE_NAME}:${TAG}"
|
|
echo "4. Run container:"
|
|
echo " docker run -d \\"
|
|
echo " --name homarr-unraid-ui \\"
|
|
echo " -p 7576:7575 \\"
|
|
echo " -e UNRAID_HOST=192.168.10.20 \\"
|
|
echo " -e UNRAID_API_KEY=YOUR_API_KEY \\"
|
|
echo " -v /mnt/user/appdata/homarr-unraid/data:/data \\"
|
|
echo " -v /mnt/user/appdata/homarr-unraid/configs:/app/data/configs \\"
|
|
echo " ${REGISTRY}/${IMAGE_NAME}:${TAG}"
|