Last updated: Aug 12, 2025, 01:09 PM UTC

Docker Hub β†’ Sliplane Deployment Guide

Generated: 2025-08-11 UTC
Purpose: Push containers from laptop to Docker Hub, then deploy to Sliplane
Workflow: Local Build β†’ Docker Hub β†’ Sliplane


Overview

This guide shows how to deploy Sasha Studio directly from your laptop to Sliplane using Docker Hub as the container registry. This approach gives you full control over the build and deployment process without needing CI/CD setup.

Multi-Client Deployment System

For managing multiple client deployments, see the Client Management System which provides:

  • Automated multi-client deployments
  • Client-specific configurations
  • Version management per client
  • Simplified deployment commands

Workflow

graph LR A[Local Laptop] -->|docker build| B[Docker Image] B -->|docker push| C[Docker Hub] C -->|pull| D[Sliplane] D -->|deploy| E[Production]

Quick Start

Prerequisites

  1. Docker Desktop installed on your laptop
  2. Docker Hub account (free at hub.docker.com)
  3. Sliplane account (sign up at sliplane.io)

Step 1: First-Time Setup

# Run the deployment script
./scripts/push-to-sliplane.sh

# On first run, it will ask for:
# - Docker Hub username
# - Docker Hub password/token
# - Image name (e.g., yourusername/sasha-studio)
# - Sliplane webhook URL (optional, for auto-deploy)

The script saves your configuration (except password) for future deployments.

Step 2: Deploy

The build process now uses Dockerfile.sliplane by default (optimized for production).

# Build, test, and push to Docker Hub
./scripts/push-to-sliplane.sh

# Skip local testing for faster deployment
./scripts/push-to-sliplane.sh --skip-test

# Deploy a specific version tag
./scripts/push-to-sliplane.sh --tag v1.0.0

Step 3: Configure Sliplane

In your Sliplane dashboard:

  1. Create/Update Service

    • Source: Docker Hub
    • Image: yourusername/sasha-studio:latest
  2. Set Environment Variables

    NODE_ENV=production
    PORT=3005
    HOST=0.0.0.0
    SESSION_SECRET=<generate-with: openssl rand -base64 32>
    JWT_SECRET=<generate-with: openssl rand -base64 32>
    DB_PATH=/app/data/sasha.db
    DOCS_PATH=/app/docs
    CONFIG_DIR=/app/config
    
  3. Create Volumes

    • /app/data β†’ 1GB (SQLite database)
    • /app/docs β†’ 5GB (Documentation)
    • /app/uploads β†’ 10GB (User uploads)
    • /app/config β†’ 100MB (Configuration)
    • /app/workspaces β†’ 5GB (Workspaces)
  4. Deploy

    • Click "Deploy" or "Redeploy"
    • Or set up webhook for automatic deployment

Docker Hub Setup

Create Access Token (Recommended)

  1. Go to Docker Hub Security Settings
  2. Click "New Access Token"
  3. Description: "Sasha Studio Deployment"
  4. Access permissions: "Read, Write, Delete"
  5. Copy the token (use instead of password)

Repository Visibility

Option 1: Public Repository (Easier)

  • Free unlimited public repositories
  • No authentication needed in Sliplane
  • Make public at: https://hub.docker.com/r/yourusername/sasha-studio/settings

Option 2: Private Repository

  • 1 free private repository
  • Requires authentication in Sliplane:
    • Username: Your Docker Hub username
    • Password: Your access token

🚦 Deployment Script Features

The push-to-sliplane.sh script provides:

Automatic Steps

  1. Docker installation check
  2. Docker Hub login
  3. Image building with multiple tags
  4. Optional local testing
  5. Push to Docker Hub
  6. Webhook trigger (if configured)
  7. Deployment instructions

Configuration Management

  • Saves settings in .sliplane-deploy-config
  • Prompts for password each time (security)
  • Reuses saved configuration

Image Tagging

Each deployment creates three tags:

  • latest - Always points to newest version
  • <git-commit> - Git commit hash (e.g., abc1234)
  • <timestamp> - Build timestamp (e.g., 20250809-143022)

Typical Deployment Flow

Development Deployment

# Make changes to code
git add .
git commit -m "Add new feature"

# Deploy to Sliplane
./scripts/push-to-sliplane.sh

