Files
budget/DEPLOYMENT.md
T
nmemmert ad37bb57ae Add Docker deployment for ZimaOS
- Updated Dockerfile for local storage deployment (removed Firebase dependencies)
- Created docker-compose.yml with persistent data volumes
- Added deploy.sh script for automated deployment
- Created DEPLOYMENT.md with ZimaOS deployment guide
- Added .env.example for configuration template
- Updated .gitignore to protect sensitive data
- Fixed package.json to use port 7654 in production
- Cleared all test user data for fresh deployment
- Updated README with deployment section
2026-01-13 15:47:32 -05:00

2.6 KiB

Capsule Budget - ZimaOS Deployment Guide

Quick Deploy

  1. Clone or upload this repository to your ZimaOS device

  2. Run the deployment script:

    ./deploy.sh
    

    This will:

    • Generate a secure encryption key
    • Clear any test data
    • Build the Docker image
    • Start the container
  3. Access Capsule:

    • Open browser to http://your-zima-ip:7654
    • Create your account and start budgeting!

Manual Deployment

If you prefer manual setup:

  1. Create .env file:

    cp .env.example .env
    
  2. Generate encryption key:

    openssl rand -base64 32
    
  3. Update .env with your key:

    ENCRYPTION_KEY=your-generated-key-here
    
  4. Build and start:

    docker-compose up -d
    

ZimaOS Integration

Using ZimaOS Apps

If ZimaOS supports custom apps:

  1. Navigate to Apps section
  2. Click "Add Custom App"
  3. Point to this directory
  4. Configure port: 7654

Using ZimaOS File Manager

  1. Upload project via web interface or SMB
  2. SSH into ZimaOS
  3. Navigate to project directory
  4. Run ./deploy.sh

Data Persistence

All user data is stored in ./data/ directory:

  • User credentials (hashed)
  • Budget data (encrypted with AES-GCM)
  • Transaction history

Backup Strategy:

# Backup data
cp -r data data-backup-$(date +%Y%m%d)

# Or use ZimaOS snapshot feature

Management Commands

# View logs
docker-compose logs -f

# Stop Capsule
docker-compose stop

# Restart Capsule
docker-compose restart

# Stop and remove container
docker-compose down

# Rebuild after updates
docker-compose build --no-cache
docker-compose up -d

Updating Capsule

# Pull latest changes
git pull

# Rebuild and restart
docker-compose down
docker-compose build
docker-compose up -d

Your data in ./data/ will persist across updates.

Security Notes

  • Change the default ENCRYPTION_KEY before first use
  • Keep your .env file secure and never commit it
  • Use ZimaOS firewall to restrict access if needed
  • Consider VPN-only access for additional security

Troubleshooting

Container won't start

# Check logs
docker-compose logs

# Verify .env file exists
ls -la .env

Port already in use

Edit docker-compose.yml and change port mapping:

ports:
  - "8080:7654"  # Change 8080 to your preferred port

Data not persisting

Ensure ./data directory has correct permissions:

chmod 755 data

Support

For issues or questions: