# 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"]
