# Docker Hub Deployment Guide This guide will help you publish the StreamFlow Docker image to Docker Hub so users can easily deploy it. ## Prerequisites 1. Docker Hub account (create one at https://hub.docker.com) 2. Docker installed and running locally ## Step 1: Login to Docker Hub ```bash docker login ``` Enter your Docker Hub username and password when prompted. ## Step 2: Build the Docker Image Build the image with your Docker Hub username: ```bash docker build -t aiulian25/streamflow:latest . ``` You can also create version tags: ```bash docker build -t aiulian25/streamflow:latest -t aiulian25/streamflow:v1.0.0 . ``` ## Step 3: Push to Docker Hub Push the image to Docker Hub: ```bash docker push aiulian25/streamflow:latest ``` If you created version tags, push them too: ```bash docker push aiulian25/streamflow:v1.0.0 ``` ## Step 4: Verify on Docker Hub Visit https://hub.docker.com/r/aiulian25/streamflow to verify your image is published. ## Automated Build (Optional) You can set up GitHub Actions to automatically build and push images: ### Create `.github/workflows/docker-publish.yml`: ```yaml name: Build and Push Docker Image on: push: branches: - main tags: - 'v*' pull_request: branches: - main env: DOCKER_HUB_USERNAME: aiulian25 IMAGE_NAME: streamflow jobs: build-and-push: runs-on: ubuntu-latest permissions: contents: read packages: write steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Extract metadata id: meta uses: docker/metadata-action@v5 with: images: ${{ env.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_NAME }} tags: | type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=raw,value=latest,enable={{is_default_branch}} - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max ``` ### Add Docker Hub Secrets to GitHub: 1. Go to your repository: https://github.com/aiulian25/streamflow 2. Navigate to **Settings** → **Secrets and variables** → **Actions** 3. Add the following secrets: - `DOCKER_HUB_USERNAME`: Your Docker Hub username (aiulian25) - `DOCKER_HUB_TOKEN`: Create a token at https://hub.docker.com/settings/security ## Usage for End Users After publishing, users can simply run: ```bash # Download the docker-compose.yml wget https://raw.githubusercontent.com/aiulian25/streamflow/main/docker-compose.yml # Create environment file (optional) cat > .env <