{"id":29132131,"url":"https://github.com/psudocode/ghost-docker-dev","last_synced_at":"2026-04-12T00:07:34.904Z","repository":{"id":301789149,"uuid":"1010308224","full_name":"psudocode/ghost-docker-dev","owner":"psudocode","description":"🐳 Complete Docker-based development environment for Ghost theme development with hot-reload mounting, helper scripts, and SQLite browser","archived":false,"fork":false,"pushed_at":"2025-06-28T20:03:22.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-28T21:20:08.813Z","etag":null,"topics":["blogging","development-environment","docker","docker-compose","ghost","nodejs","sqlite","theme-development"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psudocode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-28T19:45:36.000Z","updated_at":"2025-06-28T20:03:25.000Z","dependencies_parsed_at":"2025-06-28T21:20:20.427Z","dependency_job_id":null,"html_url":"https://github.com/psudocode/ghost-docker-dev","commit_stats":null,"previous_names":["psudocode/ghost-docker-dev"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/psudocode/ghost-docker-dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psudocode%2Fghost-docker-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psudocode%2Fghost-docker-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psudocode%2Fghost-docker-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psudocode%2Fghost-docker-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psudocode","download_url":"https://codeload.github.com/psudocode/ghost-docker-dev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psudocode%2Fghost-docker-dev/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262720750,"owners_count":23353462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blogging","development-environment","docker","docker-compose","ghost","nodejs","sqlite","theme-development"],"created_at":"2025-06-30T06:16:21.923Z","updated_at":"2025-10-29T00:46:17.482Z","avatar_url":"https://github.com/psudocode.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ghost Development Environment with Docker\n\nA complete Docker-based development environment for Ghost theme development. This setup provides a containerized Ghost instance with easy theme mounting, database management, and development tools.\n\n## 🚀 Features\n\n- **Docker Compose Setup**: Easy one-command Ghost deployment\n- **Theme Development**: Hot-reload theme mounting for development\n- **SQLite Database**: Lightweight database perfect for development\n- **Environment Variables**: Flexible configuration via `.env` file\n- **Development Tools**: Optional SQLite browser for database inspection\n- **Helper Scripts**: Convenient bash script for common operations\n- **Health Checks**: Built-in container health monitoring\n\n## 📋 Prerequisites\n\n- [Docker](https://docs.docker.com/get-docker/)\n- [Docker Compose](https://docs.docker.com/compose/install/)\n- Git\n\n## 🏗️ Quick Start\n\n### 1. Download or Clone\n\nDownload this repository or clone it to your local machine:\n\n```bash\n# If using git\ngit clone \u003crepository-url\u003e\ncd ghost-docker-dev\n\n# Or download and extract the ZIP file\n# Then navigate to the extracted directory\ncd ghost-docker-dev\n```\n\n### 2. Quick Setup (Recommended)\n\n```bash\n# Interactive setup - configures everything for you\n./setup.sh\n```\n\n### 3. Manual Setup (Alternative)\n\n```bash\n# Copy the example environment file\ncp .env.example .env\n\n# Edit the configuration (optional)\nnano .env\n\n# Start Ghost\n./ghost-dev.sh start\n```\n\n### 4. Access Ghost\n\n- **Frontend**: http://localhost:3001\n- **Admin Panel**: http://localhost:3001/ghost\n- **SQLite Browser** (optional): http://localhost:8080\n\n### 5. Initial Setup\n\n1. Go to http://localhost:3001/ghost\n2. Create your admin account\n3. Complete the Ghost setup wizard\n\n## 🎨 Theme Development\n\n### Method 1: Mount Existing Theme\n\n1. **Edit `.env` file**:\n\n   ```env\n   THEME_NAME=my-awesome-theme\n   THEME_PATH=/path/to/your/theme/directory\n   ```\n\n2. **Uncomment the volume mount** in `docker-compose.yml`:\n\n   ```yaml\n   volumes:\n     - ghost_content:/var/lib/ghost/content\n     - ${THEME_PATH}:/var/lib/ghost/content/themes/${THEME_NAME} # Uncomment this line\n     - ./logs:/var/lib/ghost/logs\n   ```\n\n3. **Restart Ghost**:\n   ```bash\n   ./ghost-dev.sh restart\n   ```\n\n### Method 2: Upload Theme via Admin\n\n1. Create a ZIP file of your theme\n2. Go to Admin → Design → Change Theme\n3. Upload your theme ZIP file\n4. Activate the theme\n\n### Development Workflow\n\n```bash\n# Make changes to your theme files\n# Then restart Ghost to see changes\n./ghost-dev.sh restart\n\n# Watch logs for debugging\n./ghost-dev.sh logs\n\n# Check status\n./ghost-dev.sh status\n```\n\n## 🛠️ Helper Script Commands\n\nThe `ghost-dev.sh` script provides convenient shortcuts:\n\n```bash\n./ghost-dev.sh start       # Start Ghost development environment\n./ghost-dev.sh stop        # Stop Ghost\n./ghost-dev.sh restart     # Restart Ghost (after theme changes)\n./ghost-dev.sh logs        # Show Ghost logs\n./ghost-dev.sh status      # Check Ghost status\n./ghost-dev.sh env         # Check environment configuration\n./ghost-dev.sh open        # Open Ghost frontend in browser\n./ghost-dev.sh admin       # Open Ghost admin panel in browser\n./ghost-dev.sh clean       # Clean restart (removes containers, keeps data)\n./ghost-dev.sh reset       # Reset everything (WARNING: destroys all data)\n./ghost-dev.sh help        # Show help message\n```\n\n## ⚙️ Configuration\n\n### Environment Variables\n\n| Variable              | Default                 | Description             |\n| --------------------- | ----------------------- | ----------------------- |\n| `GHOST_PORT`          | `3001`                  | Port for Ghost frontend |\n| `GHOST_URL`           | `http://localhost:3001` | Ghost URL               |\n| `NODE_ENV`            | `development`           | Node environment        |\n| `THEME_NAME`          | `your-theme-name`       | Theme directory name    |\n| `THEME_PATH`          | `/path/to/your/theme`   | Path to theme directory |\n| `DATABASE_CLIENT`     | `sqlite3`               | Database client         |\n| `LOG_LEVEL`           | `info`                  | Logging level           |\n| `SQLITE_BROWSER_PORT` | `8080`                  | SQLite browser port     |\n\n### Advanced Configuration\n\nFor production use or advanced features, you can uncomment and configure additional variables in `.env`:\n\n```env\n# Email Configuration\nGHOST_MAIL_TRANSPORT=SMTP\nGHOST_MAIL_FROM=noreply@yourdomain.com\nGHOST_MAIL_HOST=smtp.gmail.com\nGHOST_MAIL_PORT=587\nGHOST_MAIL_USERNAME=your-email@gmail.com\nGHOST_MAIL_PASSWORD=your-app-password\n\n# Social Media\nGHOST_TWITTER=@yourusername\nGHOST_FACEBOOK=your-facebook-page\n```\n\n## 🗄️ Database Management\n\n### SQLite Browser (Development Tool)\n\nStart with the SQLite browser for database inspection:\n\n```bash\n# Start all services including SQLite browser\ndocker-compose --profile tools up -d\n\n# Access at http://localhost:8080\n```\n\n### Backup and Restore\n\n```bash\n# Backup Ghost data\ndocker-compose exec ghost tar -czf /tmp/ghost-backup.tar.gz -C /var/lib/ghost/content .\ndocker cp ghost-dev:/tmp/ghost-backup.tar.gz ./backup-$(date +%Y%m%d).tar.gz\n\n# Restore Ghost data (be careful!)\ndocker cp ./backup-20231215.tar.gz ghost-dev:/tmp/\ndocker-compose exec ghost tar -xzf /tmp/backup-20231215.tar.gz -C /var/lib/ghost/content\n```\n\n## � Demo Content\n\n### Dummy Posts Import\n\nThe `dummy-posts/` directory contains a sample Ghost export file that can be imported to quickly populate your development site with demo content:\n\n```\ndummy-posts/\n└── ghost-demo-content.json    # Sample Ghost export file for demo content\n```\n\n**To import demo content:**\n\n1. Start your Ghost development environment\n2. Go to the Ghost Admin panel: http://localhost:3001/ghost\n3. Navigate to **Settings** → **Labs** → **Import content**\n4. Upload the `dummy-posts/ghost-demo-content.json` file\n5. The demo posts, pages, and settings will be imported\n\nThis is especially useful for:\n- Testing themes with sample content\n- Demonstrating site functionality\n- Quick development setup with realistic data\n\n## �📁 Project Structure\n\n```\nghost-docker-dev/\n├── docker-compose.yml      # Docker Compose configuration\n├── .env.example           # Environment variables template\n├── .env                   # Your environment variables (create from .env.example)\n├── .gitignore            # Git ignore file\n├── ghost-dev.sh          # Helper script for development\n├── setup.sh              # Interactive setup script\n├── validate-setup.sh     # Docker setup validation script\n├── dummy-posts/          # Demo content for import\n│   └── ghost-demo-content.json\n├── README.md             # This file\n├── LICENSE               # MIT License\n├── CONTRIBUTING.md       # Contribution guidelines\n└── logs/                 # Ghost logs (auto-created)\n```\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n**Theme not appearing:**\n\n- Check that your theme path is correct in `.env`\n- Ensure `package.json` exists in your theme directory\n- Restart Ghost: `./ghost-dev.sh restart`\n\n**Permission issues:**\n\n```bash\n# Fix file permissions\nsudo chown -R $USER:$USER /path/to/your/theme\n```\n\n**Port conflicts:**\n\n```bash\n# Change port in .env file\nGHOST_PORT=3002\n```\n\n**Database issues:**\n\n```bash\n# Reset everything (WARNING: destroys all data)\n./ghost-dev.sh reset\n```\n\n### Logs and Debugging\n\n```bash\n# View Ghost logs\n./ghost-dev.sh logs\n\n# Check container status\ndocker-compose ps\n\n# Inspect container\ndocker-compose exec ghost sh\n```\n\n## 📚 Useful Links\n\n- [Ghost Documentation](https://ghost.org/docs/)\n- [Ghost Theme Development](https://ghost.org/docs/themes/)\n- [Ghost Handlebars Helpers](https://ghost.org/docs/themes/helpers/)\n- [Ghost Admin API](https://ghost.org/docs/admin-api/)\n- [Docker Compose Documentation](https://docs.docker.com/compose/)\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit issues and pull requests to improve this Docker Ghost development environment.\n\n1. Fork or download the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## ⭐ Acknowledgments\n\n- Ghost team for the amazing blogging platform\n- Docker community for containerization tools\n- Contributors and theme developers\n\n---\n\n**Happy Ghost Theme Development!** 🎉\n\nIf you find this setup useful, please consider sharing it with others!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsudocode%2Fghost-docker-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsudocode%2Fghost-docker-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsudocode%2Fghost-docker-dev/lists"}