- 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
2.6 KiB
2.6 KiB
Capsule Budget - ZimaOS Deployment Guide
Quick Deploy
-
Clone or upload this repository to your ZimaOS device
-
Run the deployment script:
./deploy.shThis will:
- Generate a secure encryption key
- Clear any test data
- Build the Docker image
- Start the container
-
Access Capsule:
- Open browser to
http://your-zima-ip:7654 - Create your account and start budgeting!
- Open browser to
Manual Deployment
If you prefer manual setup:
-
Create .env file:
cp .env.example .env -
Generate encryption key:
openssl rand -base64 32 -
Update .env with your key:
ENCRYPTION_KEY=your-generated-key-here -
Build and start:
docker-compose up -d
ZimaOS Integration
Using ZimaOS Apps
If ZimaOS supports custom apps:
- Navigate to Apps section
- Click "Add Custom App"
- Point to this directory
- Configure port: 7654
Using ZimaOS File Manager
- Upload project via web interface or SMB
- SSH into ZimaOS
- Navigate to project directory
- 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
.envfile 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:
- GitHub: https://github.com/nmemmert/budget
- Check logs:
docker-compose logs -f