Compare commits

...

14 Commits

Author SHA1 Message Date
8e9e70e8c5 Remove old grype version within image scan.
Some checks failed
Build startup image / Build-and-release-image (push) Failing after 22s
2025-09-16 10:20:06 +00:00
c9edd5fcb0 Use network mode host to build image.
Some checks failed
Build startup image / Build-and-release-image (push) Failing after 1m48s
2025-05-06 10:21:39 +00:00
f4d6fe6206 Use new registry url for base image.
All checks were successful
Build startup image / Build-and-release-image (push) Successful in 1m47s
2025-05-05 08:24:19 +00:00
57ff78b64a Schedule to 1am and use new build-push action.
Some checks failed
Build startup image / Build-and-release-image (push) Failing after 23s
2025-04-30 08:05:50 +00:00
fc5ed91475 .gitea/workflows/release.yml aktualisiert
All checks were successful
Build startup image / Build-and-release-image (push) Successful in 1m23s
2025-04-01 14:04:15 +02:00
00291d363e Use different output format for pdf. 2025-03-21 12:46:08 +01:00
5cc43ac1c6 Use different output format for pdf. 2025-03-21 12:36:02 +01:00
32f9e2b6c7 Fix directory permission problems with pdf output. 2025-03-21 12:25:07 +01:00
f5f744c5df Use secrets and security scan for workflow. 2025-03-21 12:14:57 +01:00
691b6a5569 Update dependencies and get rid of undefined variables. 2025-03-21 12:12:18 +01:00
2c2ebbd096 index.php aktualisiert 2025-03-21 11:51:21 +01:00
37ea99cf5e Dockerfile aktualisiert 2025-03-21 11:45:39 +01:00
7fd2439b55 index.php aktualisiert 2025-03-21 11:41:22 +01:00
08791678ba index.php aktualisiert 2025-03-21 11:35:31 +01:00
9 changed files with 115 additions and 106 deletions

View File

