Compare commits

...

10 Commits

Author SHA1 Message Date
c7e32fc63b .gitea/workflows/release.yml aktualisiert
All checks were successful
Build svj-website image / Build-and-release-image (push) Successful in 3m39s
2025-04-01 14:27:59 +02:00
caf8ba3c4e Cleanup workflow file. 2025-03-18 11:56:00 +01:00
c1bc3e0bc8 Use gitea registry. 2025-03-18 11:54:51 +01:00
a4631b7ec0 Remove warnings in template. 2024-03-28 12:10:25 +01:00
3c8392a2df Use secure connection for fussball.de widget. 2024-03-03 09:03:54 +01:00
e229ba789e Add gitignore. 2024-03-03 09:01:00 +01:00
9a4644a5d9 Remove native-ttf as it is not working. 2024-02-13 17:00:28 +01:00
98ee8550b1 Install docker zip and gd. 2024-02-07 20:15:37 +01:00
a0b8b2f446 Minor fixes for new environment. 2024-02-07 14:47:21 +01:00
7b67aaedd8 Change to debian buster. 2024-02-07 14:21:17 +01:00
8 changed files with 100 additions and 23 deletions

View File

@@ -33,6 +33,7 @@ if ($environment === false)
}
define('ENVIRONMENT', $environment);
define('SCHEME', 'https');
if (isset($_SERVER['HTTPS']))
{

View File

@@ -11,7 +11,7 @@ if (ENVIRONMENT === 'local')
}
elseif (ENVIRONMENT === 'production')
{
$svjf['editorUrl'] = $vC['portal']['arrHost']['scheme'] . '://rist-editors.ri-st.de/';
$svjf['editorUrl'] = $vC['portal']['arrHost']['scheme'] . '://editors.ri-st.de/';
$svjf['editorVersion'] = '1.0.5';
}
$svjf['webserviceUrl'] = $vC['portal']['hostUrl'] . '/webservices/remote_data.php';

View File

@@ -1,19 +0,0 @@
kind: pipeline
name: default
steps:
- name: build container
image: plugins/docker
settings:
dockerfile: Dockerfile
username:
from_secret: registry-username
password:
from_secret: registry-password
registry: https://cs-registry.ddnss.de
repo: cs-registry.ddnss.de/${DRONE_REPO_OWNER}/website
dry_run: false
purge: true
insecure: false
tags:
- ${DRONE_TAG}

View File

@@ -0,0 +1,78 @@
name: Build svj-website image
on:
push:
branches: [ master ]
schedule:
# Run every Sunday at midnight
- cron: '0 0 * * 0'
env:
IMAGE: /svj/website
jobs:
Build-and-release-image:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
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: ${{ secrets.REGISTRY_URL }}${{ env.IMAGE }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
env:
ACTIONS_RUNTIME_TOKEN: ''
with:
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 }}
grype-version: 'v0.90.0'
- 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 }}

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/media/
/.idea

View File

@@ -1,5 +1,17 @@
FROM php:7.2-apache-stretch
FROM php:7.2-apache-buster
RUN docker-php-ext-install mysqli
RUN apt-get update -y && apt-get install -y libwebp-dev libjpeg62-turbo-dev libpng-dev libxpm-dev libfreetype6-dev zlib1g-dev libzip-dev
RUN docker-php-ext-install zip
RUN docker-php-ext-configure gd --with-gd --with-webp-dir --with-jpeg-dir \
--with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir
RUN docker-php-ext-install gd
VOLUME /var/www/html/media
COPY . /var/www/html
COPY . /var/www/html
RUN chown -R www-data:www-data /var/www/html

View File

@@ -5,6 +5,9 @@ $subline = '';
$text = '';
foreach($this->_data as $pagePart)
{
if (!isset($pagePart['type'])) {
continue;
}
switch ( $pagePart['type'])
{
case 'headline' :

View File

@@ -14,7 +14,7 @@
?>
<div class="grid_5col"></div>
<div id="meinWettbewerb" class="grid_30col"></div>
<script type="text/javascript" src="http://www.fussball.de/export.widget.js/-/schluessel/<?php echo $this -> _data[ 'schluessel' ]; ?>"></script>
<script type="text/javascript" src="https://www.fussball.de/export.widget.js/-/schluessel/<?php echo $this -> _data[ 'schluessel' ]; ?>"></script>
<script type="text/javascript">
var wettbewerb1 = new fussballdeAPI();
wettbewerb1.setzeWettbewerb('<?php echo $this -> _data[ 'wettbewerb' ]; ?>');