mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-28 09:47:10 +01:00
Compare commits
20 Commits
5.12.28-d
...
5.11.28-d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f897dc3b2d | ||
|
|
98f60d721c | ||
|
|
ea252c7891 | ||
|
|
abeae7fb64 | ||
|
|
fbb4bd29f7 | ||
|
|
7bb84355df | ||
|
|
3509d03cf5 | ||
|
|
3ea9b66fde | ||
|
|
15feba28e5 | ||
|
|
b1ee5a8e98 | ||
|
|
daccb15073 | ||
|
|
5970556335 | ||
|
|
e1cf8751db | ||
|
|
1ef35c361c | ||
|
|
47b370601c | ||
|
|
c72b175630 | ||
|
|
303c34665b | ||
|
|
094762fcc1 | ||
|
|
fac0ae1798 | ||
|
|
8eee7f9a1a |
22
.github/workflows/auto-close-issues.yml
vendored
22
.github/workflows/auto-close-issues.yml
vendored
@@ -1,21 +1,19 @@
|
|||||||
name: Close stale issues after 5 days
|
name: Close stale issues after 5 days
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
# Run this workflow every day at midnight
|
- cron: "0 0 * * *"
|
||||||
- cron: '0 0 * * *'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
close-stale-issues:
|
close-issues:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
steps:
|
steps:
|
||||||
- name: Close stale issues
|
- uses: actions/stale@v10
|
||||||
uses: actions/stale@v7
|
|
||||||
with:
|
with:
|
||||||
|
days-before-issue-stale: 4
|
||||||
|
days-before-issue-close: 1
|
||||||
|
stale-issue-label: "stale"
|
||||||
|
close-issue-message: "This issue has been automatically closed due to inactivity for 5 days."
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-issue-message: "This issue has been automatically closed due to inactivity for 5 days."
|
exempt-issue-labels: "keep-open,triage,bug"
|
||||||
days-before-stale: 4 # Number of days before marking an issue as stale
|
|
||||||
days-before-close: 1 # Number of days after being marked stale before closing
|
|
||||||
stale-label: "stale" # Label to add to stale issues
|
|
||||||
exempt-issue-labels: "keep-open,triage,bug" # Prevents issues with this label from being closed
|
|
||||||
only-issues: true # Only affects issues, not pull requests
|
|
||||||
|
|||||||
87
.github/workflows/build-image-debian.yaml
vendored
87
.github/workflows/build-image-debian.yaml
vendored
@@ -10,27 +10,98 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY_IMAGE: invoiceninja/invoiceninja-debian
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
build:
|
||||||
runs-on: ${{ startsWith(matrix.platforms, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: ["linux/amd64", "linux/arm64"]
|
platform:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
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
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Build
|
- name: Build and push by digest
|
||||||
id: docker_build
|
id: build
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: debian
|
context: debian
|
||||||
load: true
|
platforms: ${{ matrix.platform }}
|
||||||
tags: invoiceninja/invoiceninja-debian:test
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
tags: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
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_TOKEN }}
|
||||||
|
|
||||||
|
- 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 ' *)
|
||||||
|
|||||||
127
.github/workflows/publish-image.yaml
vendored
127
.github/workflows/publish-image.yaml
vendored
@@ -5,27 +5,31 @@ on:
|
|||||||
tags-ignore:
|
tags-ignore:
|
||||||
- "invoiceninja-*"
|
- "invoiceninja-*"
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY_IMAGE: invoiceninja/invoiceninja-debian
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
build:
|
||||||
runs-on: ${{ startsWith(matrix.platforms, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||||
|
outputs:
|
||||||
|
tags: ${{ steps.prep.outputs.tags }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: ["linux/amd64", "linux/arm64"]
|
platform:
|
||||||
include:
|
- linux/amd64
|
||||||
- image: invoiceninja/invoiceninja-debian
|
- linux/arm64
|
||||||
context: debian
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
id: prep
|
id: prep
|
||||||
run: |
|
run: |
|
||||||
DOCKER_IMAGE=${{ matrix.image }}
|
platform=${{ matrix.platform }}
|
||||||
|
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
DOCKER_IMAGE=${{ env.REGISTRY_IMAGE }}
|
||||||
VERSION=edge
|
VERSION=edge
|
||||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
VERSION=${GITHUB_REF#refs/tags/}
|
VERSION=${GITHUB_REF#refs/tags/}
|
||||||
@@ -34,38 +38,115 @@ jobs:
|
|||||||
MAJOR="$(echo "${VERSION}" | cut -d. -f1)"
|
MAJOR="$(echo "${VERSION}" | cut -d. -f1)"
|
||||||
MINOR="$(echo "${VERSION}" | cut -d. -f2)"
|
MINOR="$(echo "${VERSION}" | cut -d. -f2)"
|
||||||
TAGS="$TAGS,${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:${MAJOR}.${MINOR}"
|
TAGS="$TAGS,${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:${MAJOR}.${MINOR}"
|
||||||
|
|
||||||
# Debug output
|
# Debug output
|
||||||
echo "Current version: ${VERSION}"
|
echo "Current version: ${VERSION}"
|
||||||
echo "Version pattern check: $([[ $VERSION =~ ^5\.[0-9]{1,3}\.[0-9]{1,3}$ ]] && echo "matches" || echo "doesn't match")"
|
echo "Version pattern check: $([[ $VERSION =~ ^5\.[0-9]{1,3}\.[0-9]{1,3}$ ]] && echo "matches" || echo "doesn't match")"
|
||||||
|
|
||||||
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
|
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
|
||||||
|
|
||||||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT # Updated output syntax
|
echo "tags=${TAGS}" >> $GITHUB_OUTPUT # Updated output syntax
|
||||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||||
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
|
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Docker meta
|
||||||
id: buildx
|
id: meta
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Set up Docker Buildx
|
||||||
id: docker_build
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build and push by digest
|
||||||
|
id: build
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ${{ matrix.context }}
|
context: debian
|
||||||
build-args: INVOICENINJA_VERSION=${{ steps.prep.outputs.version }}
|
build-args: INVOICENINJA_VERSION=${{ steps.prep.outputs.version }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
platforms: ${{ matrix.platform }}
|
||||||
tags: ${{ steps.prep.outputs.tags }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
tags: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
outputs: type=image,push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
- name: Image digest
|
- name: Export digest
|
||||||
run: echo ${{ steps.docker_build.outputs.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_TOKEN }}
|
||||||
|
|
||||||
|
- 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 }}
|
||||||
|
tags: |
|
||||||
|
${{ needs.build.outputs.tags }}
|
||||||
|
|
||||||
|
- name: Create manifest list and push
|
||||||
|
working-directory: ${{ runner.temp }}/digests
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
|
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
||||||
|
|
||||||
|
- name: Inspect image
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
||||||
|
|
||||||
|
Description:
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- merge
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
sparse-checkout: "README.md"
|
||||||
|
|
||||||
|
- name: Docker Hub Description
|
||||||
|
uses: peter-evans/dockerhub-description@v4
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
repository: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
|||||||
46
debian/docker-compose.yml
vendored
46
debian/docker-compose.yml
vendored
@@ -1,9 +1,3 @@
|
|||||||
x-logging: &default-logging
|
|
||||||
options:
|
|
||||||
max-size: "10m"
|
|
||||||
max-file: "3"
|
|
||||||
driver: json-file
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
@@ -13,20 +7,16 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
volumes:
|
volumes:
|
||||||
- ./.env:/var/www/html/.env
|
|
||||||
# - ./php/php.ini:/usr/local/etc/php/conf.d/invoiceninja.ini:ro
|
# - ./php/php.ini:/usr/local/etc/php/conf.d/invoiceninja.ini:ro
|
||||||
# - ./php/php-fpm.conf:/usr/local/etc/php-fpm.d/invoiceninja.conf:ro
|
# - ./php/php-fpm.conf:/usr/local/etc/php-fpm.d/invoiceninja.conf:ro
|
||||||
# - ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf:ro
|
# - ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf:ro
|
||||||
- app_public:/var/www/html/public
|
- app_public:/var/www/html/public
|
||||||
- app_storage:/var/www/html/storage
|
- app_storage:/var/www/html/storage
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
depends_on:
|
depends_on:
|
||||||
mysql:
|
mysql:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
logging: *default-logging
|
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
@@ -37,18 +27,13 @@ services:
|
|||||||
- ./nginx:/etc/nginx/conf.d:ro
|
- ./nginx:/etc/nginx/conf.d:ro
|
||||||
- app_public:/var/www/html/public:ro
|
- app_public:/var/www/html/public:ro
|
||||||
- app_storage:/var/www/html/storage:ro
|
- app_storage:/var/www/html/storage:ro
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
depends_on:
|
depends_on:
|
||||||
app:
|
app:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
logging: *default-logging
|
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:8
|
image: mysql:8
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
|
||||||
- ./.env
|
|
||||||
environment:
|
environment:
|
||||||
MYSQL_DATABASE: ${DB_DATABASE}
|
MYSQL_DATABASE: ${DB_DATABASE}
|
||||||
MYSQL_USER: ${DB_USERNAME}
|
MYSQL_USER: ${DB_USERNAME}
|
||||||
@@ -56,38 +41,31 @@ services:
|
|||||||
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- mysql_data:/var/lib/mysql
|
- mysql_data:/var/lib/mysql
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-u${MYSQL_USER}", "-p${MYSQL_PASSWORD}" ]
|
test:
|
||||||
interval: 10s
|
[
|
||||||
timeout: 5s
|
"CMD",
|
||||||
retries: 5
|
"mysqladmin",
|
||||||
logging: *default-logging
|
"ping",
|
||||||
|
"-h",
|
||||||
|
"localhost",
|
||||||
|
"-u${MYSQL_USER}",
|
||||||
|
"-p${MYSQL_PASSWORD}",
|
||||||
|
]
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "redis-cli", "ping" ]
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
interval: 10s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
logging: *default-logging
|
|
||||||
|
|
||||||
networks:
|
|
||||||
app-network:
|
|
||||||
driver: bridge
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
app_public:
|
app_public:
|
||||||
driver: local
|
driver: local
|
||||||
app_storage:
|
app_storage:
|
||||||
driver: local
|
driver: local
|
||||||
mysql_data:
|
mysql_data:
|
||||||
driver: local
|
driver: local
|
||||||
redis_data:
|
redis_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user