From 4b77ba4143167795192fd829086ae9b310744f5b Mon Sep 17 00:00:00 2001 From: "dave@tiredofit.ca" Date: Thu, 12 Dec 2024 09:29:06 -0800 Subject: [PATCH] Release 1.1.0 - See CHANGELOG.md --- CHANGELOG.md | 7 +++++++ Dockerfile | 21 ++++++++++++++++++--- install/assets/defaults/30-invoiceninja | 1 + install/etc/cont-init.d/30-invoiceninja | 7 +++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa0371d..dda3244 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.1.0 2024-12-12 + + ### Added + - Add React UI 11.12.2024.1 + - Pin to tiredofit/nginx-php-fpm:8.3-apine-7.7.16 + + ## 1.0.150 2024-12-11 ### Added diff --git a/Dockerfile b/Dockerfile index 0a63a7d..0613828 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,35 @@ -ARG PHP_VERSION=8.2 +ARG PHP_VERSION=8.3 ARG DISTRO="alpine" -FROM docker.io/tiredofit/nginx-php-fpm:${PHP_VERSION}-${DISTRO}-7.7.15 +FROM docker.io/tiredofit/nginx-php-fpm:${PHP_VERSION}-${DISTRO}-7.7.16 LABEL maintainer="Dave Conroy (github.com/tiredofit)" ARG INVOICENINJA_VERSION ENV INVOICENINJA_VERSION=${INVOICENINJA_VERSION:-"v5.11.0"} \ + INVOICENINJA_REACT_VERSION=${INVOICENINJA_REACT_VERSION:-"11.12.2024.1"} \ INVOICENINJA_REPO_URL=https://github.com/invoiceninja/invoiceninja \ + INVOICENINJA_REACT_REPO_URL=https://github.com/invoiceninja/ui \ NGINX_WEBROOT=/www/html \ NGINX_SITE_ENABLED=invoiceninja \ SNAPPDF_EXECUTABLE_PATH=/usr/bin/chromium-browser \ PHP_CREATE_SAMPLE_PHP=FALSE \ + PHP_ENABLE_BCMATH=TRUE \ PHP_ENABLE_CURL=TRUE \ + PHP_ENABLE_CTYPE=TRUE \ PHP_ENABLE_EXIF=TRUE \ PHP_ENABLE_FILEINFO=TRUE \ + PHP_ENABLE_GD=TRUE \ PHP_ENABLE_GMP=TRUE \ PHP_ENABLE_ICONV=TRUE \ PHP_ENABLE_IGBINARY=TRUE \ + PHP_ENABLE_IMAGICK=TRUE \ PHP_ENABLE_IMAP=TRUE \ + PHP_ENABLE_INTL=TRUE \ PHP_ENABLE_MBSTRING=TRUE \ PHP_ENABLE_OPENSSL=TRUE \ PHP_ENABLE_SODIUM=TRUE \ + PHP_ENABLE_XML=TRUE \ PHP_ENABLE_TOKENIZER=TRUE \ PHP_ENABLE_ZIP=TRUE \ PHP_MEMORY_LIMIT=512M \ @@ -46,12 +54,19 @@ RUN source /assets/functions/00-container && \ && \ \ php-ext enable core && \ - clone_git_repo ${INVOICENINJA_REPO_URL} ${INVOICENINJA_VERSION} /assets/install && \ + clone_git_repo "${INVOICENINJA_REPO_URL}" "${INVOICENINJA_VERSION}" /assets/install && \ \ npm install && \ composer install --no-dev --quiet && \ npm run production && \ \ + clone_git_repo "${INVOICENINJA_REACT_REPO_URL}" "${INVOICENINJA_REACT_VERSION}" /usr/src/invoiceninja-react && \ + cd /usr/src/invoiceninja-react && \ + npm install && \ + npm run build && \ + cp -r dist/* /assets/install/public/ && \ + mv /assets/install/public/index.html /assets/install/resources/views/react/index.blade.php && \ + \ chown -R ${NGINX_USER}:${NGINX_GROUP} /assets/install && \ rm -rf \ /assets/install/.env.example \ diff --git a/install/assets/defaults/30-invoiceninja b/install/assets/defaults/30-invoiceninja index f28c635..6faff3c 100755 --- a/install/assets/defaults/30-invoiceninja +++ b/install/assets/defaults/30-invoiceninja @@ -15,6 +15,7 @@ MAIL_FROM_ADDRESS=${MAIL_FROM_ADDRESS:-"noreply@example.com"} MAIL_FROM_NAME=${MAIL_FROM_NAME:-"Invoice Ninja"} MAIL_TYPE=${MAIL_TYPE:-"smtp"} QUEUE_CONNECTION=${QUEUE_CONNECTION:-"database"} +REACT_URL=${REACT_URL:-"http://localhost:3001"} REDIS_HOST=${REDIS_HOST:-"redis"} REDIS_PASS=${REDIS_PASS:-"null"} REDIS_PORT=${REDIS_PORT:-"6379"} diff --git a/install/etc/cont-init.d/30-invoiceninja b/install/etc/cont-init.d/30-invoiceninja index e5de658..8372549 100755 --- a/install/etc/cont-init.d/30-invoiceninja +++ b/install/etc/cont-init.d/30-invoiceninja @@ -98,6 +98,13 @@ if grep -q "^APP_URL=" "${NGINX_WEBROOT}"/.env > /dev/null 2>&1; then else sed -i --follow-symlinks "s|APP_URL=.*|APP_URL=${SITE_URL}|g" "${NGINX_WEBROOT}"/.env fi + if [ -z "${SITE_REACT_URL}" ]; then + if [ -n "${REACT_URL}" ]; then + sed -i --follow-symlinks "s|REACT_URL=.*|REACT_URL=${REACT_URL}|g" "${NGINX_WEBROOT}"/.env + fi + else + sed -i --follow-symlinks "s|REACT_URL=.*|REACT_URL=${SITE_REACT_URL}|g" "${NGINX_WEBROOT}"/.env + fi transform_file_var APP_KEY if [ -n "${APP_KEY}" ]; then sed -i --follow-symlinks "/.*APP_KEY=.*/c\APP_KEY=${APP_KEY}" "${NGINX_WEBROOT}"/.env