Skip to content

Commit

Permalink
Merge pull request #23 from ecelis/feat/php8.2.23-apache
Browse files Browse the repository at this point in the history
feat/php8.2.23 apache
  • Loading branch information
ecelis authored Sep 9, 2024
2 parents d72830a + dc57ae9 commit 0988ace
Show file tree
Hide file tree
Showing 951 changed files with 52,197 additions and 18,764 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ node_modules
.env
data
.git
.husky
.github
.vscode
.DS_Store
6 changes: 3 additions & 3 deletions .github/workflows/automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: ianseo-automation
on:
push:
tags:
- 'v[0-9]+.[0-9]+.*'
- "v[0-9]+.[0-9]+.*"
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
release:
permissions:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,4 @@ ModelManifest.xml
.env
data
*.zip
local.env
63 changes: 32 additions & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
FROM php:8.0.29-apache
FROM php:8.2.23-apache
# Required dependencies
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
default-libmysqlclient-dev \
libcurl4-openssl-dev \
libmcrypt-dev \
libzip-dev \
libmagick++-dev \
unzip \
mariadb-client \
zlib1g zlib1g-dev \
libpng16-16 libpng-dev \
libonig5 libonig-dev \
&& docker-php-ext-configure gd \
&& docker-php-ext-install gd \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install curl \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install zip
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
default-libmysqlclient-dev \
libcurl4-openssl-dev \
libmcrypt-dev \
libzip-dev \
libmagick++-dev \
unzip \
mariadb-client \
zlib1g zlib1g-dev \
libpng16-16 libpng-dev \
libonig5 libonig-dev \
&& docker-php-ext-configure gd \
&& docker-php-ext-install gd \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install curl \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install intl \
&& docker-php-ext-install zip
RUN /usr/bin/yes '' | /usr/local/bin/pecl install mcrypt-1.0.6
RUN /usr/bin/yes '' | /usr/local/bin/pecl install imagick
RUN apt-get remove \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
default-libmysqlclient-dev \
libcurl4-openssl-dev \
libmcrypt-dev \
libzip-dev \
libmagick++-dev \
zlib1g-dev \
libpng-dev \
libonig-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
default-libmysqlclient-dev \
libcurl4-openssl-dev \
libmcrypt-dev \
libzip-dev \
libmagick++-dev \
zlib1g-dev \
libpng-dev \
libonig-dev \
apt-get clean all \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/* ; \
Expand Down
36 changes: 22 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# I@nseo
# i@nseo

i@nseo is a software for managing archery tournaments results

Expand All @@ -11,26 +11,29 @@ Mine is a fork from Brian Nelson's `brian-nelson/ianseo` repository but
mixed with the official release, since Brian's repository seems
unmaintained.

This fork goal is running I@nseo in Docker.
This fork goal is running i@anseo in Docker containers. Docker setup is
out of scope.

## How to use this image

Docker setup is out of scope.
Copy `sample.env` to `.env` and edit to suit your requirements.

### Docker compose
```
cp sample.env .env`
```

### Run withDocker compose

```
docker compose up -d
```

### Docker step by step
### Run from command line, step by step

First launch a MariaDB container.

```
docker run -d --name ianseodb -e MARIADB_USER=ianseo \
-e MARIADB_DATABASE=ianseo -e MARIADB_PASSWORD=ianseo \
-e MARIADB_ROOT_PASSWORD=ianseo mariadb:10
docker run -d --env-file .env --name ianseodb mariadb:lts
```

Now launch the ianseo container linked to the database container.
Expand All @@ -42,7 +45,7 @@ docker run -d --name ianseo --link ianseodb:mysql -p 8080:80 arqueria/ianseo
Browse to http://127.0.0.1:8080 and follow the instructions to
finish the installation.

⚠️ In the **Step 2: Database connection data** of I@nseo has a default of
⚠️ In the **Step 2: Database connection data** of i@anseo has a default of
`localhost` for Database host, change it for the name of the MariaDB
container, `ianseodb` in the example above.

Expand Down Expand Up @@ -94,28 +97,33 @@ by the `MARIADB_ROOT_PASSWORD` / `MYSQL_ROOT_PASSWORD` variable.
Refer to the MariaDB official repository for deeper information about
variable environments https://hub.docker.com/_/mariadb

## Fetch newer Ianseo releases
## Fetch newer i@nseo releases

```
./bin/fetch <YYYYMMDD>
npm run ianseo:fetch <YYYYMMDD>
```

## Build the docker image

To only build the i@anseo image for the current CPU architechture run:

```
docker build -t arqueria/ianseo .
npm run ianseo:build
```

To build images for both x86_64, aarch64 and arm7, run:

```
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag arqueria/ianseo .
npm run ianseo:build:multi
```

## Relase and Publish images to Docker registries

There are github actions wired to this repository, after mergin a bracnch into `master` you must tag the commit to publish with semantic versioning. Ex: v2022.01.01.1 vYEAR.MONTH.DAY.REVISION. Official I@anseo versioning has integers as REVISION, however docker releases may add an alphabetic charater to the REVISIOn integer to support my own releases linked to official ones.
There are github actions wired to this repository, after mergin a branch into
`main` you must tag the commit to publish with semantic versioning.
Ex: v2022.01.01.1 vYEAR.MONTH.DAY.REVISION. Official I@anseo versioning has
integers as REVISION, however docker releases may add an alphabetic charater to
the REVISION integer to support my own releases linked to official ones.

```
git checkout master
Expand Down
15 changes: 15 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
ianseodb:
image: mariadb:lts
environment:
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
- MARIADB_USER=${MARIADB_USER}
- MARIADB_DATABASE=${MARIADB_DATABASE}
- MARIADB_PASSWORD=${MARIADB_PASSWORD}
ianseo:
# image: ghcr.io/ecelis/ianseo-docker:v2023.04.01.562a
image: arqueria/ianseo
ports:
- "8080:80"
depends_on:
- ianseodb
14 changes: 0 additions & 14 deletions docker-compose.yml

This file was deleted.

4 changes: 4 additions & 0 deletions env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
MARIADB_ROOT_PASSWORD=ianseo
MARIADB_USER=ianseo
MARIADB_DATABASE=ianseo
MARIADB_PASSWORD=ianseo
IANSEO_R_HOST=ianseodb
IANSEO_R_USER=ianseo
IANSEO_R_PASS=verysecret
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"release:minor": "standard-version --release-as minor",
"release:patch": "standard-version --release-as patch",
"release:major": "standard-version --release-as major",
"prepare": "husky install"
"prepare": "husky install",
"ianseo:fetch": "./bin/fetch.sh",
"ianseo:build": "docker build -t arqueria/ianseo .",
"ianseo:build:multi": "docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag arqueria/ianseo ."
},
"repository": {
"type": "git",
Expand All @@ -32,4 +35,4 @@
"@commitlint/cli": "^17.2.0",
"@commitlint/config-conventional": "^17.2.0"
}
}
}
50 changes: 41 additions & 9 deletions src/Accreditation/Accreditation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@
require_once(dirname(dirname(__FILE__)) . '/config.php');
checkACL(AclAccreditation, AclReadWrite);
require_once('Common/Fun_Number.inc.php');
require_once('Common/Fun_Sessions.inc.php');
require_once('Common/Fun_FormatText.inc.php');
require_once(dirname(__FILE__).'/Lib.php');

CheckTourSession(true);

if(($_REQUEST['act']??'')=='reset') {
$_SESSION['chk_Turni']=($_REQUEST['sessions']??[]);
if(!$_SESSION['chk_Turni']) {
// get all the sessions!!!
$_SESSION['chk_Turni'][]='0';
foreach(GetSessions('Q',true) as $s) {
$_SESSION['chk_Turni'][]=$s->SesOrder;
}
}
}

if (!(isset($_SESSION['chk_Turni']) && is_array($_SESSION['chk_Turni']) && isset($_SESSION['AccOp']) && is_numeric($_SESSION['AccOp']))) {
header('Location: index.php');
Expand Down Expand Up @@ -51,7 +62,15 @@
}
CD_redirect('Accreditation.php'.go_get('AccreditateNone', '', true));
}
if(isset($_REQUEST["Command"])) {

if(($_REQUEST['act']??'')=='delete') {
$Sql = "DELETE FROM AccEntries
WHERE AEId=" . intval($_REQUEST['id']??0) . " AND AEOperation=" . StrSafe_DB($_SESSION['AccOp']) . " AND AETournament={$_SESSION['TourId']}";
$Rs=safe_w_sql($Sql);
CD_redirect('Accreditation.php'.go_get(['act'=>0,'id'=>0], true));
}

if(isset($_REQUEST["Command"])) {
if ($_REQUEST['Command']=='Del') {
$Sql
= "DELETE FROM AccEntries "
Expand Down Expand Up @@ -129,7 +148,7 @@
'<script type="text/javascript" src="'.$CFG->ROOT_DIR.'Common/js/Fun_JS.inc.js"></script>',
'<style>.Full {width:100%;box-sizing:border-box;}</style>',
);

$IncludeJquery=true;
include('Common/Templates/head.php');

$Counter = "SELECT
Expand All @@ -147,11 +166,22 @@
<form name="Frm" method="get" action="">
<table class="Tabella">
<tr>
<th colspan="5" class="Title"><?php print $OpDescr;?></th>
<th colspan="6" class="Title"><?php print $OpDescr;?></th>
</tr>
<tr>
<th colspan="6" class="Title"><?php
echo '<span class="mx-2"><input type="checkbox" class="chk_Turni" value="0" onclick="checkSession()" '.(in_array('0', $_SESSION['chk_Turni']) ? 'checked="checked"' : '').'>0</span>';
foreach (GetSessions('Q',true) as $s) {
echo '<span class="mx-2"><input type="checkbox" class="chk_Turni" value="' . $s->SesOrder . '" onclick="checkSession()" onclick="checkSession()" '.(in_array($s->SesOrder, $_SESSION['chk_Turni']) ? 'checked="checked"' : '').'>' . $s->Descr . '</span>';
}



?></th>
</tr>
<tr>
<th width="15%"><?php print get_text('Code','Tournament');?></th>
<th width="42%" colspan="3" class="Center"><?php print get_text('Search','Tournament');?></th>
<th width="42%" colspan="4" class="Center"><?php print get_text('Search','Tournament');?></th>
<th><?php print get_text('Bill','Tournament');?></th>
</tr>
<tr>
Expand All @@ -167,19 +197,21 @@
</td>
<th width="16%"><?php print get_text('FamilyName','Tournament');?></th>
<th width="16%"><?php print get_text('Country');?></th>
<th width="16%"><?php print get_text('Category', 'BackNumbers');?></th>
<td width="10%" class="Center" rowspan="3">
<input type="button" name="Cerca" value="<?php print get_text('Search','Tournament');?>" onClick="javascript:Filtra();"><br><br>
<input type="button" name="TogliFiltro" value="<?php print get_text('CmdRemoveFilter','Tournament');?>" onClick="javascript:ResetFilter();">
</td>
<td class="Center LetteraGrande" rowspan="2"><?php print $StrConto;?></td>
</tr>
<tr>
<td class="Center"><input type="text" name="txt_Cognome" id="txt_Cognome" size="32" value="<?php print (isset($_REQUEST['txt_Cognome']) ? $_REQUEST['txt_Cognome'] : '');?>"></td>
<td class="Center"><input type="text" name="txt_Societa" id="txt_Societa" size="32" value="<?php print (isset($_REQUEST['txt_Societa']) ? $_REQUEST['txt_Societa'] : '');?>"></td>
<td class="Center"><input type="text" name="txt_Cognome" id="txt_Cognome" size="32" value="<?= ($_REQUEST['txt_Cognome'] ?? '') ?>" onchange="checkSession()"></td>
<td class="Center"><input type="text" name="txt_Societa" id="txt_Societa" size="32" value="<?= ($_REQUEST['txt_Societa'] ?? '') ?>" onchange="checkSession()"></td>
<td class="Center"><input type="text" name="txt_Category" id="txt_Category" size="5" value="<?= ($_REQUEST['txt_Category'] ?? '') ?>" onchange="checkSession()"></td>
</tr>
<tr>
<td class="Bold"><input type="checkbox" name="RemoveAcc" id="RemoveAcc" value="1"<?php print (isset($_REQUEST['RemoveAcc']) && $_REQUEST['RemoveAcc']==1 ? ' checked' : '');?>>&nbsp;<?php print get_text('HiddenCredited','Tournament');?></td>
<td><?php
<td class="Bold"><input type="checkbox" name="RemoveAcc" id="RemoveAcc" value="1"<?php print (isset($_REQUEST['RemoveAcc']) && $_REQUEST['RemoveAcc']==1 ? ' checked' : '');?> onclick="checkSession()">&nbsp;<label for="RemoveAcc"><?php print get_text('HiddenCredited','Tournament');?></label></td>
<td colspan="2"><?php
echo get_text('Credited', 'Tournament') . ": " . $MyRowCounter->Presenti . " (" . $MyRowCounter->NonAccreditati . ")<br/>" . get_text('NoAcc', 'Tournament') . ": " . $MyRowCounter->Assenti;
?></td>
<td class="Center">
Expand Down Expand Up @@ -270,7 +302,7 @@
print '</td>';
print '<td class="Center">' . $MyRow->QuSession . '</td>';
print '<td class="Center">' . $MyRow->TargetNo . '</td>';
print '<td>' . $MyRow->EnFirstName . ' ' . $MyRow->EnName . (!is_null($MyRow->AEOperation) ? ' <a class="Link" href="' . $_SERVER['PHP_SELF'] . '?Command=Del&amp;Del=' . $MyRow->EnId . '">[' . $DelAccr . ']</a>':'') . '</td>';
print '<td>' . $MyRow->EnFirstName . ' ' . $MyRow->EnName . (!is_null($MyRow->AEOperation) ? ' <span class="Link" onclick="delAccr(' . $MyRow->EnId . ')">[' . $DelAccr . ']</a>':'') . '</td>';
print '<td>' . $MyRow->CoCode . ' - ' . $MyRow->CoName . '</td>';
print '<td class="Center">' . $MyRow->EnDivision . '</td>';
print '<td class="Center">' . $MyRow->EnClass . '</td>';
Expand Down
Loading

0 comments on commit 0988ace

Please sign in to comment.