From c6648a8511e90b50fa6a0b5eaa00b65b630ec89b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 23 Nov 2024 18:48:09 +1100 Subject: [PATCH 1/2] Updates for tar extraction --- debian/Dockerfile | 2 +- debian/docker-compose.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index c09d74e..43af4b7 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -117,7 +117,7 @@ WORKDIR /var/www/html RUN set -eux; \ DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4) && \ - curl -L "$DOWNLOAD_URL" | tar -xzf - -C /var/www/html --overwrite && \ + curl -L "$DOWNLOAD_URL" | tar --strip-components=1 -xf - -C /var/www/html && \ rm -rf /var/www/html/ui && \ chown -R www-data:www-data /var/www/html diff --git a/debian/docker-compose.yml b/debian/docker-compose.yml index 5f81d59..6d3f918 100644 --- a/debian/docker-compose.yml +++ b/debian/docker-compose.yml @@ -8,7 +8,7 @@ x-logging: &default-logging services: app: - image: invoiceninja/invoiceninja-debian:5.10.55-d + image: invoiceninja/invoiceninja-debian:latest restart: unless-stopped env_file: - ./.env @@ -35,7 +35,7 @@ services: image: nginx:alpine restart: unless-stopped ports: - - "8013:80" + - "80:80" volumes: - ./nginx/conf.d:/etc/nginx/conf.d:ro - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro @@ -112,4 +112,4 @@ volumes: redis_data: driver: local public_files: - driver: local + driver: local \ No newline at end of file From 47b015af7c5168d6cd279323159dd009cca35534 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 23 Nov 2024 19:00:45 +1100 Subject: [PATCH 2/2] More explicity unpacking of .tar file --- debian/Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 43af4b7..946b2ce 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -117,8 +117,14 @@ WORKDIR /var/www/html RUN set -eux; \ DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4) && \ - curl -L "$DOWNLOAD_URL" | tar --strip-components=1 -xf - -C /var/www/html && \ - rm -rf /var/www/html/ui && \ + echo "Downloading from: $DOWNLOAD_URL" && \ + # Download and save the tar + curl -L "$DOWNLOAD_URL" -o /tmp/ninja.tar && \ + # Try extraction + cd /var/www/html && \ + tar --strip-components=1 -xf /tmp/ninja.tar && \ + # List what was extracted + rm -f /tmp/ninja.tar && \ chown -R www-data:www-data /var/www/html # Install dependencies