Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
  • iml-open-source/docker-php-starterkit
1 result
Select Git revision
  • master
1 result
Show changes
Commits on Source (4)
...@@ -31,11 +31,12 @@ ...@@ -31,11 +31,12 @@
# 2024-11-20 v1.24 <axel.hahn@unibe.ch> fix menu with started database less app; apply template permissions on target file; add $WEBURL; remove $frontendurl # 2024-11-20 v1.24 <axel.hahn@unibe.ch> fix menu with started database less app; apply template permissions on target file; add $WEBURL; remove $frontendurl
# 2024-11-20 v1.25 <axel.hahn@unibe.ch> fix menu startup containers # 2024-11-20 v1.25 <axel.hahn@unibe.ch> fix menu startup containers
# 2024-11-21 v1.26 <axel.hahn@unibe.ch> Reset colors in _checkConfig # 2024-11-21 v1.26 <axel.hahn@unibe.ch> Reset colors in _checkConfig
# 2025-05-13 v1.27 <axel.hahn@unibe.ch> handle addition variables config file for non sharable values
# ====================================================================== # ======================================================================
cd "$( dirname "$0" )" || exit 1 cd "$( dirname "$0" )" || exit 1
_version="1.26" _version="1.27"
# init used vars # init used vars
gittarget= gittarget=
...@@ -45,7 +46,7 @@ _self=$( basename "$0" ) ...@@ -45,7 +46,7 @@ _self=$( basename "$0" )
# shellcheck source=/dev/null # shellcheck source=/dev/null
. "${_self}.cfg" || exit 1 . "${_self}.cfg" || exit 1
. "${_self}_not_shared.cfg" 2>/dev/null
# git@git-repo.iml.unibe.ch:iml-open-source/docker-php-starterkit.git # git@git-repo.iml.unibe.ch:iml-open-source/docker-php-starterkit.git
selfgitrepo="docker-php-starterkit.git" selfgitrepo="docker-php-starterkit.git"
...@@ -406,7 +407,9 @@ function _fix_no-db(){ ...@@ -406,7 +407,9 @@ function _fix_no-db(){
# used in _generateFiles # used in _generateFiles
function _getreplaces(){ function _getreplaces(){
# loop over vars to make the replacement # loop over vars to make the replacement
grep "^[a-zA-Z]" "$_self.cfg" | while read -r line for myfile in "${_self}.cfg" "${_self}_not_shared.cfg"
do
grep "^[a-zA-Z]" "${myfile}" | while read -r line
do do
# echo replacement: $line # echo replacement: $line
mykey=$( echo "$line" | cut -f 1 -d '=' ) mykey=$( echo "$line" | cut -f 1 -d '=' )
...@@ -416,6 +419,7 @@ function _getreplaces(){ ...@@ -416,6 +419,7 @@ function _getreplaces(){
echo -e "s#{{$mykey}}#${myvalue}#g" echo -e "s#{{$mykey}}#${myvalue}#g"
done done
done
} }
# loop over all files in templates subdir make replacements and generate # loop over all files in templates subdir make replacements and generate
......
# ======================================================================
#
# senstive configuration not to check in into your git repository
#
# ======================================================================
OIDCCryptoPassphrase=0123456789
OIDCClientSecret='YOUR-SECRET-HERE'
OIDCProviderMetadataURL='https://keycloak.example.com/realms/YOUR-REALM/.well-known/openid-configuration'
# ----------------------------------------------------------------------
...@@ -28,6 +28,7 @@ The initial file structure looks like this: ...@@ -28,6 +28,7 @@ The initial file structure looks like this:
├── docker # Docker data ├── docker # Docker data
│ ├── init.sh << shellscript for initialization │ ├── init.sh << shellscript for initialization
│ ├── init.sh.cfg << config file │ ├── init.sh.cfg << config file
│ ├── init.sh_not_shared.cfg.dist << config file template
│ └── templates << folder with templates │ └── templates << folder with templates
│ ├── docker-compose.yml │ ├── docker-compose.yml
│ ├── dot_env │ ├── dot_env
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* All files in the `docker/templates/` directory will be processed. This also means: you can add as many custom files here as you want - and the will processed too. * All files in the `docker/templates/` directory will be processed. This also means: you can add as many custom files here as you want - and the will processed too.
* in the first line must be a line `# TARGET: [name of target file]` to define the target file. If this line does not exist, then the file will be skipped. * in the first line must be a line `# TARGET: [name of target file]` to define the target file. If this line does not exist, then the file will be skipped.
* Placeholdrs have the syntax variable in double brackets, i.e. `{{VARNAME}}` * Placeholdrs have the syntax variable in double brackets, i.e. `{{VARNAME}}`
* variables to be replaced are those in docker/init.sh.cfg and `{{genrator}}` * variables to be replaced are those in docker/init.sh.cfg and `{{generator}}`
# Templates # Templates
...@@ -147,7 +147,10 @@ and php modules. To override default module settings see template with "extra-p ...@@ -147,7 +147,10 @@ and php modules. To override default module settings see template with "extra-p
FROM php:{{APP_PHP_VERSION}}-apache FROM php:{{APP_PHP_VERSION}}-apache
# install packages # install packages
RUN apt-get update && apt-get install -y {{APP_APT_PACKAGES}} RUN rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/cache/apt/archives/partial
RUN apt-get update
RUN apt-get install -y {{APP_APT_PACKAGES}}
# enable apache modules # enable apache modules
RUN a2enmod {{APP_APACHE_MODULES}} RUN a2enmod {{APP_APACHE_MODULES}}
...@@ -204,7 +207,7 @@ For the security headers in the buttom part the apache module "headers" ist need ...@@ -204,7 +207,7 @@ For the security headers in the buttom part the apache module "headers" ist need
Custom PHP config file for you additional settings. Custom PHP config file for you additional settings.
Showing all warnings and errors is enabled as default. Showing all warnings and errors is enabled as default.
✴️ You **SHOULD** change this to setup Mysql database service for your needs. ✴️ You **SHOULD** change this to correct timezone or define other settings
```ini ```ini
# TARGET: docker/containers/web-server/php/extra-php-config.ini # TARGET: docker/containers/web-server/php/extra-php-config.ini
...@@ -216,6 +219,13 @@ Showing all warnings and errors is enabled as default. ...@@ -216,6 +219,13 @@ Showing all warnings and errors is enabled as default.
error_reporting=E_ALL error_reporting=E_ALL
display_errors=1 display_errors=1
; If you want to catch emails locally in your dev environment
; eg. https://os-docs.iml.unibe.ch/php-emailcatcher/
; sendmail_path = "php {{WEBROOT}}/vendor/emailcatcher/php-sendmail.php"
[Date]
date.timezone = Europe/Zurich
; ---------------------------------------------------------------------- ; ----------------------------------------------------------------------
; XDEBUG STUFF BELOW ; XDEBUG STUFF BELOW
; ---------------------------------------------------------------------- ; ----------------------------------------------------------------------
......