FROM cloudron/base:__CLOUDRON_BASE__ # Metadata labels (edit as needed) LABEL org.opencontainers.image.title="__APP_TITLE__" LABEL org.opencontainers.image.description="Cloudron package for __APP_TITLE__" LABEL org.opencontainers.image.source="https://example.com" # Install OS dependencies here as needed # RUN apt-get update && apt-get install -y --no-install-recommends \ # curl ca-certificates tini \ # && rm -rf /var/lib/apt/lists/* # App code lives in /app/code (read-only at runtime) WORKDIR /app/code # Copy application code (adjust as needed) # COPY . /app/code # Create persistent directory for application data RUN mkdir -p /app/data && chown -R cloudron:cloudron /app/data # Copy startup script COPY start.sh /app/pkg/start.sh RUN chmod +x /app/pkg/start.sh && chown cloudron:cloudron /app/pkg/start.sh USER cloudron # Expose the app port specified in manifest EXPOSE __HTTP_PORT__ # Default environment (customize per app) ENV NODE_ENV=production \ APP_PORT=__HTTP_PORT__ HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ CMD curl -fsS http://127.0.0.1:${APP_PORT}/ || exit 1 CMD ["/app/pkg/start.sh"]