Overview
Docker Compose provides the simplest way to deploy FigoRisk. All services are defined in a single configuration file and can be started with one command.Recommended for: Development, testing, small to medium production deployments
Deployment Package Structure
Quick Deployment
1
Download Package
Download and extract the deployment package:
2
Configure Environment
Copy the template and edit configuration:Required variables:See Configuration Guide for all options.
3
Run Deployment Script
Execute the automated deployment:The script will:
- ✅ Pull latest Docker images
- ✅ Start all services
- ✅ Run health checks
- ✅ Display access information
4
Verify Deployment
Check all services are running:Expected output:
5
Access Application
Open your browser to: http://localhostDefault login:
- Username:
admin - Password: Value from
SUPER_ADMIN_PASSWORD
Manual Deployment
If you prefer manual control over the deployment process:1. Configure Environment
2. Create Directories
3. Pull Images
- Backend API
- Frontend application
- MongoDB database
- Nginx reverse proxy
4. Start Services
-d flag runs services in detached mode (background).
5. Monitor Startup
Watch the logs during startup:Ctrl+C to stop following logs.
6. Verify Health
Service Configuration
docker-compose.yml
The deployment uses this service architecture:Service Details
- Backend
- Frontend
- Database
- Nginx
Image:
Technology: NestJS (Node.js)
Internal Port: 3000
Health Check:
glendyxfigorisk/figorisk-core:latestTechnology: NestJS (Node.js)
Internal Port: 3000
Health Check:
/health endpointKey Features:- RESTful API
- JWT authentication
- Role-based access control
- MongoDB integration
- AWS S3 integration (optional)
Management Commands
Starting & Stopping
Viewing Logs
Checking Status
Updating
Data Persistence
MongoDB Data
Data is stored in a Docker volume:Upload Files
User-uploaded files are stored in./uploads:
Scaling Services
Horizontal Scaling
Scale specific services:Vertical Scaling
Adjust resource limits indocker-compose.yml:
Security Best Practices
Change Default Passwords
Change Default Passwords
Network Isolation
Network Isolation
Services communicate via internal Docker network. Only nginx exposes ports externally.
Enable HTTPS
Enable HTTPS
- Obtain SSL certificate
- Place in
ssl/directory:
- Update nginx configuration for SSL
- Restart:
docker-compose restart nginx
Regular Updates
Regular Updates
Troubleshooting
Container won't start
Container won't start
Check logs:Common causes:
- Port already in use
- Missing environment variables
- Insufficient resources
Database connection errors
Database connection errors
Verify MongoDB is running:Test connection:
502 Bad Gateway
502 Bad Gateway
Check backend health:Restart services:
Disk space issues
Disk space issues
Clean up unused resources:
Performance Tuning
MongoDB Optimization
Backend Optimization
Nginx Caching
Already configured innginx.conf:
- Static assets cached for 1 year
- API responses not cached
- Compression enabled
Next Steps
Configuration Options
Explore all environment variables
Troubleshooting Guide
Common issues and solutions
Backup & Restore
Data backup strategies
Monitoring
Set up monitoring and alerts