littleshop/DEPLOYMENT_SLAB01.md
2025-08-27 18:02:39 +01:00

3.6 KiB

LittleShop Deployment on SLAB-01

🚀 Deployment Successful!

Date: August 21, 2025
Server: SLAB-01 (10.0.0.11)
Status: RUNNING

Access URLs

Container Details

  • Container Name: littleshop
  • Image: littleshop:latest
  • Port: 5000 (exposed)
  • Health Check: Enabled
  • Restart Policy: unless-stopped

Data Persistence

Docker volumes created for persistent storage:

  • littleshop_data - SQLite database
  • littleshop_uploads - Product images
  • littleshop_logs - Application logs

Management Commands

View Logs

ssh sysadmin@10.0.0.11 'cd /home/sysadmin && docker compose logs -f'

Restart Container

ssh sysadmin@10.0.0.11 'cd /home/sysadmin && docker compose restart'

Stop Container

ssh sysadmin@10.0.0.11 'cd /home/sysadmin && docker compose down'

Start Container

ssh sysadmin@10.0.0.11 'cd /home/sysadmin && docker compose up -d'

Update and Redeploy

# From local machine
cd /mnt/c/Production/Source/LittleShop
tar -czf littleshop-deploy.tar.gz --exclude='bin' --exclude='obj' --exclude='*.db' --exclude='logs' --exclude='.git' LittleShop/ docker-compose.yml .env.production
scp littleshop-deploy.tar.gz sysadmin@10.0.0.11:/home/sysadmin/
ssh sysadmin@10.0.0.11 'cd /home/sysadmin && tar -xzf littleshop-deploy.tar.gz && docker compose build --no-cache && docker compose up -d'

Features Deployed

Bot Management System

  • Bot registration and API key generation
  • Centralized settings management
  • Metrics collection and reporting
  • Session tracking
  • Admin dashboard for bot monitoring

Core E-Commerce

  • Product catalog management
  • Category organization
  • Order processing
  • Multi-cryptocurrency payments (8 currencies)
  • Admin panel for management

Security Features

  • JWT authentication for API
  • Cookie authentication for admin panel
  • PBKDF2 password hashing
  • Bot API key authentication

Environment Configuration

The deployment uses production settings:

  • SQLite database in /app/data/
  • Logging to console and files
  • HTTPS can be configured via reverse proxy
  • JWT secret key configured (should be changed in production)

Next Steps

  1. Change default admin password

    • Login to admin panel
    • Navigate to Users section
    • Update admin password
  2. Configure reverse proxy (if needed)

    • Set up nginx/traefik for HTTPS
    • Configure domain name
    • Update CORS settings if needed
  3. Register bots

    • Go to Admin > Bots
    • Register new bot
    • Save API key securely
    • Configure TeleBot with API key
  4. Monitor system

    • Check logs regularly
    • Monitor bot metrics
    • Track orders and revenue

Portainer Integration

The container is visible in Portainer at:

  • URL: http://10.0.0.11:9000
  • Container can be managed through Portainer UI
  • Logs, stats, and console access available

Troubleshooting

If the container stops or has issues:

  1. Check logs: docker compose logs --tail=100
  2. Check container status: docker compose ps
  3. Restart if needed: docker compose restart
  4. Check disk space: df -h
  5. Check database: Database is stored in Docker volume

Support Files

  • Dockerfile: /home/sysadmin/LittleShop/Dockerfile
  • docker-compose.yml: /home/sysadmin/docker-compose.yml
  • Environment config: /home/sysadmin/.env.production

Deployment completed successfully! The LittleShop platform with bot management is now running on SLAB-01.