From d4c6bd62761ebc332ba66b88c96773c73db103d0 Mon Sep 17 00:00:00 2001 From: fatihbaltaci Date: Tue, 21 Jan 2025 17:16:06 +0300 Subject: [PATCH 1/2] Update paths --- INSTALL.md | 6 +++--- README.md | 6 +++--- gurubase.sh | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index d53f490..bc33f53 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -12,7 +12,7 @@ Run this command to install Gurubase: ```bash -curl -fsSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/develop/gurubase.sh -o gurubase.sh +curl -fsSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/master/gurubase.sh -o gurubase.sh bash gurubase.sh ``` @@ -27,7 +27,7 @@ The installer will: You can upgrade to the latest version by running the following command: ```bash -curl -sSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/develop/gurubase.sh -o gurubase.sh +curl -sSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/master/gurubase.sh -o gurubase.sh bash gurubase.sh upgrade ``` @@ -36,7 +36,7 @@ bash gurubase.sh upgrade You can remove Gurubase by running the following command. This will remove the containers and networks but keep the data files. ```bash -curl -sSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/develop/gurubase.sh -o gurubase.sh +curl -sSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/master/gurubase.sh -o gurubase.sh bash gurubase.sh rm ``` diff --git a/README.md b/README.md index cf7bfd2..7ea2159 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
- Gurubase Light Logo - Gurubase Dark Logo

+ Gurubase Light Logo + Gurubase Dark Logo

@@ -56,7 +56,7 @@ Start asking questions directly on Gurubase, or [embed it on your website](https If you prefer not to use [Gurubase.io](https://gurubase.io), you can install the entire system on your own servers. ```bash -curl -fsSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/develop/gurubase.sh -o gurubase.sh +curl -fsSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/master/gurubase.sh -o gurubase.sh bash gurubase.sh ``` diff --git a/gurubase.sh b/gurubase.sh index 10e6e26..59d51f1 100755 --- a/gurubase.sh +++ b/gurubase.sh @@ -137,7 +137,7 @@ upgrade_gurubase() { # Download the latest docker-compose.yml echo "📥 Downloading latest docker-compose.yml..." - if ! curl -sSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/develop/docker-compose.yml -o "$DOCKER_COMPOSE_FILE"; then + if ! curl -sSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/master/docker-compose.yml -o "$DOCKER_COMPOSE_FILE"; then echo "❌ Failed to download new docker-compose.yml" # Restore backup if it exists if [ -f "${DOCKER_COMPOSE_FILE}.backup" ]; then @@ -295,7 +295,7 @@ echo "🚀 Deploying Gurubase Self Hosted..." # Start all services using docker compose if [ ! -f "$DOCKER_COMPOSE_FILE" ]; then echo "📥 Downloading docker-compose.yml..." - curl -sSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/develop/docker-compose.yml -o "$DOCKER_COMPOSE_FILE" + curl -sSL https://raw.githubusercontent.com/Gurubase/gurubase/refs/heads/master/docker-compose.yml -o "$DOCKER_COMPOSE_FILE" fi cd "$GURUBASE_DIR" From 042d6a89f97900cd6cea2af07f475df1d368f1d7 Mon Sep 17 00:00:00 2001 From: fatihbaltaci Date: Tue, 21 Jan 2025 17:35:43 +0300 Subject: [PATCH 2/2] Add workflow file for selfhosted release --- .../backend-docker-image-dockerhub-tags.yml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/backend-docker-image-dockerhub-tags.yml diff --git a/.github/workflows/backend-docker-image-dockerhub-tags.yml b/.github/workflows/backend-docker-image-dockerhub-tags.yml new file mode 100644 index 0000000..eaf07e0 --- /dev/null +++ b/.github/workflows/backend-docker-image-dockerhub-tags.yml @@ -0,0 +1,51 @@ +name: Backend Tag Build and Push Docker Image + +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/src/gurubase-backend/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Configure Dockerhub credentials + run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + + - name: Build and push + env: + REPOSITORY_SELFHOSTED: ${{ secrets.GURUBASE_BE_SELFHOSTED_DOCKER_REPOSITORY }} + IMAGE_TAG: ${{ github.ref_name }} + uses: docker/build-push-action@v5 + with: + context: src/gurubase-backend + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ env.REPOSITORY_SELFHOSTED }}:${{ env.IMAGE_TAG }} + platforms: linux/amd64,linux/arm64 + file: src/gurubase-backend/Dockerfile + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Image Tag + env: + IMAGE_TAG: ${{ github.ref_name }} + run: | + echo "$IMAGE_TAG" + echo "Image Tag: $IMAGE_TAG" >> $GITHUB_STEP_SUMMARY