Skip to content

Quick Start with Docker Compose

This guide will get you up and running with SLOzy in about 15 minutes using Docker Compose. This is the fastest way to try out all features of the platform.

🎯 What You'll Achieve

By following this guide, you'll have:

  • Functional SLOzy Platform: Complete system with all services
  • Data Persistence: PostgreSQL database with sample data
  • Monitoring: Prometheus and Grafana dashboards
  • Real-time Updates: WebSocket connections working
  • Sample SLOs: Pre-configured SLOs for experimentation

⏱️ Time Required

Total Time: 15-20 minutes

🧰 Prerequisites

Required Software

  • Docker: 20.10+ or Docker Desktop 4.15+
  • Docker Compose: 2.0+
  • Git: For cloning the repository
  • Ports Available: Ensure ports 8080, 3000, 5432, 6379, 9090, 3001 are free

Verify Requirements

bash
# Check Docker
docker --version
docker-compose --version

# Check port availability
# (On macOS/Linux)
lsof -i :8080
lsof -i :3000
lsof -i :5432
lsof -i :6379

# (On Windows use netstat or PowerShell)
netstat -ano | findstr :8080

📥 Step 1: Clone the Repository

First, clone the SLOzy repository:

bash
git clone https://github.com/philyuchkoff/slozy.git
cd slozy

🔧 Step 2: Configure Environment Variables

Create the required environment configuration:

bash
# Copy example environment file
cp .env.example .env

# Edit environment variables
nano .env

Configure these critical settings:

bash
# Database Configuration
DATABASE_URL=postgres://postgres:postgres@postgres:5432/slozy_db?sslmode=disable

# JWT Secret (Generate a secure random string)
JWT_SECRET=change-this-to-a-secure-random-string-32-chars-minimum

# Application Settings
SERVER_PORT=8080
GIN_MODE=debug  # Use 'release' for better performance

# Feature Flags
CACHE_ENABLED=true
NOTIFICATIONS_ENABLED=true
WEBSOCKET_ENABLED=true

Generate a secure JWT secret:

bash
openssl rand -base64 32

🚀 Step 3: Build and Start Services

Build and start all services using Docker Compose:

bash
# Build and start all services
docker-compose up -d

# Show logs (optional)
docker-compose logs -f

Expected Output:

✅ Building slozy-web
✅ Building slozy-frontend
✅ Creating slozy-postgres
✅ Creating slozy-redis
✅ Creating slozy-prometheus
✅ Creating slozy-grafana
✅ Starting services...
✅ Services are up and running!

⏳ Step 4: Wait for Services to Be Ready

Wait for all services to become healthy:

bash
# Check service status
docker-compose ps

# Show detailed status
docker-compose ps -a

Expected Status:

NAME                    STATUS    PORTS
slozy-postgres         Up       0.0.0.0:5432->5432/tcp
slozy-redis           Up       0.0.0.0:6379->6379/tcp
slozy-prometheus      Up       0.0.0.0:9090->9090/tcp
slozy-grafana         Up       0.0.0.0:3001->3000/tcp
slozy-web             Up       0.0.0.0:8080->8080/tcp
slozy-frontend        Up       0.0.0.0:3000->80/tcp

All services should show Up status.

🧪 Step 5: Run Database Migrations

Initialize the database schema:

bash
# Run migrations
docker-compose exec slozy-web ./slozy-web migrate up

# Expected output
 Running migrations...
 18 migrations applied successfully
 Database is ready!

🏥 Step 6: Health Check

Verify all services are healthy:

bash
# Check application health
curl http://localhost:8080/health

# Expected response
{
  "status": "ok",
  "timestamp": "2026-06-09T14:30:00Z",
  "services": {
    "database": "ok",
    "redis": "ok",
    "notifications": "ok",
    "websocket": "ok"
  }
}

🌐 Step 7: Access the Web Interface

Open your preferred web browser:

Frontend Application:

http://localhost:3000

Backend API:

http://localhost:8080

Grafana Dashboard:

http://localhost:3001

Initial Login

Use these default credentials for first login:

Email: admin@slozy.net
Password: admin123

(Note: Change this password immediately after first login!)

🎯 Step 8: Create Your First SLO

