mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
Compare commits
31 Commits
5.12.28-d3
...
debian
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b599ca5905 | ||
|
|
d222163f82 | ||
|
|
d81eb48e55 | ||
|
|
a7f9ed049c | ||
|
|
aec886c9eb | ||
|
|
84efa573f0 | ||
|
|
849fc2365d | ||
|
|
adfa143861 | ||
|
|
b80e842ad7 | ||
|
|
f8550e7e0d | ||
|
|
f775866abf | ||
|
|
85fad200a0 | ||
|
|
16022da2ac | ||
|
|
40817ae28c | ||
|
|
af5e8d6b4f | ||
|
|
cf822e0de9 | ||
|
|
79dde723bd | ||
|
|
c90298d29c | ||
|
|
b9ba364665 | ||
|
|
77807f94f4 | ||
|
|
854b104915 | ||
|
|
192c59d596 | ||
|
|
fc6d89b9ef | ||
|
|
b572bccd0e | ||
|
|
b9bef3e436 | ||
|
|
475335244f | ||
|
|
0a774f9283 | ||
|
|
d639f649a3 | ||
|
|
b40a60a12d | ||
|
|
e1ed2f0eab | ||
|
|
f9d8cf1fee |
66
.github/workflows/build-image-debian.yaml
vendored
66
.github/workflows/build-image-debian.yaml
vendored
@@ -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 ' *)
|
||||
|
||||
@@ -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 }}
|
||||
@@ -1,11 +1,11 @@
|
||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
|
||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja-debian)
|
||||
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml)
|
||||
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml)
|
||||
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image-debian.yaml)
|
||||
[](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
11
debian/Dockerfile
vendored
@@ -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
1
debian/php/php.ini
vendored
@@ -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
|
||||
|
||||
6
debian/scripts/init.sh
vendored
6
debian/scripts/init.sh
vendored
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user