feat: add Cloudron packaging templates
- 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>
This commit is contained in:
25
Package-Templates/official-wrapper/Dockerfile.template
Normal file
25
Package-Templates/official-wrapper/Dockerfile.template
Normal file
@@ -0,0 +1,25 @@
|
||||
# Cloudron Official Image Wrapper Dockerfile Template
|
||||
|
||||
# This template is for applications with existing official Docker images
|
||||
# It wraps the official image with Cloudron-specific start scripts
|
||||
|
||||
FROM official/app:VERSION
|
||||
|
||||
# Install any Cloudron-specific dependencies (if needed)
|
||||
# RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy start script (make it executable on host first!)
|
||||
COPY start.sh /app/start.sh
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 8080
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:8080/health || exit 1
|
||||
|
||||
# Start application
|
||||
CMD ["/app/start.sh"]
|
||||
Reference in New Issue
Block a user