Compare commits

...

33 Commits

Author SHA1 Message Date
David Bomba
b599ca5905 Merge pull request #845 from Thulium-Drake/fix_init
Ensure that the target folder is present before copying files into it
2025-12-28 09:50:53 +11:00
Jeffrey van Pelt
d222163f82 Fix syntax to match other folders 2025-12-24 13:04:50 +01:00
Jeffrey van Pelt
d81eb48e55 Ensure that the target folder is present before copying files into it 2025-12-20 12:11:55 +01:00
David Bomba
a7f9ed049c Merge pull request #844 from benbrummer/debian
Change mv to cp for public folder update
2025-12-19 22:19:47 +11:00
benbrummer
aec886c9eb Fix rm command to remove all files in public folder
Signed-off-by: benbrummer <info@benjamin-brummer.de>
2025-12-18 16:07:16 +01:00
benbrummer
84efa573f0 Change mv to cp for public folder update
Replaced mv command with cp for copying files to public folder and added cleanup of temporary public files. This is a robust alternative to mv for e.g ZFS and docker overlay2

Signed-off-by: benbrummer <info@benjamin-brummer.de>
2025-12-18 16:00:21 +01:00
David Bomba
849fc2365d Merge pull request #841 from turbo124/debian
Set default memory limit
2025-12-18 09:08:25 +11:00
David Bomba
adfa143861 Set default memory limit 2025-12-18 09:07:30 +11:00
David Bomba
b80e842ad7 Merge pull request #832 from benbrummer/debian
unicode emoji for dockerhub
2025-11-05 09:46:05 +11:00
Benjamin Brummer
f8550e7e0d unicode emoji 2025-11-04 14:08:55 +01:00
David Bomba
f775866abf Merge pull request #831 from turbo124/debian
Fixes for release for debian/octane
2025-11-04 10:00:42 +11:00
David Bomba
85fad200a0 Fixes for release for debian/octane 2025-11-04 09:59:10 +11:00
David Bomba
16022da2ac Merge pull request #829 from benbrummer/debian
url as argument
2025-10-30 06:57:57 +11:00
Benjamin Brummer
40817ae28c move chown to next stage 2025-10-29 14:16:12 +01:00
Benjamin Brummer
af5e8d6b4f remove duplicate line 2025-10-29 13:49:25 +01:00
Benjamin Brummer
cf822e0de9 url as argument 2025-10-29 13:38:29 +01:00
Benjamin Brummer
79dde723bd ADD sets rw only for root 2025-10-29 08:33:47 +01:00
David Bomba
c90298d29c Merge pull request #823 from TheNewSound/patch-2
Update Dockerfile to use ADD for downloading files, instead of RUN curl
2025-10-29 16:28:18 +11:00
David Bomba
b9ba364665 Merge pull request #826 from benbrummer/debian
Fix build workflow
2025-10-29 10:53:15 +11:00
Benjamin Brummer
77807f94f4 cleanup workflow 2025-10-28 15:01:47 +01:00
Benjamin Brummer
854b104915 Update badges 2025-10-28 14:54:05 +01:00
TheNewSound
192c59d596 Remove --chown and rm from Dockerfile
Signed-off-by: TheNewSound <info@worldwidecrap.nl>
2025-10-28 09:01:47 +01:00
Benjamin Brummer
fc6d89b9ef Cleanup 2025-10-28 08:57:58 +01:00
Benjamin Brummer
b572bccd0e no push and merge 2025-10-28 08:44:59 +01:00
Benjamin Brummer
b9bef3e436 update triggers to run for changes in .github 2025-10-28 08:38:06 +01:00
Benjamin Brummer
475335244f Secrets are not available for pull requests from a fork 2025-10-28 08:25:52 +01:00
TheNewSound
0a774f9283 Use --chown in Dockerfile to set permissions
Signed-off-by: TheNewSound <info@worldwidecrap.nl>
2025-10-27 23:35:10 +01:00
TheNewSound
d639f649a3 Modify tar command in Dockerfile
Removed strip-components option from tar command.

Signed-off-by: TheNewSound <info@worldwidecrap.nl>
2025-10-27 16:54:22 +01:00
TheNewSound
b40a60a12d Fix ownership command for invoiceninja tarball
Signed-off-by: TheNewSound <info@worldwidecrap.nl>
2025-10-27 16:48:15 +01:00
TheNewSound
e1ed2f0eab Update Dockerfile
Fix permissions of downloaded tar.gz file via ADD

Signed-off-by: TheNewSound <info@worldwidecrap.nl>
2025-10-27 16:39:04 +01:00
TheNewSound
f9d8cf1fee Update Dockerfile to use ADD for downloading files
Replaced curl command with ADD instruction for downloading Invoice Ninja instead of RUN curl.

Signed-off-by: TheNewSound <info@worldwidecrap.nl>
2025-10-27 13:48:26 +01:00
David Bomba
7ab9653a2a Merge pull request #821 from benbrummer/debian
Correct minor version formatting in publish-image.yaml
2025-10-22 07:49:09 +11:00
benbrummer
82a9c8ae19 Correct minor version formatting in publish-image.yaml
Fix formatting of minor version in image tags.

Signed-off-by: benbrummer <info@benjamin-brummer.de>
2025-10-21 13:56:47 +02:00
6 changed files with 25 additions and 74 deletions

View File

