Deployment Guide
Deploy Sociopilots on your own infrastructure. Choose between Docker, Kubernetes, or cloud providers.
Docker Compose (Recommended for Testing)
Quick deployment with Docker Compose. Perfect for testing or small deployments.
1. Clone Repository
git clone https://github.com/CodeWithSakthivel/sociopilots.git cd sociopilots
2. Environment Configuration
cp .env.example .env # Edit .env with your configuration nano .env # Key variables: DATABASE_URL=postgresql://user:password@db:5432/sociopilots REDIS_URL=redis://redis:6379 JWT_SECRET=your-secret-key X_API_KEY=your-x-api-key LINKEDIN_API_KEY=your-linkedin-api-key
3. Start Services
docker compose up -d # Verify services are running docker compose ps # View logs docker compose logs -f app
4. Access Application
Visit http://localhost:3000
Kubernetes (Production Deployments)
Deploy Sociopilots to Kubernetes for horizontal scaling and high availability.
1. Create ConfigMap & Secrets
kubectl create namespace sociopilots kubectl create secret generic sociopilots-secrets \ --from-literal=DATABASE_URL=postgresql://... \ --from-literal=JWT_SECRET=... \ -n sociopilots kubectl create configmap sociopilots-config \ --from-literal=ENVIRONMENT=production \ -n sociopilots
2. Deploy Application
apiVersion: apps/v1
kind: Deployment
metadata:
name: sociopilots-app
namespace: sociopilots
spec:
replicas: 3
selector:
matchLabels:
app: sociopilots
template:
metadata:
labels:
app: sociopilots
spec:
containers:
- name: app
image: codewithsakthivel/sociopilots:latest
ports:
- containerPort: 3000
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: sociopilots-secrets
key: DATABASE_URL
resources:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "1Gi"
cpu: "500m"
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 30
periodSeconds: 103. Expose via Service
apiVersion: v1
kind: Service
metadata:
name: sociopilots-service
namespace: sociopilots
spec:
type: LoadBalancer
selector:
app: sociopilots
ports:
- protocol: TCP
port: 80
targetPort: 30004. Deploy to Cluster
kubectl apply -f deployment.yaml kubectl apply -f service.yaml # Monitor deployment kubectl rollout status deployment/sociopilots-app -n sociopilots # View pods kubectl get pods -n sociopilots
Cloud Platform Deployments
AWS (ECS + RDS)
Deploy to AWS using ECS for container orchestration and RDS for PostgreSQL database.
- ✓Create ECS cluster
- ✓Create RDS PostgreSQL instance
- ✓Push Docker image to ECR
- ✓Create ECS task definition and service
DigitalOcean (App Platform)
Deploy using DigitalOcean's App Platform for simplified container deployment.
- ✓Connect GitHub repository
- ✓Configure environment variables
- ✓Attach PostgreSQL database
- ✓Deploy with one click
Heroku
Deploy to Heroku for the fastest setup. Perfect for small teams.
heroku create your-app-name heroku addons:create heroku-postgresql:standard-0 git push heroku main
Best Practices
🔒 Security
- • Use HTTPS/TLS for all connections
- • Rotate API keys regularly
- • Keep secrets out of version control
- • Use VPC and firewall rules to restrict access
📊 Monitoring
- • Monitor application logs and errors
- • Set up database backups (daily minimum)
- • Track CPU, memory, and disk usage
- • Alert on failed post scheduling
⚡ Performance
- • Use Redis for caching and job queue
- • Scale horizontally for high traffic
- • Implement database connection pooling
- • CDN for static assets
Need Deployment Help?
Deployment can be complex. Our team is here to help with setup, configuration, and troubleshooting.