- Docker Engine (version 20.10.0 or higher)
- Docker Compose (version 2.0.0 or higher)
- Minimum 4GB RAM
- At least 20GB free disk space
- Clone this repo
git clone https://github.com/kusho-co/on-prem.git
- Change directory to
on-prem
. This is needed for next set of steps.
cd on-prem
- Run the setup script. This will install docker if not already present and create environment variables. Please go through this script and add set environment variables before running this.
bash setup-kusho.sh
- Run the start script. It will take a couple of minutes for the services to come up.
bash start-kusho.sh
- Verify all services are healthy. This should show 6 services - backend, frontend, mysql, redis, rq and cron jobs
sudo docker ps
The deployment uses two named volumes:
mysql_data
: Persists MySQL database filesredis_data
: Persists Redis data
To backup these volumes:
docker run --rm -v mysql_data:/source -v $(pwd)/backup:/backup alpine tar czf /backup/mysql_backup.tar.gz -C /source .
docker run --rm -v redis_data:/source -v $(pwd)/backup:/backup alpine tar czf /backup/redis_backup.tar.gz -C /source .
Common issues and solutions:
-
Database Connection Failed
- Verify MySQL service is running:
docker-compose ps db
- Check logs:
docker-compose logs db
- Ensure correct credentials in
.env
file
- Verify MySQL service is running:
-
Redis Connection Issues
- Check Redis logs:
docker-compose logs redis
- Verify network connectivity between services
- Check Redis logs:
-
Worker Not Processing Jobs
- Verify Redis connection
- Check worker logs:
docker-compose logs worker
- Ensure correct environment variables are set
- Change all default passwords in production
- Secure the Redis instance if exposed
- Regular backup of data volumes
- Keep Docker and all images updated
- Monitor service logs for unusual activity