agmission/Others/scripts/deploy
2026-04-22 15:00:02 -04:00
..
agm-deploy.conf.template first commit (copy of Trunk as of April 22 2026) 2026-04-22 15:00:02 -04:00
agm-deploy.sh first commit (copy of Trunk as of April 22 2026) 2026-04-22 15:00:02 -04:00
excludes.txt first commit (copy of Trunk as of April 22 2026) 2026-04-22 15:00:02 -04:00
README.txt first commit (copy of Trunk as of April 22 2026) 2026-04-22 15:00:02 -04:00

Full deployment documentation: trunk/Documents/DEPLOYMENT.md

Configuration Variables:
	AGM_BASE_DIR - Local AgMission directory
	AGN_LIBS_DIR - Local AGN libraries directory
	AGM_DEST_HOST - Remote server (user@hostname)
	AGM_DEST_PORT - SSH port
	AGM_DEST_PATH - Remote destination directory

Command	                  Backend	Frontend	Use Case
.[agm-deploy.sh] 0 branch	Dry-run	Dry-run		Test everything safely
.[agm-deploy.sh] 1 branch	Deploy	Skipped		Backend-only deployment
.[agm-deploy.sh] 2 branch dry-run	Deploy		Dry-run	Deploy backend, test frontend
.[agm-deploy.sh] 2 branch	Deploy	Deploy		Full production deployment

Usage Examples:
	One-time override:
	# Custom base directory
	AGM_BASE_DIR="/projects/AgMission" ./agm-deploy.sh 1 trunk

	# Different AGN libs location
	AGN_LIBS_DIR="/opt/@agn" ./agm-deploy.sh 2 subscription-signup

	# Deploy to staging server
	AGM_DEST_HOST="agm@staging.agnav.com" ./agm-deploy.sh 1 main

	Using configuration file:
	# Create config file
	cp agm-deploy.conf.template ~/.agm-deploy.conf
	nano ~/.agm-deploy.conf

	# Use the config
	source ~/.agm-deploy.conf && ./agm-deploy.sh 1 trunk

	Environment-specific configs:
	# Development
	source ~/.agm-deploy-dev.conf && ./agm-deploy.sh 2 subscription-signup

	# Staging
	source ~/.agm-deploy-staging.conf && ./agm-deploy.sh 1 main

	# Production
	source ~/.agm-deploy-prod.conf && ./agm-deploy.sh 1 trunk

Benefits:
✅ Flexible development environments - Different developers can use different paths
✅ Multi-environment support - Easy switching between dev/staging/prod
✅ CI/CD friendly - Environment variables work well in automation
✅ Backwards compatible - Still works with default paths if no overrides
✅ Clear feedback - Shows exactly which paths are being used
✅ Template provided - Easy to get started with custom configurations

Advanced Usage:
# Deploy from custom location to staging
AGM_BASE_DIR="/backup/AgMission" \
AGM_DEST_HOST="agm@staging.com" \
AGM_DEST_PORT="2222" \
./agm-deploy.sh 2 subscription-signup

# Use alternative AGN libs
AGN_LIBS_DIR="/shared/@agn" ./agm-deploy.sh 1 trunk

Summary:
The script is now much more flexible and can adapt to different development environments and deployment targets without code changes!
This makes the deployment script completely environment-agnostic and suitable for any deployment scenario!