From 2cbf38f1e164c1699e56c844fd7bb606427e391d Mon Sep 17 00:00:00 2001 From: Axel Hahn <ax2002@gmx.net> Date: Mon, 1 Jul 2024 22:47:05 +0200 Subject: [PATCH] update docs --- "docs/10_\360\237\244\224_Why.md" | 7 +++-- .../10_init.sh.cfg.md" | 30 ++++++++++++++----- .../30_Apply_changes.md" | 27 +++++++++++++++++ 3 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 "docs/40_\342\232\231\357\270\217_Configuration/30_Apply_changes.md" diff --git "a/docs/10_\360\237\244\224_Why.md" "b/docs/10_\360\237\244\224_Why.md" index 1ccbaa8..0810c73 100644 --- "a/docs/10_\360\237\244\224_Why.md" +++ "b/docs/10_\360\237\244\224_Why.md" @@ -8,12 +8,13 @@ And to dockerfy exsiting projects quick and dirty. Sure copy & paste works, but The init script: -* sets permisssions for container and local user +* sets acl permisssions for container and local user * generates needed files for docker from configuration and a set of templates -* starts/ stops your container +* handles php projects with or without database container +* starts/ stops your container(s) * opens a console * starts php lint # What problems does it not solve? -It is a script for a dual container and Apache + PHP and (optional) Mariadb only. Nothing else. +It is a script for a dual container and Apache + PHP and (optional) Mariadb only for a local LAMP dev environment. Nothing else. diff --git "a/docs/40_\342\232\231\357\270\217_Configuration/10_init.sh.cfg.md" "b/docs/40_\342\232\231\357\270\217_Configuration/10_init.sh.cfg.md" index d2eda11..933f0e2 100644 --- "a/docs/40_\342\232\231\357\270\217_Configuration/10_init.sh.cfg.md" +++ "b/docs/40_\342\232\231\357\270\217_Configuration/10_init.sh.cfg.md" @@ -5,20 +5,33 @@ Its variables will be used by the templates. You can define your own additional ❗**It's a MUST to change this file.** +(1) It is a MUST to change -* APP_NAME +* APP_NAME - the name of your application/ project (lowercase and without spaces) +(2) You SHOULD change the portmappings in -* APP_PORT -* DB_PORT +* APP_PORT - exposed tcp port for apache httpd +(3) +If you use mariadb then set this value to true: + +* DB_ADD=true + +Then the image for myriadb will be enabled in the generated docker compose file. + +* DB_PORT - exposed tcp port for mariadb + +(4) Check needed packages and modules in * APP_APT_PACKAGES +* APP_APACHE_MODULES * APP_PHP_MODULES +(5) You can change versions * APP_PHP_VERSION @@ -31,7 +44,9 @@ You can change versions # # settings for init.sh and base values for replacements in template files # This script is sourced by init.sh ... this file is bash syntax -# +# +# DOCS: https://os-docs.iml.unibe.ch/docker-php-starterkit/Configuration/init.sh.cfg.html +# # ---------------------------------------------------------------------- # 2021-12-17 <axel.hahn@iml.unibe.ch> # ====================================================================== @@ -43,10 +58,11 @@ APP_PORT=8001 APP_APT_PACKAGES="git unzip zip" -#APP_APACHE_MODULES="rewrite" -APP_APACHE_MODULES="" +# headers is needed to set security headers. +# APP_APACHE_MODULES="headers rewrite" +APP_APACHE_MODULES="headers" -APP_PHP_VERSION=8.1 +APP_PHP_VERSION=8.3 # APP_PHP_MODULES="curl pdo_mysql mbstring xml zip xdebug" APP_PHP_MODULES="curl mbstring xml zip xdebug" diff --git "a/docs/40_\342\232\231\357\270\217_Configuration/30_Apply_changes.md" "b/docs/40_\342\232\231\357\270\217_Configuration/30_Apply_changes.md" new file mode 100644 index 0000000..2b0973d --- /dev/null +++ "b/docs/40_\342\232\231\357\270\217_Configuration/30_Apply_changes.md" @@ -0,0 +1,27 @@ +## How to apply changes? + +After changing a config or a template file below docker/templates/ you need to apply the changes. + +### Stop containers + +This step is necessary if your continers are currently running only. + +Start `docker/init.sh` and press `s` +OR `docker/init.sh s q` + +### Generate new config + +Start `docker/init.sh` and press `t` +OR `docker/init.sh t q` + +You see the changes per template and a changed configuration file will be saved. + +### Start containers + +Start `docker/init.sh` and press `u` +OR `docker/init.sh u q` + +!!! info "INFO" + You can `docker/init.sh` and interactively press `s`, then `t` and finally `u`. + Or do it in a single command line with `docker/init.sh s t u q` + -- GitLab