From 8a6386ca732f49e916c9680cd05dec4256fdff97 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Mon, 1 Apr 2024 18:33:58 +0100 Subject: [PATCH] remove lite package (#1012) --- .github/workflows/push-docker.yml | 36 +----- Dockerfile-lite | 63 ---------- README.md | 3 +- Version-groups.md | 114 ++++++++---------- .../docker-compose-latest-lite-security.yml | 31 ----- .../docker-compose-latest-lite.yml | 30 ----- test.sh | 4 - test2.sh | 3 - 8 files changed, 53 insertions(+), 231 deletions(-) delete mode 100644 Dockerfile-lite delete mode 100644 exampleYmlFiles/docker-compose-latest-lite-security.yml delete mode 100644 exampleYmlFiles/docker-compose-latest-lite.yml diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index 1856d93f..e34f17b2 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -115,38 +115,4 @@ jobs: labels: ${{ steps.meta2.outputs.labels }} build-args: VERSION_TAG=${{ steps.versionNumber.outputs.versionNumber }} - platforms: linux/amd64,linux/arm64/v8 - - - - - name: Generate tags lite - id: meta3 - uses: docker/metadata-action@v4.4.0 - if: github.ref != 'refs/heads/main' - with: - images: | - ${{ secrets.DOCKER_HUB_USERNAME }}/s-pdf - ghcr.io/${{ steps.repoowner.outputs.lowercase }}/s-pdf - tags: | - type=raw,value=${{ steps.versionNumber.outputs.versionNumber }}-lite,enable=${{ github.ref == 'refs/heads/master' }} - type=raw,value=latest-lite,enable=${{ github.ref == 'refs/heads/master' }} - - - - name: Build and push Dockerfile-lite - uses: docker/build-push-action@v4.0.0 - if: github.ref != 'refs/heads/main' - with: - context: . - file: ./Dockerfile-lite - push: true - cache-from: type=gha - cache-to: type=gha,mode=max - tags: ${{ steps.meta3.outputs.tags }} - labels: ${{ steps.meta3.outputs.labels }} - build-args: - VERSION_TAG=${{ steps.versionNumber.outputs.versionNumber }} - platforms: linux/amd64,linux/arm64/v8 - - name: Build and Push Helm Chart - run: | - helm package chart/stirling-pdf - helm push stirling-pdf-chart-1.0.0.tgz oci://registry-1.docker.io/frooodle + platforms: linux/amd64,linux/arm64/v8 \ No newline at end of file diff --git a/Dockerfile-lite b/Dockerfile-lite deleted file mode 100644 index 42786f15..00000000 --- a/Dockerfile-lite +++ /dev/null @@ -1,63 +0,0 @@ -# use alpine -FROM alpine:3.19.1 - -ARG VERSION_TAG - -# Set Environment Variables -ENV DOCKER_ENABLE_SECURITY=false \ - HOME=/home/stirlingpdfuser \ - VERSION_TAG=$VERSION_TAG \ - JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -XX:MaxRAMPercentage=75" \ - PUID=1000 \ - PGID=1000 \ - UMASK=022 - -# Copy necessary files -COPY scripts/download-security-jar.sh /scripts/download-security-jar.sh -COPY scripts/init-without-ocr.sh /scripts/init-without-ocr.sh -COPY pipeline /pipeline -COPY src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto -COPY src/main/resources/static/fonts/*.otf /usr/share/fonts/opentype/noto -COPY build/libs/*.jar app.jar - -RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/apk/repositories && \ - echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/community" | tee -a /etc/apk/repositories && \ - echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" | tee -a /etc/apk/repositories && \ - apk add --no-cache \ - ca-certificates \ - tzdata \ - tini \ - bash \ - curl \ - gcc \ - openjdk17-jre \ - su-exec \ - shadow \ -# Doc conversion - libreoffice@testing \ -# python and pip - python3 && \ - wget https://bootstrap.pypa.io/get-pip.py -qO - | python3 - --break-system-packages --no-cache-dir --upgrade && \ -# uno unoconv and HTML - pip install --break-system-packages --no-cache-dir --upgrade unoconv WeasyPrint && \ -# Set up necessary directories and permissions - mkdir -p /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders && \ -# Set font cache and permissions - fc-cache -f -v && \ - chmod +x /scripts/*.sh && \ -# User permissions - addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ - chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline && \ - chown stirlingpdfuser:stirlingpdfgroup /app.jar - - -# Set environment variables -ENV ENDPOINTS_GROUPS_TO_REMOVE=OpenCV,OCRmyPDF -ENV DOCKER_ENABLE_SECURITY=false - -EXPOSE 8080 - -# Run the application - -ENTRYPOINT ["tini", "--", "/scripts/init-without-ocr.sh"] -CMD ["java", "-Dfile.encoding=UTF-8", "-jar", "/app.jar"] diff --git a/README.md b/README.md index f5833772..fae4875e 100644 --- a/README.md +++ b/README.md @@ -99,11 +99,10 @@ Please view https://github.com/Stirling-Tools/Stirling-PDF/blob/main/LocalRunGui ### Docker / Podman https://hub.docker.com/r/frooodle/s-pdf -Stirling PDF has 3 different versions, a Full version, Lite, and ultra-Lite. Depending on the types of features you use you may want a smaller image to save on space. +Stirling PDF has 2 different versions, a Full version and ultra-Lite version. Depending on the types of features you use you may want a smaller image to save on space. To see what the different versions offer please look at our [version mapping](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/Version-groups.md) For people that don't mind about space optimization just use the latest tag. ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/frooodle/s-pdf/latest?label=Stirling-PDF%20Full) -![Docker Image Size (tag)](https://img.shields.io/docker/image-size/frooodle/s-pdf/latest-lite?label=Stirling-PDF%20Lite) ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/frooodle/s-pdf/latest-ultra-lite?label=Stirling-PDF%20Ultra-Lite) Docker Run diff --git a/Version-groups.md b/Version-groups.md index 5515e16c..8c37e22d 100644 --- a/Version-groups.md +++ b/Version-groups.md @@ -1,64 +1,52 @@ -|Technology | Ultra-Lite | Lite | Full | -|----------------|:----------:|:----:|:----:| -| Java | ✔️ | ✔️ | ✔️ | -| JavaScript | ✔️ | ✔️ | ✔️ | -| Libre | | ✔️ | ✔️ | -| Python | | | ✔️ | -| OpenCV | | | ✔️ | -| OCRmyPDF | | | ✔️ | +| Technology | Ultra-Lite | Full | +|----------------|:----------:|:----:| +| Java | ✔️ | ✔️ | +| JavaScript | ✔️ | ✔️ | +| Libre | | ✔️ | +| Python | | ✔️ | +| OpenCV | | ✔️ | +| OCRmyPDF | | ✔️ | - - - - -Operation | Ultra-Lite | Lite | Full ---------------------|------------|------|----- -add-page-numbers | ✔️ | ✔️ | ✔️ -add-password | ✔️ | ✔️ | ✔️ -add-image | ✔️ | ✔️ | ✔️ -add-watermark | ✔️ | ✔️ | ✔️ -adjust-contrast | ✔️ | ✔️ | ✔️ -auto-split-pdf | ✔️ | ✔️ | ✔️ -auto-redact | ✔️ | ✔️ | ✔️ -auto-rename | ✔️ | ✔️ | ✔️ -cert-sign | ✔️ | ✔️ | ✔️ -crop | ✔️ | ✔️ | ✔️ -change-metadata | ✔️ | ✔️ | ✔️ -change-permissions | ✔️ | ✔️ | ✔️ -compare | ✔️ | ✔️ | ✔️ -extract-page | ✔️ | ✔️ | ✔️ -extract-images | ✔️ | ✔️ | ✔️ -flatten | ✔️ | ✔️ | ✔️ -get-info-on-pdf | ✔️ | ✔️ | ✔️ -img-to-pdf | ✔️ | ✔️ | ✔️ -markdown-to-pdf | ✔️ | ✔️ | ✔️ -merge-pdfs | ✔️ | ✔️ | ✔️ -multi-page-layout | ✔️ | ✔️ | ✔️ -overlay-pdf | ✔️ | ✔️ | ✔️ -pdf-organizer | ✔️ | ✔️ | ✔️ -pdf-to-csv | ✔️ | ✔️ | ✔️ -pdf-to-img | ✔️ | ✔️ | ✔️ -pdf-to-single-page | ✔️ | ✔️ | ✔️ -remove-pages | ✔️ | ✔️ | ✔️ -remove-password | ✔️ | ✔️ | ✔️ -rotate-pdf | ✔️ | ✔️ | ✔️ -sanitize-pdf | ✔️ | ✔️ | ✔️ -scale-pages | ✔️ | ✔️ | ✔️ -sign | ✔️ | ✔️ | ✔️ -show-javascript | ✔️ | ✔️ | ✔️ -split-by-size-or-count | ✔️ | ✔️ | ✔️ -split-pdf-by-sections | ✔️ | ✔️ | ✔️ -split-pdfs | ✔️ | ✔️ | ✔️ -file-to-pdf | | ✔️ | ✔️ -pdf-to-html | | ✔️ | ✔️ -pdf-to-presentation | | ✔️ | ✔️ -pdf-to-text | | ✔️ | ✔️ -pdf-to-word | | ✔️ | ✔️ -pdf-to-xml | | ✔️ | ✔️ -repair | | ✔️ | ✔️ -xlsx-to-pdf | | ✔️ | ✔️ -compress-pdf | | | ✔️ -extract-image-scans | | | ✔️ -ocr-pdf | | | ✔️ -pdf-to-pdfa | | | ✔️ -remove-blanks | | | ✔️ +Operation | Ultra-Lite | Full +-------------------------|------------|----- +add-page-numbers | ✔️ | ✔️ +add-password | ✔️ | ✔️ +add-image | ✔️ | ✔️ +add-watermark | ✔️ | ✔️ +adjust-contrast | ✔️ | ✔️ +auto-split-pdf | ✔️ | ✔️ +auto-redact | ✔️ | ✔️ +auto-rename | ✔️ | ✔️ +cert-sign | ✔️ | ✔️ +crop | ✔️ | ✔️ +change-metadata | ✔️ | ✔️ +change-permissions | ✔️ | ✔️ +compare | ✔️ | ✔️ +extract-page | ✔️ | ✔️ +extract-images | ✔️ | ✔️ +flatten | ✔️ | ✔️ +get-info-on-pdf | ✔️ | ✔️ +img-to-pdf | ✔️ | ✔️ +markdown-to-pdf | ✔️ | ✔️ +merge-pdfs | ✔️ | ✔️ +multi-page-layout | ✔️ | ✔️ +overlay-pdf | ✔️ | ✔️ +pdf-organizer | ✔️ | ✔️ +pdf-to-csv | ✔️ | ✔️ +pdf-to-img | ✔️ | ✔️ +pdf-to-single-page | ✔️ | ✔️ +remove-pages | ✔️ | ✔️ +remove-password | ✔️ | ✔️ +rotate-pdf | ✔️ | ✔️ +sanitize-pdf | ✔️ | ✔️ +scale-pages | ✔️ | ✔️ +sign | ✔️ | ✔️ +show-javascript | ✔️ | ✔️ +split-by-size-or-count | ✔️ | ✔️ +split-pdf-by-sections | ✔️ | ✔️ +split-pdfs | ✔️ | ✔️ +compress-pdf | | ✔️ +extract-image-scans | | ✔️ +ocr-pdf | | ✔️ +pdf-to-pdfa | | ✔️ +remove-blanks | | ✔️ diff --git a/exampleYmlFiles/docker-compose-latest-lite-security.yml b/exampleYmlFiles/docker-compose-latest-lite-security.yml deleted file mode 100644 index 2db1b416..00000000 --- a/exampleYmlFiles/docker-compose-latest-lite-security.yml +++ /dev/null @@ -1,31 +0,0 @@ -version: '3.3' -services: - stirling-pdf: - container_name: Stirling-PDF-Lite-Security - image: frooodle/s-pdf:latest-lite - deploy: - resources: - limits: - memory: 2G - healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -q 'Please sign in'"] - interval: 5s - timeout: 10s - retries: 16 - ports: - - 8080:8080 - volumes: - - /stirling/latest/data:/usr/share/tessdata:rw - - /stirling/latest/config:/configs:rw - - /stirling/latest/logs:/logs:rw - environment: - DOCKER_ENABLE_SECURITY: "true" - SECURITY_ENABLELOGIN: "true" - SYSTEM_DEFAULTLOCALE: en-US - UI_APPNAME: Stirling-PDF-Lite - UI_HOMEDESCRIPTION: Demo site for Stirling-PDF-Lite Latest with Security - UI_APPNAMENAVBAR: Stirling-PDF-Lite Latest - SYSTEM_MAXFILESIZE: "100" - METRICS_ENABLED: "true" - SYSTEM_GOOGLEVISIBILITY: "true" - restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-lite.yml b/exampleYmlFiles/docker-compose-latest-lite.yml deleted file mode 100644 index e40f873d..00000000 --- a/exampleYmlFiles/docker-compose-latest-lite.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: '3.3' -services: - stirling-pdf: - container_name: Stirling-PDF-Lite - image: frooodle/s-pdf:latest-lite - deploy: - resources: - limits: - memory: 2G - healthcheck: - test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -qv 'Please sign in'"] - interval: 5s - timeout: 10s - retries: 16 - ports: - - 8080:8080 - volumes: - - /stirling/latest/config:/configs:rw - - /stirling/latest/logs:/logs:rw - environment: - DOCKER_ENABLE_SECURITY: "false" - SECURITY_ENABLELOGIN: "false" - SYSTEM_DEFAULTLOCALE: en-US - UI_APPNAME: Stirling-PDF-Lite - UI_HOMEDESCRIPTION: Demo site for Stirling-PDF-Lite Latest - UI_APPNAMENAVBAR: Stirling-PDF-Lite Latest - SYSTEM_MAXFILESIZE: "100" - METRICS_ENABLED: "true" - SYSTEM_GOOGLEVISIBILITY: "true" - restart: on-failure:5 diff --git a/test.sh b/test.sh index 205809e9..660aff8c 100644 --- a/test.sh +++ b/test.sh @@ -79,12 +79,10 @@ main() { # Building Docker images docker build --build-arg VERSION_TAG=alpha -t frooodle/s-pdf:latest -f ./Dockerfile . - docker build --build-arg VERSION_TAG=alpha -t frooodle/s-pdf:latest-lite -f ./Dockerfile-lite . docker build --build-arg VERSION_TAG=alpha -t frooodle/s-pdf:latest-ultra-lite -f ./Dockerfile-ultra-lite . # Test each configuration run_tests "Stirling-PDF-Ultra-Lite" "./exampleYmlFiles/docker-compose-latest-ultra-lite.yml" - run_tests "Stirling-PDF-Lite" "./exampleYmlFiles/docker-compose-latest-lite.yml" run_tests "Stirling-PDF" "./exampleYmlFiles/docker-compose-latest.yml" export DOCKER_ENABLE_SECURITY=true @@ -97,12 +95,10 @@ main() { # Building Docker images with security enabled docker build --build-arg VERSION_TAG=alpha -t frooodle/s-pdf:latest -f ./Dockerfile . - docker build --build-arg VERSION_TAG=alpha -t frooodle/s-pdf:latest-lite -f ./Dockerfile-lite . docker build --build-arg VERSION_TAG=alpha -t frooodle/s-pdf:latest-ultra-lite -f ./Dockerfile-ultra-lite . # Test each configuration with security run_tests "Stirling-PDF-Ultra-Lite-Security" "./exampleYmlFiles/docker-compose-latest-ultra-lite-security.yml" - run_tests "Stirling-PDF-Lite-Security" "./exampleYmlFiles/docker-compose-latest-lite-security.yml" run_tests "Stirling-PDF-Security" "./exampleYmlFiles/docker-compose-latest-security.yml" # Report results diff --git a/test2.sh b/test2.sh index d09178cc..84effd12 100644 --- a/test2.sh +++ b/test2.sh @@ -64,9 +64,6 @@ build_and_test() { full) dockerfile_name="./Dockerfile" ;; - lite) - dockerfile_name="./Dockerfile-lite" - ;; ultra-lite) dockerfile_name="./Dockerfile-ultra-lite" ;;