- Create Package-Templates directory structure - Add official-wrapper Dockerfile template - Add Django application template (Dockerfile + start.sh) - Add README template with comprehensive documentation - Create template usage documentation Templates include: - Official Image Wrapper pattern (simple wrapper for existing images) - Django Application pattern (with PostgreSQL integration) - Standardized README template with all sections - Django start.sh with database wait, migrations, admin creation - Template documentation and usage instructions Benefits: - Accelerates packaging for similar applications - Ensures consistency across packages - Reduces repetitive work - Documents Cloudron best practices - Reference for future packaging Template patterns covered: - Official image wrapper - Django application with PostgreSQL - Database wait logic - Migration execution - Admin user creation - Health check implementation - Environment variable configuration 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush <crush@charm.land>
143 lines
3.5 KiB
Markdown
143 lines
3.5 KiB
Markdown
# <APP_NAME> Cloudron Package
|
|
|
|
## Description
|
|
|
|
<Brief description of application and its purpose>
|
|
|
|
## Features
|
|
|
|
### Core Capabilities
|
|
- **Feature 1**: Description
|
|
- **Feature 2**: Description
|
|
- **Feature 3**: Description
|
|
|
|
### Application Features
|
|
- **Feature A**: Description with details
|
|
- **Feature B**: Description with details
|
|
- **Feature C**: Description with details
|
|
|
|
## Configuration
|
|
|
|
### Environment Variables
|
|
|
|
#### Application Configuration
|
|
- `CONFIG_VAR_1`: Description (default: value1)
|
|
- `CONFIG_VAR_2`: Description (default: value2)
|
|
|
|
### Ports
|
|
- **8080**: Main HTTP port (description)
|
|
|
|
### Addons
|
|
- **PostgreSQL**: Required for database storage
|
|
- **Localstorage**: Used for file storage
|
|
- **Redis**: Optional caching
|
|
|
|
## Usage
|
|
|
|
### 1. Initial Setup
|
|
|
|
1. Open <APP_NAME>
|
|
2. Create admin account (if applicable)
|
|
3. Configure system settings
|
|
4. Verify application is running
|
|
|
|
### 2. Basic Usage
|
|
|
|
**Step 1**: Do something
|
|
1. Navigate to section
|
|
2. Click button
|
|
3. Configure settings
|
|
4. Save
|
|
|
|
**Step 2**: Do something else
|
|
1. Use feature
|
|
2. Configure options
|
|
3. Test functionality
|
|
|
|
### 3. Configuration
|
|
|
|
```bash
|
|
# Example configuration
|
|
CONFIG_VAR_1=value1
|
|
CONFIG_VAR_2=value2
|
|
```
|
|
|
|
### 4. API Usage (if applicable)
|
|
|
|
```bash
|
|
# Example API call
|
|
curl -X POST http://localhost:8080/api/endpoint \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"key": "value"}'
|
|
```
|
|
|
|
## Architecture
|
|
|
|
```
|
|
┌─────────────┐
|
|
│ Client │
|
|
│ (Browser) │
|
|
└──────┬──────┘
|
|
│
|
|
HTTP Request
|
|
▼
|
|
┌──────────────┐
|
|
│ <APP_NAME> │
|
|
│ (<TYPE>) │
|
|
│ Application │
|
|
└──────┬──────┘
|
|
│
|
|
┌────────────┼────────────┐
|
|
│ │ │
|
|
▼ ▼ ▼
|
|
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
│ Database │ │ Storage │ │ Cache │
|
|
│ (PostgreSQL│ │ (Local │ │ (Redis) │
|
|
│ │ │ storage) │ │ │
|
|
└──────────┘ └──────────┘ └──────────┘
|
|
```
|
|
|
|
## Security
|
|
|
|
### Authentication
|
|
- User management
|
|
- Role-based access control (if applicable)
|
|
- Session management
|
|
- API token authentication (if applicable)
|
|
|
|
### Data Protection
|
|
- <Security feature 1>
|
|
- <Security feature 2>
|
|
- <Security feature 3>
|
|
|
|
## Troubleshooting
|
|
|
|
### Issue 1
|
|
**Problem**: Description
|
|
**Solution**: Steps to resolve
|
|
**Check**: Verify by doing X
|
|
|
|
### Issue 2
|
|
**Problem**: Description
|
|
**Solution**: Steps to resolve
|
|
**Check**: Verify by doing Y
|
|
|
|
## Documentation
|
|
|
|
For more information:
|
|
- [Official Website](https://example.com)
|
|
- [GitHub Repository](https://github.com/example/app)
|
|
- [Documentation](https://docs.example.com)
|
|
|
|
## Support
|
|
|
|
For issues and questions:
|
|
- [GitHub Issues](https://github.com/example/app/issues)
|
|
- [Discord Server](https://discord.gg/example)
|
|
- [Forum](https://forum.example.com)
|
|
|
|
## Upstream
|
|
|
|
[GitHub Repository](https://github.com/example/app)
|
|
[Official Website](https://example.com)
|