From e24e00fccbf38e4d53194407c06182eb0b60990b Mon Sep 17 00:00:00 2001 From: Matthew Horwood Date: Sat, 21 Sep 2024 09:18:58 +0100 Subject: [PATCH] 49/Problem with setup bug: mkdirs for upload paths --- .drone.yml | 159 ------------------------------------------------- buildx.sh | 15 ----- setup/start.sh | 5 ++ 3 files changed, 5 insertions(+), 174 deletions(-) delete mode 100644 .drone.yml delete mode 100755 buildx.sh diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 61de4df..0000000 --- a/.drone.yml +++ /dev/null @@ -1,159 +0,0 @@ ---- -kind: pipeline -type: docker -name: amd64 - -platform: - os: linux - arch: amd64 - -steps: - - name: publish - image: plugins/docker - settings: - repo: mhzawadi/${DRONE_REPO_NAME} - auto_tag: false - tags: - - v1.5.9-amd64 - - latest-amd64 - username: - from_secret: dockerhub_username - password: - from_secret: dockerhub_password - ---- -kind: pipeline -type: docker -name: arm32 - -platform: - os: linux - arch: arm - -clone: - default: - image: plugins/git:linux-arm - depth: 50 - -steps: - - name: publish - image: plugins/docker:linux-arm - settings: - repo: mhzawadi/${DRONE_REPO_NAME} - auto_tag: false - tags: - - v1.5.9-arm - - latest-arm - username: - from_secret: dockerhub_username - password: - from_secret: dockerhub_password - ---- -kind: pipeline -type: docker -name: arm64 - -platform: - os: linux - arch: arm64 -clone: - default: - image: plugins/git:linux-arm64 - depth: 50 - -steps: - - name: publish - image: plugins/dockerlinux-arm64 - settings: - repo: mhzawadi/${DRONE_REPO_NAME} - auto_tag: false - tags: - - v1.5.9-arm64 - - latest-arm64 - username: - from_secret: dockerhub_username - password: - from_secret: dockerhub_password - ---- -kind: pipeline -type: docker -name: manifest - -platform: - os: linux - arch: amd64 - -steps: -- name: manifest - image: plugins/manifest - settings: - username: - from_secret: dockerhub_username - password: - from_secret: dockerhub_password - target: mhzawadi/${DRONE_REPO_NAME}:v1.5.9 - template: mhzawadi/${DRONE_REPO_NAME}:v1.5.9-ARCH - platforms: - - linux/arm - - linux/arm64 - - linux/amd64 -depends_on: - - amd64 - - arm64 - - arm32 - ---- -kind: pipeline -type: docker -name: manifest_latest - -platform: - os: linux - arch: amd64 - -steps: -- name: manifest - image: plugins/manifest - settings: - username: - from_secret: dockerhub_username - password: - from_secret: dockerhub_password - target: mhzawadi/${DRONE_REPO_NAME}:latest - template: mhzawadi/${DRONE_REPO_NAME}:latest-ARCH - platforms: - - linux/arm - - linux/arm64 - - linux/amd64 -depends_on: - - arm64 - - arm32 - ---- -kind: pipeline -type: docker -name: notification - -trigger: - status: - - success - - failure - -platform: - os: linux - arch: amd64 - -steps: - - name: send telegram notification - image: appleboy/drone-telegram - settings: - token: - from_secret: telegram_token - to: - from_secret: telegram_user - -depends_on: - - manifest - - manifest_latest diff --git a/buildx.sh b/buildx.sh deleted file mode 100755 index 7e2722f..0000000 --- a/buildx.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -if [ $# -lt 1 ] -then - echo "this needs a tag please" - exit 1 -else - TAG=$1 -fi - -git checkout master -git pull; -git checkout "${TAG}" -docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 \ - -t mhzawadi/invoiceplane:${TAG} --push . diff --git a/setup/start.sh b/setup/start.sh index 89e5a9c..b38e937 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -33,6 +33,11 @@ if [ -n "$SETUP_COMPLETED" ]; then sed -i -e "s/SETUP_COMPLETED=.*/SETUP_COMPLETED=${SETUP_COMPLETED}/" /var/www/html/ipconfig.php fi +[[ ! -d "/var/www/html/uploads/temp/mpdf/" ]] && mkdir -p "/var/www/html/uploads/temp/mpdf/" +[[ ! -d "/var/www/html/uploads/customer_files/" ]] && mkdir -p "/var/www/html/uploads/customer_files/" +[[ ! -d "/var/www/html/uploads/archive/" ]] && mkdir -p "/var/www/html/uploads/archive/" +[[ ! -d "/var/www/html/application/logs/" ]] && mkdir -p "/var/www/html/application/logs/" + chown nobody:nginx /var/www/html/ipconfig.php; chown -R nobody:nginx /var/www/html/uploads; chown -R nobody:nginx /var/www/html/assets/core/css;