Skip to content

Commit fda5d94

Browse files
committed
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
1 parent 19260e2 commit fda5d94

2 files changed

Lines changed: 79 additions & 9 deletions

File tree

help

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
3+
cat << 'EOF'
4+
════════════════════════════════════════════════════════════════════
5+
GHOST DOCKER HELP & COMMANDS
6+
════════════════════════════════════════════════════════════════════
7+
8+
COMMON COMMANDS:
9+
docker compose logs -f ghost # View real-time logs
10+
docker compose logs -f caddy # View Caddy webserver logs
11+
docker compose ps # Check service status
12+
docker compose down # Stop all services
13+
docker compose up -d # Start all services
14+
docker compose restart ghost # Restart Ghost container
15+
16+
TROUBLESHOOTING:
17+
docker compose exec ghost sh # Access Ghost container shell
18+
docker compose logs --tail=100 # View last 100 log lines
19+
docker stats # Monitor resource usage
20+
21+
DATABASE ACCESS:
22+
docker compose exec mysql mysql -u root -p
23+
# Use the DATABASE_ROOT_PASSWORD from your .env file
24+
25+
UPGRADES:
26+
git pull # Pull latest updates
27+
docker compose pull # Get latest container images
28+
docker compose up -d # Upgrade to the latest version
29+
30+
For major upgrades, always:
31+
1. Backup your data first
32+
2. Read Ghost's release notes
33+
3. Test in a staging environment
34+
35+
CONFIGURATION:
36+
- Edit .env file for environment variables
37+
- Restart Ghost after changes: docker compose up -d
38+
39+
USEFUL PATHS:
40+
Content: ./data/ghost/
41+
Database: ./data/mysql/
42+
Logs: docker compose logs
43+
Config: ./.env
44+
45+
MORE HELP:
46+
Ghost Docs: https://ghost.org/docs/
47+
Ghost Community: https://forum.ghost.org/
48+
EOF

scripts/migrate.sh

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -599,22 +599,44 @@ main() {
599599
echo "✓ MIGRATION COMPLETED SUCCESSFULLY!"
600600
echo "════════════════════════════════════════════════════════════"
601601
echo ""
602-
echo "Your Ghost site is now running in Docker."
603-
echo "Original installation files remain at: $current_location"
604-
echo "Your existing MySQL instance is still running at: $mysql_host"
602+
echo "Your Ghost site is now running in Docker!"
605603
echo ""
604+
echo "IMPORTANT INFORMATION:"
605+
echo " • Original files: $current_location"
606+
echo " • Original database: $mysql_database on $mysql_host"
607+
echo " • New content location: ${PWD}/data/ghost/"
608+
echo " • Configuration: ${PWD}/.env"
609+
echo ""
610+
echo "QUICK START COMMANDS:"
611+
echo " View logs: docker compose logs -f ghost"
612+
echo " Check status: docker compose ps"
613+
echo " Stop Ghost: docker compose down"
614+
echo " Start Ghost: docker compose up -d"
615+
echo ""
616+
echo "TROUBLESHOOTING:"
617+
echo " • If site is unreachable, check: docker compose logs caddy"
618+
echo " • For 502 errors, Ghost may still be starting (check logs)"
619+
echo " • Database issues: docker compose logs mysql"
620+
echo ""
621+
echo "UPGRADES:"
622+
echo " 1. git pull"
623+
echo " 2. docker compose pull"
624+
echo " 3. docker compose up -d"
625+
echo " Always backup before major upgrades!"
626+
echo ""
627+
echo "📚 FULL HELP GUIDE:"
628+
echo " For a comprehensive list of commands and troubleshooting tips:"
629+
echo " ./help"
630+
echo ""
631+
echo "CLEANUP (after verifying everything works):"
606632
echo "Once you're checked over the migration you can remove the old installation files and database by running:"
607633
echo ""
608634
echo " rm -r $current_location/"
609-
echo " mysql -e 'DROP DATABASE IF EXISTS ${mysql_database}'"
635+
echo " mysql -h$mysql_host -u$mysql_user -p -e 'DROP DATABASE IF EXISTS ${mysql_database}'"
610636
echo ""
611637
echo "This will remove the old Ghost CLI and Ghost 5.x installation"
612638
echo ""
613-
echo "Next steps:"
614-
echo " - Monitor logs: docker compose logs -f ghost"
615-
echo " - View status: docker compose ps"
616-
echo " - Stop services: docker compose down"
617-
echo ""
639+
echo "════════════════════════════════════════════════════════════"
618640
}
619641

620642
# Run main function

0 commit comments

Comments
 (0)