Add some additional help commands and a help script

no ref

- This should help users with the 'What next?' question at the end of their migration and gives them something to come back to once done
This commit is contained in:
James Loh
2025-07-09 16:46:44 +10:00
parent 87b0b3a556
commit 511a50079f
2 changed files with 79 additions and 9 deletions

48
help Executable file
View File

@@ -0,0 +1,48 @@
#!/usr/bin/env bash
cat << 'EOF'
════════════════════════════════════════════════════════════════════
GHOST DOCKER HELP & COMMANDS
════════════════════════════════════════════════════════════════════
COMMON COMMANDS:
docker compose logs -f ghost # View real-time logs
docker compose logs -f caddy # View Caddy webserver logs
docker compose ps # Check service status
docker compose down # Stop all services
docker compose up -d # Start all services
docker compose restart ghost # Restart Ghost container
TROUBLESHOOTING:
docker compose exec ghost sh # Access Ghost container shell
docker compose logs --tail=100 # View last 100 log lines
docker stats # Monitor resource usage
DATABASE ACCESS:
docker compose exec mysql mysql -u root -p
# Use the DATABASE_ROOT_PASSWORD from your .env file
UPGRADES:
git pull # Pull latest updates
docker compose pull # Get latest container images
docker compose up -d # Upgrade to the latest version
For major upgrades, always:
1. Backup your data first
2. Read Ghost's release notes
3. Test in a staging environment
CONFIGURATION:
- Edit .env file for environment variables
- Restart Ghost after changes: docker compose up -d
USEFUL PATHS:
Content: ./data/ghost/
Database: ./data/mysql/
Logs: docker compose logs
Config: ./.env
MORE HELP:
Ghost Docs: https://ghost.org/docs/
Ghost Community: https://forum.ghost.org/
EOF

View File

@@ -599,22 +599,44 @@ main() {
echo "✓ MIGRATION COMPLETED SUCCESSFULLY!"
echo "════════════════════════════════════════════════════════════"
echo ""
echo "Your Ghost site is now running in Docker."
echo "Original installation files remain at: $current_location"
echo "Your existing MySQL instance is still running at: $mysql_host"
echo "Your Ghost site is now running in Docker!"
echo ""
echo "IMPORTANT INFORMATION:"
echo " • Original files: $current_location"
echo " • Original database: $mysql_database on $mysql_host"
echo " • New content location: ${PWD}/data/ghost/"
echo " • Configuration: ${PWD}/.env"
echo ""
echo "QUICK START COMMANDS:"
echo " View logs: docker compose logs -f ghost"
echo " Check status: docker compose ps"
echo " Stop Ghost: docker compose down"
echo " Start Ghost: docker compose up -d"
echo ""
echo "TROUBLESHOOTING:"
echo " • If site is unreachable, check: docker compose logs caddy"
echo " • For 502 errors, Ghost may still be starting (check logs)"
echo " • Database issues: docker compose logs db"
echo ""
echo "UPGRADES:"
echo " 1. git pull"
echo " 2. docker compose pull"
echo " 3. docker compose up -d"
echo " Always backup before major upgrades!"
echo ""
echo "HELP GUIDE:"
echo " For a comprehensive list of commands and troubleshooting tips:"
echo " ./help"
echo ""
echo "CLEANUP:"
echo "Once you're checked over the migration you can remove the old installation files and database by running:"
echo ""
echo " rm -r $current_location/"
echo " mysql -e 'DROP DATABASE IF EXISTS ${mysql_database}'"
echo " mysql -h$mysql_host -u$mysql_user -p -e 'DROP DATABASE IF EXISTS ${mysql_database}'"
echo ""
echo "This will remove the old Ghost CLI and Ghost 5.x installation"
echo ""
echo "Next steps:"
echo " - Monitor logs: docker compose logs -f ghost"
echo " - View status: docker compose ps"
echo " - Stop services: docker compose down"
echo ""
echo "════════════════════════════════════════════════════════════"
}
# Run main function