We welcome contributions to the Surge project! This document provides guidelines for contributing.
By participating in this project, you agree to abide by our Code of Conduct:
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Maintain a positive community environment
- Search existing issues first to avoid duplicates
- Use issue templates when available
- Provide detailed information:
- Operating system and version
- Docker/Docker Compose versions
- Configuration details (remove sensitive data)
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs
- Check the roadmap to see if it's already planned
- Open a feature request with:
- Clear description of the feature
- Use case and benefits
- Proposed implementation (if you have ideas)
- Potential drawbacks or considerations
-
Fork the repository
-
Clone your fork:
git clone https://github.com/YOUR-USERNAME/Surge.git cd Surge -
Create a feature branch:
git checkout -b feature/your-feature-name
-
Test your changes:
# Test deployment ./scripts/deploy.sh plex # Test updates ./scripts/update.sh # Test maintenance functions ./scripts/maintenance.sh status
-
Shell scripts: Follow bash best practices
- Use
set -efor error handling - Quote variables properly
- Include error checking
- Add comments for complex logic
- Use
-
Docker Compose:
- Use consistent formatting
- Include proper labels and metadata
- Follow security best practices
- Test with multiple configurations
-
Documentation:
- Update relevant docs for any changes
- Use clear, concise language
- Include examples where helpful
- Test all documented procedures
-
Ensure tests pass:
# Test deployment with different media servers ./scripts/deploy.sh plex ./scripts/deploy.sh jellyfin ./scripts/deploy.sh emby # Test update process ./scripts/update.sh # Test maintenance commands ./scripts/maintenance.sh health
-
Update documentation if needed
-
Create pull request with:
- Clear title and description
- Reference related issues
- List of changes made
- Testing performed
- Screenshots (if UI changes)
-
Address review feedback promptly
When adding a new service to Surge:
-
Research the service:
- Official Docker image availability
- Resource requirements
- Configuration complexity
- Integration capabilities
-
Update Docker Compose:
- Add service definition
- Include proper volumes and networks
- Set appropriate profiles
- Add health checks if available
-
Update configuration:
- Add to
.env.example - Update homepage configuration
- Add service-specific config templates
- Add to
-
Update documentation:
- Add to README service list
- Update quick start guide
- Add troubleshooting section
-
Test thoroughly:
- Fresh deployment
- Service integration
- Update process
- Backup/restore
- Test with current configuration
- Check for breaking changes
- Update documentation if needed
- Test migration path for existing users
- Never commit secrets or credentials
- Use environment variables for configuration
- Follow least privilege principle
- Keep images updated regularly
- Review third-party images for security
- Fresh deployment with Plex
- Fresh deployment with Jellyfin
- Fresh deployment with Emby
- Minimal deployment option
- Update from previous version
- Service restart/reset
- Log viewing functionality
- Backup/restore process
- Permission handling
- Network connectivity between services
We're working on automated testing. Contributions welcome!
-
User Documentation:
- Installation guides
- Configuration examples
- Troubleshooting steps
- Best practices
-
Developer Documentation:
- Architecture overview
- Contributing guidelines
- API documentation
- Testing procedures
- Use clear headings and structure
- Include code examples with proper syntax highlighting
- Add screenshots for UI-related instructions
- Keep it up-to-date with code changes
- Use consistent formatting and style
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and community chat
- Pull Requests: Code review and collaboration
- Check documentation first
- Search existing issues and discussions
- Ask specific questions with relevant details
- Be patient and respectful
Contributors will be recognized in:
- README.md contributors section
- Release notes for significant contributions
- Special thanks for major features
By contributing to Surge, you agree that your contributions will be licensed under the same license as the project (MIT License).
If you have questions about contributing, please:
- Check this document
- Search existing discussions
- Open a new discussion with the "question" label
Thank you for contributing to Surge! 🚀