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
This commit is contained in:
nmemmert committed 2026-01-13 15:47:32 -05:00
1 parent 0b9ab53266
commit ad37bb57ae
8 files changed
+273 -27

No files matched your search

Executable
+60
View File
@@ -0,0 +1,60 @@
#!/bin/bash
# Capsule Budget - ZimaOS Deployment Script
set -e
echo "🚀 Deploying Capsule to ZimaOS..."
echo ""
# Check if .env file exists
if [ ! -f .env ]; then
echo "⚠️ .env file not found!"
echo "Creating .env from .env.example..."
cp .env.example .env
# Generate a secure encryption key
ENCRYPTION_KEY=$(openssl rand -base64 32)
# Update .env with generated key
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
sed -i '' "s/change-this-to-a-secure-random-key/$ENCRYPTION_KEY/" .env
else
# Linux
sed -i "s/change-this-to-a-secure-random-key/$ENCRYPTION_KEY/" .env
fi
echo "✅ Generated secure encryption key"
echo ""
fi
# Clear test data
echo "🧹 Clearing test data..."
rm -rf data/*
echo "✅ Test data cleared"
echo ""
# Build and start containers
echo "🔨 Building Docker image..."
docker-compose build
echo ""
echo "🚀 Starting Capsule..."
docker-compose up -d
echo ""
echo "✅ Deployment complete!"
echo ""
echo "📊 Capsule is running at:"
echo " http://localhost:7654"
echo " http://$(hostname -I | awk '{print $1}'):7654"
echo ""
echo "🔧 Useful commands:"
echo " docker-compose logs -f # View logs"
echo " docker-compose stop # Stop container"
echo " docker-compose restart # Restart container"
echo " docker-compose down # Stop and remove container"
echo ""
echo "💾 Your data is stored in: ./data/"
echo ""