@@ -3,13 +3,12 @@ name: Build startup image
on:
push:
branches: [ master ]
schedule:
# Run every Sunday at midnight
- cron: '1 0 * * 0'
env:
# Use docker.io for Docker Hub if empty
REGISTRY: cs-registry.ddnss.de
USER: chris
PASS: q',\H(Od:G3).Xv<#!5P
IMAGE: /ri-st/startup
jobs:
Build-and-release-image:
@@ -22,24 +21,62 @@ jobs:
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: '--allow-insecure-entitlement network.host'
driver-opts: network=host
- name: Log into registry
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: https://cs-git.ddnss.de
username: ${{ env.USER }}
password: ${{ env.PASS }}
username: ${{ vars.DOCKERHUB_USER }}
password: ${{ vars.DOCKERHUB_TOKEN }}
- name: Log into CS registry
uses: docker/login-action@v3
with:
registry: ${{ vars.CS_REGISTRY_URL }}
username: ${{ vars.CS_REGISTRY_USER }}
password: ${{ vars.CS_REGISTRY_PASS }}
- name: Log into local registry
uses: docker/login-action@v3
with:
registry: ${{ vars.LOCAL_REGISTRY_URL }}
username: ${{ vars.LOCAL_REGISTRY_USER }}
password: ${{ vars.LOCAL_REGISTRY_PASS }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: cs-git.ddnss.de/ri-st/startup
images: ${{ secrets.REGISTRY_URL }}${{ env.IMAGE }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
env:
ACTIONS_RUNTIME_TOKEN: ''
with:
tags: cs-git.ddnss.de/ri-st/startup:latest
allow: network.host
network: host
tags: ${{ vars.LOCAL_REGISTRY_URL }}${{ env.IMAGE }}:latest
push: true
- name: Scan image
uses: anchore/scan-action@v6
id: scan
with:
image: ${{ vars.LOCAL_REGISTRY_URL }}${{ env.IMAGE }}:latest
fail-build: false
output-format: table
severity-cutoff: critical
registry-username: ${{ vars.LOCAL_REGISTRY_USER }}
registry-password: ${{ vars.LOCAL_REGISTRY_PASS }}
- name: Inspect file
run: cat ${{ steps.scan.outputs.table }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: scan-result
path: ${{ steps.scan.outputs.table }}

View File

@@ -7,13 +7,11 @@ RUN composer install --no-dev --no-scripts --ignore-platform-reqs
RUN composer dumpautoload --optimize
#Use prebuilt image
FROM cs-git.ddnss.de/docker/nginx-fpm-8-4:latest AS final
FROM gitea.fam-steinle.de/docker/nginx-fpm-8-4:latest AS final
WORKDIR /var/www/html
USER root
COPY --from=composer-build /var/www/html /var/www/html
RUN sed -ri -e 's!upload_max_filesize = 2M!upload_max_filesize = 8M!g' /etc/php84/conf.d/custom.ini
USER nobody
VOLUME /var/www/html
USER nobody

View File

@@ -1,6 +1,7 @@
{
"require": {
"phpmailer/phpmailer": "5.2.*",
"tecnickcom/tcpdf": "6.2.12"
}
"phpmailer/phpmailer": "v6.9.*",
"tecnickcom/tcpdf": "6.8.*",
"ext-mysqli": "*"
}
}

107
composer.lock generated
View File

@@ -4,64 +4,58 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6a0769e85a903c4a0fd6971cebefccf7",
"content-hash": "d648791e6ab684ed771b80e8e2a1401b",
"packages": [
{
"name": "phpmailer/phpmailer",
"version": "v5.2.28",
"version": "v6.9.3",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "acba50393dd03da69a50226c139722af8b153b11"
"reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/acba50393dd03da69a50226c139722af8b153b11",
"reference": "acba50393dd03da69a50226c139722af8b153b11",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2f5c94fe7493efc213f643c23b1b1c249d40f47e",
"reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"php": ">=5.0.0"
"ext-filter": "*",
"ext-hash": "*",
"php": ">=5.5.0"
},
"require-dev": {
"doctrine/annotations": "1.2.*",
"jms/serializer": "0.16.*",
"phpdocumentor/phpdocumentor": "2.*",
"phpunit/phpunit": "4.8.*",
"symfony/debug": "2.8.*",
"symfony/filesystem": "2.8.*",
"symfony/translation": "2.8.*",
"symfony/yaml": "2.8.*",
"zendframework/zend-cache": "2.5.1",
"zendframework/zend-config": "2.5.1",
"zendframework/zend-eventmanager": "2.5.1",
"zendframework/zend-filter": "2.5.1",
"zendframework/zend-i18n": "2.5.1",
"zendframework/zend-json": "2.5.1",
"zendframework/zend-math": "2.5.1",
"zendframework/zend-serializer": "2.5.*",
"zendframework/zend-servicemanager": "2.5.*",
"zendframework/zend-stdlib": "2.5.1"
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"doctrine/annotations": "^1.2.6 || ^1.13.3",
"php-parallel-lint/php-console-highlighter": "^1.0.0",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.7.2",
"yoast/phpunit-polyfills": "^1.0.4"
},
"suggest": {
"league/oauth2-google": "Needed for Google XOAUTH2 authentication"
"decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
"ext-openssl": "Needed for secure SMTP sending and DKIM signing",
"greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"psr/log": "For optional PSR-3 debug logging",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication"
},
"type": "library",
"autoload": {
"classmap": [
"class.phpmailer.php",
"class.phpmaileroauth.php",
"class.phpmaileroauthgoogle.php",
"class.smtp.php",
"class.pop3.php",
"extras/EasyPeasyICS.php",
"extras/ntlm_sasl_client.php"
]
"psr-4": {
"PHPMailer\\PHPMailer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1"
"LGPL-2.1-only"
],
"authors": [
{
@@ -83,45 +77,37 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
"source": "https://github.com/PHPMailer/PHPMailer/tree/v5.2.28"
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.3"
},
"funding": [
{
"url": "https://marcus.bointon.com/donations/",
"type": "custom"
},
{
"url": "https://github.com/Synchro",
"type": "github"
},
{
"url": "https://www.patreon.com/marcusbointon",
"type": "patreon"
}
],
"time": "2020-03-19T14:29:37+00:00"
"time": "2024-11-24T18:04:13+00:00"
},
{
"name": "tecnickcom/tcpdf",
"version": "6.2.12",
"version": "6.8.2",
"source": {
"type": "git",
"url": "https://github.com/tecnickcom/TCPDF.git",
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f"
"reference": "f7a781073e1645062f163e058139e2f89355d420"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/2f732eaa91b5665274689b1d40b285a7bacdc37f",
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f",
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/f7a781073e1645062f163e058139e2f89355d420",
"reference": "f7a781073e1645062f163e058139e2f89355d420",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
"ext-curl": "*",
"php": ">=7.1.0"
},
"type": "library",
"autoload": {
"classmap": [
"fonts",
"config",
"include",
"tcpdf.php",
@@ -142,13 +128,13 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPLv3"
"LGPL-3.0-or-later"
],
"authors": [
{
"name": "Nicola Asuni",
"email": "info@tecnick.com",
"homepage": "http://nicolaasuni.tecnick.com"
"role": "lead"
}
],
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
@@ -163,9 +149,16 @@
"qrcode"
],
"support": {
"source": "https://github.com/tecnickcom/TCPDF/tree/6.2.12"
"issues": "https://github.com/tecnickcom/TCPDF/issues",
"source": "https://github.com/tecnickcom/TCPDF/tree/6.8.2"
},
"time": "2015-09-12T10:08:34+00:00"
"funding": [
{
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&currency_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project",
"type": "custom"
}
],
"time": "2025-01-26T14:03:12+00:00"
}
],
"packages-dev": [],
@@ -174,7 +167,9 @@
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform": {
"ext-mysqli": "*"
},
"platform-dev": [],
"plugin-api-version": "2.6.0"
}

View File

@@ -1,5 +1,5 @@
<?php
error_reporting(E_ERROR | E_WARNING);
error_reporting(E_ERROR);
session_start();
if (isset($_SESSION['Firma']['ID']))
{
@@ -7,6 +7,9 @@ if (isset($_SESSION['Firma']['ID']))
define('GUELTIG', $_SESSION['Firma']['A_Bis']);
define('ZAHLBAR', $_SESSION['Firma']['Z_Bis']);
}
include "inc/config.php"; // die Konfigurationsdateien lesen
require_once(__DIR__ . '/vendor/autoload.php');
if (!defined('PREFIX')) {
define('PREFIX', '');
}
@@ -14,8 +17,6 @@ if ('Test' == PREFIX)
{
exit();
}
include "inc/config.php"; // die Konfigurationsdateien lesen
require_once(__DIR__ . '/vendor/autoload.php');
// Verbindung zu MySQL Aufbauen
$db = @new MySQLi(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DATABASE);

View File

@@ -50,7 +50,7 @@ $result = $db->query($sql);
$resultt = $db->query($sqlt);
$_19 = $_19_MwSt = 0;
$_7 = $_7_MwSt = 0;
$_0 = 0;
$_0 = $_0_MwSt = 0;
$Sonst_Preis = $Sonst_MwSt = 0;
$pdf->SetTextColor(00);
@@ -246,10 +246,4 @@ $pdf->Cell(25, 4, number_format(($_19_MwSt + $_7_MwSt + $Sonst_MwSt), '2', ',',
$pdf->SetFont('Helvetica','', 10);
$pdf->Cell(25, 4, number_format(($_19 + $_7 + $_0 + $Sonst_Preis + $_19_MwSt + $_7_MwSt + $Sonst_MwSt), '2', ',', '.')."", 0, 0, 'R');
if(!is_dir(__DIR__ . "/" . PREFIX . "/eur"))
{
mkdir(__DIR__ . "/" . PREFIX . "/eur", 0777, true);
}
$file = __DIR__ . "/" . PREFIX . "/eur/A_" . date('Ymd') . ".pdf";
$pdf->Output($file, "F");
$pdf->Output("A_" . date('Ymd') . ".pdf", "D");

View File

@@ -170,10 +170,4 @@ $pdf->Cell(25, 4, number_format(($_19_MwSt + $_7_MwSt + $Sonst_MwSt), '2', ',',
$pdf->SetFont('Helvetica','', 10);
$pdf->Cell(25, 4, number_format(($_19 + $_7 + $_0 + $Sonst_Preis + $_19_MwSt + $_7_MwSt + $Sonst_MwSt), '2', ',', '.')."", 0, 0, 'R');
if(!is_dir(__DIR__ . "/" . PREFIX . "/eur"))
{
mkdir(__DIR__ . "/" . PREFIX . "/eur", 0777, true);
}
$file = __DIR__ . "/" . PREFIX . "/eur/A_" . date('Ymd') . ".pdf";
$pdf->Output($file, "F");
$pdf->Output("A_" . date('Ymd') . ".pdf", "D");

View File

@@ -152,10 +152,5 @@ $pdf->Cell(25, 4, number_format($ntsum['MwSt'], '2', ',', '.') . " €", 0, 0, '
$pdf->SetFont('Helvetica', '', 10);
$pdf->Cell(25, 4, number_format($ntsum['Gesamt'], '2', ',', '.') . "", 0, 1, 'R');
if(!is_dir(__DIR__ . "/" . PREFIX . "/eur"))
{
mkdir(__DIR__ . "/" . PREFIX . "/eur", 0777, true);
}
$file = __DIR__ . "/" . PREFIX . "/eur/E_" . date('Ymd') . ".pdf";
$pdf->Output($file, "F");
$pdf->Output("E_" . date('Ymd') . ".pdf", "D");

View File

@@ -150,10 +150,4 @@ $pdf->Cell(25, 4, number_format($ntsum['MwSt'], '2', ',', '.') . " €", 0, 0, '
$pdf->SetFont('Helvetica', '', 10);
$pdf->Cell(25, 4, number_format($ntsum['Gesamt'], '2', ',', '.') . "", 0, 1, 'R');
if(!is_dir(__DIR__ . "/" . PREFIX . "/eur"))
{
mkdir(__DIR__ . "/" . PREFIX . "/eur", 0777, true);
}
$file = __DIR__ . "/" . PREFIX . "/eur/E_" . date('Ymd') . ".pdf";
$pdf->Output($file, "F");
$pdf->Output("E_" . date('Ymd') . ".pdf", "D");