2025-12-17 01:03:57 +00:00
|
|
|
# 🚀 Quick Start: Publishing StreamFlow to Docker Hub
|
|
|
|
|
|
|
|
|
|
## What I've Done
|
|
|
|
|
|
|
|
|
|
✅ Updated `docker-compose.yml` to use Docker Hub image (`aiulian25/streamflow:latest`)
|
|
|
|
|
✅ Created deployment guide ([DOCKER_HUB_DEPLOYMENT.md](DOCKER_HUB_DEPLOYMENT.md))
|
|
|
|
|
✅ Created user installation guide ([DOCKER_INSTALLATION.md](DOCKER_INSTALLATION.md))
|
|
|
|
|
✅ Created automated publish script (`publish-docker.sh`)
|
|
|
|
|
✅ Created GitHub Actions workflow for automated builds
|
|
|
|
|
|
|
|
|
|
## Next Steps to Publish
|
|
|
|
|
|
|
|
|
|
### Option 1: Manual Publishing (Quick Start)
|
|
|
|
|
|
|
|
|
|
1. **Login to Docker Hub:**
|
|
|
|
|
```bash
|
|
|
|
|
docker login
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
2. **Build and push the image:**
|
|
|
|
|
```bash
|
|
|
|
|
./publish-docker.sh
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Or with a specific version:
|
|
|
|
|
```bash
|
|
|
|
|
./publish-docker.sh v1.0.0
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
3. **Verify on Docker Hub:**
|
|
|
|
|
Visit: https://hub.docker.com/r/aiulian25/streamflow
|
|
|
|
|
|
|
|
|
|
### Option 2: Automated Publishing via GitHub Actions
|
|
|
|
|
|
|
|
|
|
1. **Create Docker Hub Access Token:**
|
|
|
|
|
- Go to https://hub.docker.com/settings/security
|
|
|
|
|
- Click "New Access Token"
|
|
|
|
|
- Name: `github-actions`
|
|
|
|
|
- Permissions: Read, Write, Delete
|
|
|
|
|
- Copy the token (you'll only see it once!)
|
|
|
|
|
|
|
|
|
|
2. **Add Secrets to GitHub:**
|
|
|
|
|
- Go to https://github.com/aiulian25/streamflow/settings/secrets/actions
|
|
|
|
|
- Click "New repository secret"
|
|
|
|
|
- Add these secrets:
|
|
|
|
|
- Name: `DOCKER_HUB_USERNAME`, Value: `aiulian25`
|
|
|
|
|
- Name: `DOCKER_HUB_TOKEN`, Value: `<paste your token>`
|
|
|
|
|
|
|
|
|
|
3. **Push to GitHub:**
|
|
|
|
|
```bash
|
|
|
|
|
git add .
|
|
|
|
|
git commit -m "Configure Docker Hub deployment"
|
|
|
|
|
git push origin main
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
4. **Automatic builds will now run on:**
|
|
|
|
|
- Every push to `main` branch → builds `latest` tag
|
|
|
|
|
- Every git tag (e.g., `v1.0.0`) → builds version tag
|
|
|
|
|
|
|
|
|
|
## For Your Users
|
|
|
|
|
|
|
|
|
|
After publishing, users can install StreamFlow in 3 simple commands:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# 1. Download docker-compose.yml
|
|
|
|
|
wget https://raw.githubusercontent.com/aiulian25/streamflow/main/docker-compose.yml
|
|
|
|
|
|
|
|
|
|
# 2. (Optional) Create environment file
|
|
|
|
|
cat > .env <<EOF
|
|
|
|
|
JWT_SECRET=$(openssl rand -base64 32)
|
|
|
|
|
SESSION_SECRET=$(openssl rand -base64 32)
|
|
|
|
|
ENABLE_GPU=false
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
# 3. Start the application
|
|
|
|
|
docker compose up -d
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Then access at: http://localhost:12345
|
|
|
|
|
|
|
|
|
|
## Update Your GitHub README
|
|
|
|
|
|
|
|
|
|
Add this badge to your README.md:
|
|
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
|
[](https://hub.docker.com/r/aiulian25/streamflow)
|
|
|
|
|
[](https://hub.docker.com/r/aiulian25/streamflow)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Add installation instructions:
|
|
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
|
## Quick Start
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
wget https://raw.githubusercontent.com/aiulian25/streamflow/main/docker-compose.yml
|
|
|
|
|
docker compose up -d
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Access at http://localhost:12345
|
|
|
|
|
|
|
|
|
|
See [DOCKER_INSTALLATION.md](DOCKER_INSTALLATION.md) for detailed instructions.
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Testing the Published Image
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Pull the image
|
|
|
|
|
docker pull aiulian25/streamflow:latest
|
|
|
|
|
|
|
|
|
|
# Test run
|
|
|
|
|
docker run -d -p 12345:12345 -p 9000:9000 aiulian25/streamflow:latest
|
|
|
|
|
|
|
|
|
|
# Check if running
|
|
|
|
|
docker ps
|
|
|
|
|
|
|
|
|
|
# View logs
|
|
|
|
|
docker logs <container_id>
|
|
|
|
|
|
|
|
|
|
# Clean up test
|
|
|
|
|
docker stop <container_id>
|
|
|
|
|
docker rm <container_id>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Maintenance
|
|
|
|
|
|
|
|
|
|
### Publishing a New Version
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Tag your release
|
|
|
|
|
git tag -a v1.0.1 -m "Release v1.0.1"
|
|
|
|
|
git push origin v1.0.1
|
|
|
|
|
|
|
|
|
|
# Or manually:
|
|
|
|
|
./publish-docker.sh v1.0.1
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Users Update to Latest Version
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
docker compose pull
|
|
|
|
|
docker compose up -d
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Files Created
|
|
|
|
|
|
|
|
|
|
1. **DOCKER_HUB_DEPLOYMENT.md** - Complete deployment guide for you
|
|
|
|
|
2. **DOCKER_INSTALLATION.md** - User-friendly installation guide
|
|
|
|
|
3. **publish-docker.sh** - Automated build and push script
|
|
|
|
|
4. **.github/workflows/docker-publish.yml** - GitHub Actions workflow
|
|
|
|
|
5. **docker-compose.yml** - Updated to use Docker Hub image
|
|
|
|
|
|
|
|
|
|
## Multi-Architecture Support (Optional)
|
|
|
|
|
|
|
|
|
|
To support both AMD64 and ARM64 (Raspberry Pi, Apple Silicon):
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Create builder
|
|
|
|
|
docker buildx create --name mybuilder --use
|
|
|
|
|
|
|
|
|
|
# Build for multiple platforms
|
|
|
|
|
docker buildx build --platform linux/amd64,linux/arm64 \
|
|
|
|
|
-t aiulian25/streamflow:latest \
|
|
|
|
|
--push .
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
GitHub Actions workflow already supports multi-arch builds!
|
|
|
|
|
|
|
|
|
|
## Summary
|
|
|
|
|
|
|
|
|
|
Your StreamFlow application is now ready for easy deployment! Users will be able to:
|
|
|
|
|
|
|
|
|
|
1. Download one file (`docker-compose.yml`)
|
|
|
|
|
2. Run `docker compose up -d`
|
|
|
|
|
3. Access the application instantly
|
2025-12-17 01:12:36 +00:00
|
|
|
4. Login with default credentials:
|
|
|
|
|
- **Username**: `admin`
|
|
|
|
|
- **Password**: `admin`
|
|
|
|
|
- Change password on first login!
|
2025-12-17 01:03:57 +00:00
|
|
|
|
|
|
|
|
No complex builds, no dependencies, just pull and run! 🎉
|