Sign inSign up

naif775devops/agro19portal.com

By naif775devops

Updated about 14 hours ago

Image
0

2.0K

naif775devops/agro19portal.com repository overview

🌾 AGRO-ERP — Enterprise Agricultural & Production Management Portal

Docker Image Version PHP Laravel Livewire MySQL Redis License

AGRO-ERP is a full-featured, cloud-native Enterprise Resource Planning (ERP) platform purpose-built for agricultural processing, olive & seed oil pressing, raw material inventory, batch costing, supplier pricing matrices, and export management.


🌟 Key Highlights & Capabilities

  • Bilingual Core (العربية & English): Native RTL and LTR support with localized numeric formatting (tabular-nums), currency converters, and dynamic locale switching.
  • Modern Adaptive UI: Engineered with a warm neutral light palette (#F9F8F6) and deep slate dark mode, responsive collapsible icon-rail navigation, and mobile slide-over drawers.
  • Oil Production & Yield Tracking: Real-time batch pressing, acidity analysis, waste tolerance controls, and pressing yield calculators.
  • Supplier & Pricing Matrices: Supplier material pricing links, minimum orders, automated invoice calculations, and currency conversion.
  • Enterprise Asynchronous Infrastructure:
    • Laravel Horizon: Scalable Redis queue worker daemon for background tasks.
    • Laravel Reverb: Real-time WebSocket event broadcasting on port 8080.
    • Laravel Scheduler: Automated background maintenance and alerts runner.
    • High-Performance Nginx: Micro-cached static asset delivery with gzip compression.

🐳 Docker Hub Published Images & Tags

Official Docker Hub Repository: naif775devops/agro19portal.com

Image RoleTagDescriptionSize
Backend & Workersv1.0.0 / 1.0.0Recommended Production Release. PHP 8.3 FPM, Composer, Livewire runtime.~257 MB
Backend (Latest)latest / app-latestRolling latest build of the backend container.~257 MB
Web Server (Nginx)web-v1.0.0Production Nginx Alpine with pre-compiled Vite JS/CSS assets baked in.~64 MB
Web Server (Latest)web-latestRolling latest build of the Nginx web container.~64 MB

🚀 Instant Production Deployment Guide

Deploying AGRO-ERP on any VPS, cloud instance, or on-premise Docker server takes less than 2 minutes using the provided docker-compose-prod.yml.

Step 1: Create Project Directory
mkdir -p /opt/agro-erp && cd /opt/agro-erp
Step 2: Download docker-compose-prod.yml
curl -fsSL https://raw.githubusercontent.com/naif-saleh/agro-erp/develop/docker-compose-prod.yml -o docker-compose-prod.yml
Step 3: Create .env Production Environment File

Create a .env file in the same directory:

cat << 'EOF' > .env
APP_NAME=AGRO-ERP
APP_ENV=production
APP_KEY=base64:KbnNDxbijxbhBS1NHElZKKRlPkrvcKL0AWxJwHsyKQI=
APP_DEBUG=false
APP_URL=http://your-domain-or-ip

APP_LOCALE=ar
APP_FALLBACK_LOCALE=en

# Database Configuration
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=agro_erp
DB_USERNAME=agro_user
DB_PASSWORD=YourStrongDatabasePassword123!
DB_FORWARD_PORT=3307

# Redis Configuration
REDIS_CLIENT=predis
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379
REDIS_FORWARD_PORT=6380
CACHE_STORE=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=database

# WebSockets (Laravel Reverb)
BROADCAST_CONNECTION=reverb
REVERB_APP_ID=669658
REVERB_APP_KEY=m1sdy0kbkj1wxqbdourd
REVERB_APP_SECRET=i94xl6nochsadfxfmlng
REVERB_HOST=0.0.0.0
REVERB_PORT=8080
REVERB_SCHEME=http

# Port Bindings
APP_PORT=80
EOF

Tip

Generate a new unique `APP_KEY` if desired by executing: `docker run --rm naif775devops/agro19portal.com:v1.0.0 php artisan key:generate --show`

Step 4: Launch Containers
docker compose -f docker-compose-prod.yml up -d

Check the health status of running services:

docker compose -f docker-compose-prod.yml ps

All 6 services will initialize automatically:

  • agro_app: PHP-FPM core application engine
  • agro_web: Nginx reverse proxy serving port 80
  • agro_db: MySQL 8.0 database engine (healthy with ping checks)
  • agro_redis: Redis 7.0 in-memory cache & queues
  • agro_worker: Laravel Horizon background queue daemon
  • agro_scheduler: Background cron task runner
  • agro_reverb: High-throughput WebSocket server on port 8080

🔑 Default Administrator Credentials

Upon first startup, the database migrations and seeders execute automatically:

  • Portal URL: http://<YOUR_SERVER_IP>
  • Email: [email protected]
  • Password: password
  • Language: English / العربية (switchable from top navigation bar)

Important

Change the default admin password immediately upon first login under **Settings > Users**.

🛠️ Operational Maintenance Commands

View Logs
# View all services in real-time
docker compose -f docker-compose-prod.yml logs -f

# View application errors specifically
docker compose -f docker-compose-prod.yml logs -f app
Run Artisan Commands
# Clear & rebuild application caches
docker exec -it agro_app php artisan optimize:clear
docker exec -it agro_app php artisan optimize

# Run database migrations manually
docker exec -it agro_app php artisan migrate --force

# Access Laravel Tinker shell
docker exec -it agro_app php artisan tinker
Database Backup & Restore
# Backup MySQL database
docker exec agro_db mysqldump -u agro_user -pYourStrongDatabasePassword123! agro_erp > backup_$(date +%F).sql

# Restore MySQL database
docker exec -i agro_db mysql -u agro_user -pYourStrongDatabasePassword123! agro_erp < backup_file.sql

🏗️ Multi-Service Architecture Overview

graph TD
    Client[Browser / Mobile Client] -->|Port 80 HTTP| Web[agro_web / Nginx Alpine]
    Client -->|Port 8080 WS| Reverb[agro_reverb / WebSockets]
    Web -->|FastCGI 9000| App[agro_app / PHP 8.3-FPM]
    App --> DB[(agro_db / MySQL 8.0)]
    App --> Redis[(agro_redis / Redis 7)]
    Worker[agro_worker / Horizon] --> Redis
    Worker --> DB
    Scheduler[agro_scheduler / Cron] --> App

🛡️ Security & Hardening Checklist

  1. Firewall: Expose only port 80 and 443 (HTTP/HTTPS) and 8080 (WebSockets) publicly. Keep 3307 and 6380 closed or bound to 127.0.0.1.
  2. HTTPS / SSL: Use Cloudflare, Traefik, or Certbot reverse proxy in front of agro_web to terminate SSL certificates.
  3. Environment Security: Ensure APP_DEBUG=false in production .env.
  4. Volume Persistence: MySQL data (db-data), Redis data (redis-data), and user documents (storage-data) are stored in named Docker volumes and will never be lost across container restarts or image upgrades.

📄 License & Maintainer

Maintained by Naif Saleh (naif775devops). Repository: naif-saleh/agro-erp

Tag summary

Content type

Image

Digest

sha256:9a0eeb2b4

Size

321.8 MB

Last updated

about 14 hours ago

docker pull naif775devops/agro19portal.com