# Script will:
# 1. Build the image locally
# 2. Optionally test it
# 3. Push to Docker Hub
# 4. Trigger Sliplane webhook (if configured)

Production Deployment

# Tag your release
git tag v1.2.3
git push origin v1.2.3

# Deploy with version tag
./scripts/push-to-sliplane.sh --tag v1.2.3

# In Sliplane, update to specific version:
# yourusername/sasha-studio:v1.2.3

Continuous Deployment Options

Option 1: Manual Trigger

  • Push to Docker Hub from laptop
  • Manually click "Redeploy" in Sliplane

Option 2: Webhook Automation

  • Configure webhook URL in script
  • Automatic deployment after push

Option 3: Scheduled Pulls

  • Set Sliplane to check for updates periodically
  • Pulls latest image automatically

Troubleshooting

Docker Hub Login Issues

# Test login manually
docker login

# Use access token instead of password
# Create at: https://hub.docker.com/settings/security

Build Failures

# Check Docker daemon
docker info

# Check Dockerfile exists (default for all builds)
ls -la Dockerfile.sliplane

# Build manually for debugging (Dockerfile.sliplane is now default)
docker build -f Dockerfile.sliplane -t test .

# Or use the build script (automatically uses Dockerfile.sliplane)
./scripts/docker-build.sh production

Push Failures

# Check you're logged in
docker login

# Check image exists
docker images

# Try pushing manually
docker push yourusername/sasha-studio:latest

Sliplane Not Pulling

For private repositories:

  1. Verify credentials in Sliplane
  2. Test pull manually:
    docker pull yourusername/sasha-studio:latest
    

Cost Analysis

Docker Hub (Free Tier)

  • Public repos: Unlimited
  • Private repos: 1 free
  • Storage: No limits for public
  • Pulls: 100 pulls/6 hours (anonymous)
  • Pulls: Unlimited (authenticated)

Upgrading Docker Hub

  • Pro: $5/month
    • Unlimited private repos
    • 5000 pulls/day
    • Automated builds

Security Best Practices

1. Use Access Tokens

  • Never use your Docker Hub password directly
  • Create scoped access tokens
  • Rotate tokens regularly

2. Image Security

  • Keep base images updated
  • Scan for vulnerabilities
  • Don't include secrets in images

3. Private vs Public

  • Use private repos for proprietary code
  • Public repos for open source
  • Consider image signing

4. Local Security

  • Don't commit .sliplane-deploy-config if it contains sensitive data
  • Use environment variables for tokens:
    DOCKER_TOKEN=your-token ./scripts/push-to-sliplane.sh
    

Best Practices

1. Version Control

# Always tag releases
git tag v1.0.0
./scripts/push-to-sliplane.sh --tag v1.0.0

2. Testing

# Test locally before pushing
./scripts/push-to-sliplane.sh  # Includes test

# Skip test for hotfixes
./scripts/push-to-sliplane.sh --skip-test

3. Rollback Strategy

  • Use specific tags in production
  • Keep previous versions available
  • Document version changes

4. Image Optimization

  • Use multi-stage builds
  • Minimize layers
  • Clean up build artifacts
  • Use .dockerignore

Quick Reference

Commands

# First time setup
./scripts/push-to-sliplane.sh

# Deploy latest
./scripts/push-to-sliplane.sh

# Deploy specific tag
./scripts/push-to-sliplane.sh --tag v1.0.0

# Skip testing
./scripts/push-to-sliplane.sh --skip-test

# Help
./scripts/push-to-sliplane.sh --help

Environment Variables

# Skip password prompt
export DOCKER_TOKEN=your-access-token
./scripts/push-to-sliplane.sh

Configuration Files

  • .sliplane-deploy-config - Deployment settings
  • Dockerfile.sliplane - Optimized Dockerfile
  • .dockerignore - Build exclusions

Deployment Checklist

Before first deployment:

  • Docker Desktop installed and running
  • Docker Hub account created
  • Access token generated
  • Sliplane server created
  • Script configuration completed

For each deployment:

  • Code changes committed
  • Tests passing locally
  • Version tagged (if production)
  • Script executed successfully
  • Sliplane deployment verified
  • Health check passing

Last Updated: 2025-08-09
Script Location: scripts/push-to-sliplane.sh
Platform: Docker Hub β†’ Sliplane