Repository: ysdragon/StreamBot Branch: main Commit: fe918ed4cc73 Files: 55 Total size: 183.6 KB Directory structure: gitextract_raib73cm/ ├── .github/ │ ├── dependabot.yml │ └── workflows/ │ └── docker-image.yml ├── .gitignore ├── Dockerfile ├── Dockerfile.node ├── README.md ├── docker-compose-node.yml ├── docker-compose-warp.yml ├── docker-compose.yml ├── egg-stream-bot.json ├── package.json ├── src/ │ ├── commands/ │ │ ├── base.ts │ │ ├── config.ts │ │ ├── help.ts │ │ ├── list.ts │ │ ├── manager.ts │ │ ├── ping.ts │ │ ├── play.ts │ │ ├── preview.ts │ │ ├── queue.ts │ │ ├── skip.ts │ │ ├── status.ts │ │ ├── stop.ts │ │ └── ytsearch.ts │ ├── config.ts │ ├── events/ │ │ ├── client/ │ │ │ └── ready.ts │ │ ├── messageCreate.ts │ │ └── voiceStateUpdate.ts │ ├── index.ts │ ├── server/ │ │ ├── index.ts │ │ ├── middleware/ │ │ │ ├── auth.ts │ │ │ └── multer.ts │ │ ├── public/ │ │ │ ├── css/ │ │ │ │ └── main.css │ │ │ ├── js/ │ │ │ │ └── main.js │ │ │ └── site.webmanifest │ │ ├── routes/ │ │ │ ├── auth.ts │ │ │ ├── dashboard.ts │ │ │ ├── preview.ts │ │ │ └── upload.ts │ │ ├── utils/ │ │ │ └── helpers.ts │ │ └── views/ │ │ ├── layouts/ │ │ │ └── main.ejs │ │ └── pages/ │ │ ├── dashboard.ejs │ │ ├── login.ejs │ │ └── preview.ejs │ ├── services/ │ │ ├── media.ts │ │ ├── queue.ts │ │ └── streaming.ts │ ├── types/ │ │ └── index.ts │ └── utils/ │ ├── ffmpeg.ts │ ├── gen-hash.ts │ ├── logger.ts │ ├── shared.ts │ ├── youtube.ts │ └── yt-dlp.ts └── tsconfig.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/dependabot.yml ================================================ # To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file version: 2 updates: - package-ecosystem: "npm" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "weekly" ================================================ FILE: .github/workflows/docker-image.yml ================================================ name: StreamBot Docker Image CI on: push: branches: [ "main" ] paths-ignore: - '.env.example' - 'docker-compose.yml' - 'LICENSE' - 'README.md' release: types: [published] jobs: build: runs-on: ${{ matrix.runner }} strategy: matrix: include: - runner: ubuntu-latest platform: linux/amd64 - runner: ubuntu-24.04-arm platform: linux/arm64 steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Quay.io uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_ROBOT_TOKEN }} - name: Extract Docker metadata id: meta uses: docker/metadata-action@v5.5.1 with: images: quay.io/ydrag0n/streambot - name: Build and push by digest id: build uses: docker/build-push-action@v6 with: context: . file: Dockerfile platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} outputs: type=image,name=quay.io/ydrag0n/streambot,push-by-digest=true,name-canonical=true,push=true cache-from: type=gha cache-to: type=gha,mode=max - name: Export digest run: | mkdir -p /tmp/digests digest="${{ steps.build.outputs.digest }}" touch "/tmp/digests/${digest#sha256:}" - name: Upload digest uses: actions/upload-artifact@v4 with: name: digests-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }} path: /tmp/digests/* if-no-files-found: error retention-days: 1 build-node: runs-on: ${{ matrix.runner }} strategy: matrix: include: - runner: ubuntu-latest platform: linux/amd64 - runner: ubuntu-24.04-arm platform: linux/arm64 steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Quay.io uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_ROBOT_TOKEN }} - name: Extract Docker metadata id: meta uses: docker/metadata-action@v5.5.1 with: images: quay.io/ydrag0n/streambot - name: Build and push by digest id: build uses: docker/build-push-action@v6 with: context: . file: Dockerfile.node platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} outputs: type=image,name=quay.io/ydrag0n/streambot,push-by-digest=true,name-canonical=true,push=true cache-from: type=gha cache-to: type=gha,mode=max - name: Export digest run: | mkdir -p /tmp/digests-node digest="${{ steps.build.outputs.digest }}" touch "/tmp/digests-node/${digest#sha256:}" - name: Upload digest uses: actions/upload-artifact@v4 with: name: digests-node-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }} path: /tmp/digests-node/* if-no-files-found: error retention-days: 1 merge: runs-on: ubuntu-latest needs: - build steps: - name: Download digests uses: actions/download-artifact@v4 with: path: /tmp/digests pattern: digests-* merge-multiple: true - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Quay.io uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_ROBOT_TOKEN }} - name: Extract Docker metadata id: meta uses: docker/metadata-action@v5.5.1 with: images: quay.io/ydrag0n/streambot - name: Create manifest list and push working-directory: /tmp/digests run: | docker buildx imagetools create \ --tag quay.io/ydrag0n/streambot:latest \ --tag quay.io/ydrag0n/streambot:${{ github.ref_name }} \ $(printf 'quay.io/ydrag0n/streambot@sha256:%s ' *) merge-node: runs-on: ubuntu-latest needs: - build-node steps: - name: Download digests uses: actions/download-artifact@v4 with: path: /tmp/digests-node pattern: digests-node-* merge-multiple: true - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Quay.io uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_ROBOT_TOKEN }} - name: Extract Docker metadata id: meta uses: docker/metadata-action@v5.5.1 with: images: quay.io/ydrag0n/streambot - name: Create manifest list and push working-directory: /tmp/digests-node run: | docker buildx imagetools create \ --tag quay.io/ydrag0n/streambot:node \ --tag quay.io/ydrag0n/streambot:node-${{ github.ref_name }} \ $(printf 'quay.io/ydrag0n/streambot@sha256:%s ' *) ================================================ FILE: .gitignore ================================================ LICENSE node_modules/ dist/ .env bun.lockb videos/ tmp/ *.sock cookies.txt ================================================ FILE: Dockerfile ================================================ # Use Debian (trixie) as the base image FROM node:trixie # Set the working directory WORKDIR /home/bots/StreamBot # Install minimal dependencies RUN apt-get update && apt-get install -y curl ca-certificates unzip && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Install bun and add to PATH ENV BUN_INSTALL="/usr/local/" RUN curl -fsSL https://bun.sh/install | bash # Install remaining dependencies and clean cache RUN apt-get update && apt-get install -y \ build-essential \ python3 \ ffmpeg && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Copy package.json COPY package.json ./ # Install dependencies RUN bun install # Trust all packages RUN bun pm trust --all # Copy the rest of the application code COPY . . # Verify the application builds RUN bun run build # Specify the port number the container should expose EXPOSE 3000 # Create videos folder RUN mkdir -p ./videos # Command to run the application CMD ["bun", "run", "start"] ================================================ FILE: Dockerfile.node ================================================ # Use Debian (trixie) as the base image FROM node:trixie # Set the working directory WORKDIR /home/bots/StreamBot # Install minimal dependencies RUN apt-get update && apt-get install -y curl ca-certificates unzip && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Install remaining dependencies and clean cache RUN apt-get update && apt-get install -y \ build-essential \ python3 \ ffmpeg && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Copy package.json COPY package.json ./ # Install dependencies RUN npm install # Copy the rest of the application code COPY . . # Verify the application builds RUN npm run build # Specify the port number the container should expose EXPOSE 3000 # Create videos folder RUN mkdir -p ./videos # Command to run the application CMD ["npm", "run", "start:node"] ================================================ FILE: README.md ================================================
Please sign in to continue
| <%= key %> | <%- stringify(value) %> |