Let's create your first Service Level Objective:

  1. Navigate to SLO Management

    • Click "SLO Management" in the left menu
    • Click "Create SLO" button
  2. Fill in SLO Details:

    • Name: API Response Time
    • Description: Monitor API response time - 95th percentile
    • Target: 99.5 (percent)
    • Time Window: 1h (1 hour)
    • Metric Type: latency
    • Query: histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))
    • Team: Select Production Team
  3. Click "Create" to save your SLO

🔍 Step 9: Verify SLO Monitoring

Check that your SLO is being monitored:

  1. Go to Dashboard

    • Click "Dashboard" in the left menu
    • You should see your new SLO in the overview
  2. Check Real-time Metrics

    • Click on your SLO name to see detailed metrics
    • You should see performance data being collected

✅ Step 10: Test WebSocket Updates

Verify real-time updates are working:

  1. Open a new browser tab to your SLO
  2. Make some changes (e.g., modify the SLO)
  3. Observe real-time updates in the original tab
  4. Check WebSocket connection in browser DevTools (F12 → Network → WS)

📊 Step 11: Explore Monitoring Dashboards

Access Grafana for monitoring insights:

  1. Open Grafana
    http://localhost:3001
  2. Login with: admin / admin
  3. Navigate to: Dashboards → SLOzy Overview
  4. View Metrics:
    • Application performance
    • Database performance
    • System resource usage
    • SLO-specific metrics

🔔 Step 12: Test Notifications

Configure and test notifications:

  1. Go to Settings → Notifications
  2. Add a Test Channel:
    • Type: Slack
    • Webhook URL: https://hooks.slack.com/services/YOUR/WEBHOOK/URL
  3. Send Test Notification
  4. Verify delivery in your Slack channel

🧹 Step 13: POST-Installation Configuration

Security Settings

Change default credentials immediately:

  1. Navigate to Settings → Security
  2. Change default password
  3. Enable 2FA (optional but recommended)
  4. Configure IP whitelist if needed

Performance Tuning

Optimize performance for your workload:

  1. Go to Settings → Cache
  2. Adjust cache TTL (recommendation: 5 minutes for development)
  3. Enable compression for large datasets
  4. Set max cache entries based on your needs

Backup Configuration

Set up automated backups:

  1. Export database schema for reference:
bash
docker-compose exec postgres pg_dump slozy_db > backup.sql
  1. Configure backup schedule (see Backup Guide)

🎉 Congratulations!

You now have a fully functional SLOzy platform!

What's Next:

🐛 Troubleshooting Common Issues

Port Conflicts

If you get port conflicts:

bash
# Stop all services
docker-compose down

# Change ports in .env file
SERVER_PORT=8081

# Restart services
docker-compose up -d

Database Connection Issues

If database fails to start:

bash
# Check database logs
docker-compose logs postgres

# Restart database
docker-compose restart postgres

# Reset database (WARNING: this deletes all data)
docker-compose down -v
docker-compose up -d

Application Not Starting

If application fails to start:

bash
# Check application logs
docker-compose logs slozy-web --tail=50

# Common issues:
# - Database not ready → wait 30 seconds and restart
# - Port conflict → change SERVER_PORT in .env
# - Migration failed → check database connection string

Frontend Not Loading

If frontend doesn't load:

bash
# Check frontend logs
docker-compose logs slozy-frontend --tail=50

# Rebuild frontend
docker-compose build slozy-frontend
docker-compose up -d slozy-frontend

📊 Service Status Verification

Check all services are healthy:

bash
# Overall status
docker-compose ps

# Individual service health checks
curl http://localhost:8080/health
curl http://localhost:9090/-/healthy  # Prometheus
curl http://localhost:3001/api/health  # Grafana

# Check resource usage
docker stats

🔄 Resetting Your Installation

If you need a fresh start:

bash
# Stop all services
docker-compose down

# Remove all volumes (this deletes all data!)
docker-compose down -v

# Remove images
docker-compose rmi

# Start fresh
docker-compose up -d

🚀 Beyond Quick Start

Once comfortable with the basics:

  1. Advanced Configuration - See Configuration Guide
  2. Production Deployment - See Deployment Guide
  3. Feature Exploration - See Features Documentation
  4. API Integration - See API Reference
  5. Monitoring Setup - See Monitoring Guide

📞 Getting Help

If you encounter issues:

  1. Check Troubleshooting Guide
  2. Review FAQ
  3. Contact Support - support@slozy.net
  4. Visit Community Forum - https://community.slozy.net

Next: Application Configuration ⏭️

Previous: Getting Started ⬅️

Language: 🇬🇧 English | 🇷🇺 Русский