A comprehensive deployment solution for BoostFlow using Ansible and Docker.
ansible-boostflow/
├── README.md # This file
├── DEPLOYMENT_NOTES.md # Deployment configuration notes
├── .env.local # Environment variables (not in repo)
├── .gitignore # Git ignore rules
├── .dockerignore # Docker ignore rules
├── ansible/ # Ansible configuration
│ ├── README.md # Ansible documentation
│ ├── ansible.cfg # Ansible configuration
│ ├── inventories/ # Inventory files
│ │ ├── hosts.yaml # Host definitions
│ │ ├── group_vars/ # Group variables
│ │ │ ├── all.yaml # Global variables
│ │ │ └── azure_hosts.yaml # Azure-specific variables
│ │ └── host_vars/ # Host-specific variables
│ │ └── devops-vm.yaml # VM-specific variables
│ ├── playbooks/ # Ansible playbooks
│ │ ├── site.yaml # Main playbook
│ │ ├── deploy_docker.yaml # Docker deployment
│ │ ├── docker.yaml # Docker installation
│ │ ├── install_kubernetes.yaml # Kubernetes setup
│ │ ├── install_nginx.yaml # Nginx installation
│ │ ├── nextjs.yaml # Next.js deployment
│ │ └── nodejs.yaml # Node.js setup
│ └── templates/ # Jinja2 templates
│ ├── nextjs.service.j2 # Systemd service template
│ ├── nginx.https.j2 # HTTPS Nginx config
│ ├── nginx.nextjs.j2 # Next.js Nginx config
│ └── nginx.react.j2 # React Nginx config
└── docker/ # Docker configuration
├── README.md # Docker documentation
├── Dockerfile # Multi-stage build
├── docker-compose.yaml # Docker Compose config
├── nginx/ # Nginx configuration
│ ├── nginx.conf # Main Nginx config
│ └── default.conf # Server block config
└── scripts/ # Container scripts
└── start.sh # Startup script
- Ansible installed on your local machine
- Docker and Docker Compose on target servers
- SSH access to target servers
- SSH key for GitHub access
.env.localfile with your environment variables
-
Clone this repository:
git clone <repository-url> cd ansible-boostflow
-
Create your
.env.localfile:cp .env.example .env.local # Edit .env.local with your actual values -
Configure your inventory:
# Edit ansible/inventories/hosts.yaml # Update IP addresses, SSH keys, etc.
Deploys BoostFlow using Docker containers with combined Nginx + Next.js container and separate MinIO container.
cd ansible
ansible-playbook -i inventories/hosts.yaml playbooks/deploy_docker.yamlFeatures:
- Combined Nginx + Next.js container for efficiency
- Separate MinIO container for object storage
- Health checks and monitoring
- Automatic SSL support (when configured)
- Easy scaling and management
Installs services directly on the host system.
cd ansible
ansible-playbook -i inventories/hosts.yaml playbooks/site.yamlFeatures:
- Direct installation on host
- Systemd service management
- Traditional Nginx configuration
- Full system integration
Sets up Kubernetes cluster and deploys BoostFlow.
cd ansible
ansible-playbook -i inventories/hosts.yaml playbooks/install_kubernetes.yaml
# Then use the kubernetes-boostflow project for deploymentEdit ansible/inventories/group_vars/all.yaml:
app_name: "Boostflow"
app_repo: "git@github.com:Kdim67/BoostFlow.git"
app_port: 3000
branch: "main"
ssl_enabled: false # Set to true for HTTPSEdit ansible/inventories/host_vars/devops-vm.yaml:
ssl_enabled: true # Override global settingCreate .env.local with your configuration:
# Database
DATABASE_URL=your_database_url
# Authentication
NEXTAUTH_SECRET=your_secret
NEXTAUTH_URL=http://localhost:3000
# MinIO
MINIO_ACCESS_KEY=your_access_key
MINIO_SECRET_KEY=your_secret_key
# Other services
GOOGLE_MAPS_API_KEY=your_api_keyThe new Docker setup uses a two-container architecture:
- Base: nginx:alpine with Node.js installed
- Services: Nginx (port 80/443) + Next.js (port 3000)
- Features: Reverse proxy, static file serving, health checks
- Startup: Custom script manages both services
- Base: minio/minio:latest
- Services: MinIO server (port 9000) + Console (port 9001)
- Features: S3-compatible storage, web console
- Storage: Persistent Docker volume
# Check application health
curl http://your-server/health
# Check MinIO health
curl http://your-server:9000/minio/health/live
# View container status
docker-compose -f docker/docker-compose.yaml ps# View all logs
docker-compose -f docker/docker-compose.yaml logs -f
# View specific service logs
docker-compose -f docker/docker-compose.yaml logs -f app
docker-compose -f docker/docker-compose.yaml logs -f minio# Update application
cd ansible
ansible-playbook -i inventories/hosts.yaml playbooks/deploy_docker.yaml
# Or manually
docker-compose -f docker/docker-compose.yaml pull
docker-compose -f docker/docker-compose.yaml up -d- Environment Variables: Never commit
.env.localto version control - SSH Keys: Use dedicated SSH keys for deployment
- SSL/TLS: Enable SSL for production deployments
- Firewall: Configure appropriate firewall rules
- Updates: Keep Docker images and system packages updated
- Port Conflicts: Ensure ports 80, 443, 9000, 9001 are available
- Permission Issues: Check file permissions and ownership
- Network Issues: Verify Docker network configuration
- SSL Issues: Check certificate validity and configuration
# Check Ansible connectivity
ansible -i ansible/inventories/hosts.yaml all -m ping
# Test Docker Compose configuration
docker-compose -f docker/docker-compose.yaml config
# Access container shell
docker exec -it boostflow-app sh
# View Nginx configuration
docker exec boostflow-app nginx -t- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
[Your License Here]
For issues and questions:
- Check the troubleshooting section
- Review logs for error messages
- Open an issue on GitHub
- Contact the development team