@@ -3,12 +3,12 @@ name: Build Debian Container Image
on:
pull_request:
paths:
- ".github/**"
- "debian/**"
push:
paths:
- ".github/**"
- "debian/**"
branches:
- master
env:
REGISTRY_IMAGE: invoiceninja/invoiceninja-debian
@@ -26,28 +26,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v5
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build and push by digest
- name: Build
id: build
uses: docker/build-push-action@v6
with:
@@ -55,53 +44,6 @@ jobs:
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ env.REGISTRY_IMAGE }}
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
outputs: type=image,push-by-digest=true,name-canonical=true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Export digest
run: |
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build.outputs.digest }}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1
merge:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Download digests
uses: actions/download-artifact@v4
with:
path: ${{ runner.temp }}/digests
pattern: digests-*
merge-multiple: true
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Create manifest list and push (--dry-run)
working-directory: ${{ runner.temp }}/digests
run: |
docker buildx imagetools create --dry-run $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)

View File

@@ -15,6 +15,7 @@ jobs:
version: ${{ steps.version.outputs.version }}
major: ${{ steps.version.outputs.major }}
minor: ${{ steps.version.outputs.minor }}
url: ${{ steps.version.outputs.url }}
steps:
- id: version
run: |
@@ -22,9 +23,12 @@ jobs:
VERSION=edge
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
# Remove -o or -d suffix if present
VERSION=${VERSION%-*}
fi
MAJOR="$(echo "${VERSION}" | cut -d. -f1)"
MINOR="$(echo "${VERSION}" | cut -d. -f2)"
URL=https://github.com/invoiceninja/invoiceninja/releases/download/v${VERSION}/invoiceninja.tar.gz
# Debug output
echo "Current version: ${VERSION}"
@@ -33,6 +37,7 @@ jobs:
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
echo "minor=${MINOR}" >> $GITHUB_OUTPUT
echo "url=${URL}" >> $GITHUB_OUTPUT
build:
runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
@@ -75,7 +80,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: debian
build-args: INVOICENINJA_VERSION=${{ needs.version.outputs.version }}
build-args: URL=${{ needs.version.outputs.url }}
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ env.REGISTRY_IMAGE }}
@@ -127,7 +132,7 @@ jobs:
tags: |
${{ needs.version.outputs.version }}
${{ needs.version.outputs.major }}
${{ needs.version.outputs.major }}${{ needs.version.outputs.minor }}
${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}
latest
- name: Create manifest list and push

View File

@@ -1,11 +1,11 @@
[![Docker Image Size](https://img.shields.io/docker/image-size/invoiceninja/invoiceninja-debian?label=debian)](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
[![Docker Pulls](https://img.shields.io/docker/pulls/invoiceninja/invoiceninja-debian)](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
[![Publish Status](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml)
[![Build Status](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml)
[![Publish Status](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image-debian.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image-debian.yaml)
[![Build Status](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-debian.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-debian.yaml)
# Debian Docker for [Invoice Ninja](https://www.invoiceninja.com/)
:crown: **Features**
👑 **Features**
NGINX webserver support [NGINX](https://nginx.org/)
Built-in Chrome for PDF generation and other features

11
debian/Dockerfile vendored
View File

@@ -2,10 +2,11 @@ ARG PHP=8.4
FROM php:${PHP}-fpm AS prepare-app
USER www-data
ARG URL=https://github.com/invoiceninja/invoiceninja/releases/latest/download/invoiceninja.tar.gz
RUN curl -sL "https://github.com/invoiceninja/invoiceninja/releases/latest/download/invoiceninja.tar.gz" | \
tar -xz -C /var/www/html \
ADD ${URL} /tmp/invoiceninja.tar.gz
RUN tar -xzf /tmp/invoiceninja.tar.gz -C /var/www/html \
&& ln -s /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html \
&& php artisan storage:link \
# Workaround for application updates
@@ -75,8 +76,8 @@ RUN echo "skip-ssl = true" >> /etc/mysql/mariadb.conf.d/50-client.cnf
COPY supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Setup InvoiceNinja
COPY --from=prepare-app /var/www/html /var/www/html
COPY --from=prepare-app /tmp/public /tmp/public
COPY --from=prepare-app --chown=www-data:www-data /var/www/html /var/www/html
COPY --from=prepare-app --chown=www-data:www-data /tmp/public /tmp/public
# Add initialization script
COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh

1
debian/php/php.ini vendored
View File

@@ -2,6 +2,7 @@
; https://www.php.net/manual/en/ini.core.php
post_max_size=10M
upload_max_filesize=10M
memory_limit=512M
[opcache]
; https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended

View File

@@ -10,6 +10,7 @@ fi
if [ "$*" = 'supervisord -c /etc/supervisor/supervisord.conf' ]; then
# Check for required folders and create if needed
[ -d /var/www/html/public] || mkdir -p /var/www/html/public
[ -d /var/www/html/storage/app/public ] || mkdir -p /var/www/html/storage/app/public
[ -d /var/www/html/storage/framework/sessions ] || mkdir -p /var/www/html/storage/framework/sessions
[ -d /var/www/html/storage/framework/views ] || mkdir -p /var/www/html/storage/framework/views
@@ -21,10 +22,11 @@ if [ "$*" = 'supervisord -c /etc/supervisor/supervisord.conf' ]; then
rm -rf /var/www/html/public/.htaccess \
/var/www/html/public/.well-known \
/var/www/html/public/*
mv /tmp/public/* \
cp -r /tmp/public/* \
/tmp/public/.htaccess \
/tmp/public/.well-known \
/var/www/html/public/
/var/www/html/public/ && \
rm -rf /tmp/public/*
fi
echo "Public Folder is up to date"