From 0e6185d1ca0967a43c0adeda96ba5bf0443a4e09 Mon Sep 17 00:00:00 2001 From: Josh Sokol Date: Tue, 19 May 2026 16:07:28 -0500 Subject: [PATCH 1/5] minimal: migrate entrypoint to config.sample.php Copy config.sample.php into config.php before the existing sed substitutions, and gate config writing + DB setup + mail settings behind an opt-in trigger (any SIMPLERISK_DB_* env var or DB_SETUP). When the operator provides no DB env vars, config.php is left absent so the SimpleRisk web installer takes over. Also remove the SIMPLERISK_INSTALLED toggle (define no longer exists upstream) and the version=testing URL-uncomment block (its target defines are gone from the new template). --- simplerisk-minimal/common/entrypoint.sh | 58 +++++++++++++++++-------- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/simplerisk-minimal/common/entrypoint.sh b/simplerisk-minimal/common/entrypoint.sh index b8ff0ff..d4dea7b 100644 --- a/simplerisk-minimal/common/entrypoint.sh +++ b/simplerisk-minimal/common/entrypoint.sh @@ -53,6 +53,12 @@ validate_db_setup(){ set_config(){ CONFIG_PATH='/var/www/simplerisk/includes/config.php' + CONFIG_SAMPLE_PATH='/var/www/simplerisk/includes/config.sample.php' + + # Copy the sample config into place. The new SimpleRisk release ships + # config.sample.php; the entrypoint creates config.php from it before + # substituting env-var-driven values. + cp "$CONFIG_SAMPLE_PATH" "$CONFIG_PATH" # Replacing config variables if they exist SIMPLERISK_DB_HOSTNAME=${SIMPLERISK_DB_HOSTNAME:-localhost} && exec_cmd "sed -i \"s/\('DB_HOSTNAME', '\).*\(');\)/\1$SIMPLERISK_DB_HOSTNAME\2/g\" $CONFIG_PATH" @@ -70,15 +76,6 @@ set_config(){ # shellcheck disable=SC2015 [ -n "${SIMPLERISK_DB_SSL_CERT_PATH:-}" ] && sed -i "s/\('DB_SSL_CERTIFICATE_PATH', '\).*\(');\)/\1$SIMPLERISK_DB_SSL_CERT_PATH\2/g" $CONFIG_PATH || true - - # If DB_SETUP is not set, update the SIMPLERISK_INSTALLED value to true - # shellcheck disable=SC2015 - [ -z "${DB_SETUP:-}" ] && exec_cmd "sed -i \"s/\('SIMPLERISK_INSTALLED', \)'false'/\1'true'/g\" $CONFIG_PATH" || true - - # Testing related operations - if [ "$version" = "testing" ]; then - exec_cmd "sed -i \"s|//\(define('.*_URL\)|\1|g\" $CONFIG_PATH" - fi } set_csrf_secret(){ @@ -253,9 +250,6 @@ EOSQL" "Was not able to apply settings on database. Check error above. Exiting." print_log "initial_setup:info" "Removing schema file..." exec_cmd "rm ${SCHEMA_FILE}" - # Update the SIMPLERISK_INSTALLED value - exec_cmd "sed -i \"s/\('SIMPLERISK_INSTALLED', \)'false'/\1'true'/g\" $CONFIG_PATH" - # Create admin user if ADMIN_USERNAME is provided (optional, non-fatal) if [ -n "${ADMIN_USERNAME:-}" ]; then exec_cmd_nobail "php /docker/configure-admin.php" || print_log "initial_setup:warn" "Admin user creation failed; check output above" @@ -299,21 +293,47 @@ unset_variables() { } _main() { - validate_db_setup - set_config + # Detect whether the operator has opted into Docker-managed config + # provisioning. If no DB env vars are set, leave config.php absent so + # SimpleRisk's web installer runs on first request. + local docker_managed_config=false + if [ -n "${DB_SETUP:-}" ] \ + || [ -n "${SIMPLERISK_DB_HOSTNAME:-}" ] \ + || [ -n "${SIMPLERISK_DB_PORT:-}" ] \ + || [ -n "${SIMPLERISK_DB_USERNAME:-}" ] \ + || [ -n "${SIMPLERISK_DB_PASSWORD:-}" ] \ + || [ -n "${SIMPLERISK_DB_DATABASE:-}" ] \ + || [ -n "${SIMPLERISK_DB_FOR_SESSIONS:-}" ] \ + || [ -n "${SIMPLERISK_DB_SSL_CERT_PATH:-}" ]; then + docker_managed_config=true + fi + + if [ "$docker_managed_config" = true ]; then + validate_db_setup + set_config + else + print_log "initial_setup:info" "No DB env vars provided; config.php will not be written. The SimpleRisk web installer will run at first request." + fi + set_cron + if [[ -n ${DB_SETUP:-} ]]; then DB_SETUP_USER="${DB_SETUP_USER:-root}" DB_SETUP_PASS="${DB_SETUP_PASS:-root}" fi + if [[ -n ${SIMPLERISK_CSRF_SECRET:-} ]]; then set_csrf_secret fi - # shellcheck disable=SC2015 - [[ "${DB_SETUP:-}" == "delete" ]] && delete_db || true - # shellcheck disable=SC2015 - [[ "${DB_SETUP:-}" = automatic* ]] && db_setup || true - set_mail_settings + + if [ "$docker_managed_config" = true ]; then + # shellcheck disable=SC2015 + [[ "${DB_SETUP:-}" == "delete" ]] && delete_db || true + # shellcheck disable=SC2015 + [[ "${DB_SETUP:-}" = automatic* ]] && db_setup || true + set_mail_settings + fi + unset_variables exec "$@" } From 00d77cfc7482d7d37188775d64d6ee03455fca2b Mon Sep 17 00:00:00 2001 From: Josh Sokol Date: Tue, 19 May 2026 16:14:53 -0500 Subject: [PATCH 2/5] minimal: guard config copy against missing sample file Handle the upgrade-on-persisted-volume case where config.sample.php is absent (only config.php from the old image exists) by reusing the existing file. The subsequent sed substitutions still apply env-var values via the generic ('FOO', '...') regex. Fall back to fatal_error if neither file is present. Also scope CONFIG_PATH and CONFIG_SAMPLE_PATH to set_config() with the local keyword. --- simplerisk-minimal/common/entrypoint.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/simplerisk-minimal/common/entrypoint.sh b/simplerisk-minimal/common/entrypoint.sh index d4dea7b..97e9672 100644 --- a/simplerisk-minimal/common/entrypoint.sh +++ b/simplerisk-minimal/common/entrypoint.sh @@ -52,13 +52,22 @@ validate_db_setup(){ } set_config(){ - CONFIG_PATH='/var/www/simplerisk/includes/config.php' - CONFIG_SAMPLE_PATH='/var/www/simplerisk/includes/config.sample.php' + local CONFIG_PATH='/var/www/simplerisk/includes/config.php' + local CONFIG_SAMPLE_PATH='/var/www/simplerisk/includes/config.sample.php' # Copy the sample config into place. The new SimpleRisk release ships # config.sample.php; the entrypoint creates config.php from it before - # substituting env-var-driven values. - cp "$CONFIG_SAMPLE_PATH" "$CONFIG_PATH" + # substituting env-var-driven values. For users upgrading from an older + # image on a persisted /var/www/simplerisk volume, config.sample.php + # won't be present — fall back to reusing the existing config.php, which + # the subsequent sed substitutions will rewrite in place. + if [ -f "$CONFIG_SAMPLE_PATH" ]; then + cp "$CONFIG_SAMPLE_PATH" "$CONFIG_PATH" + elif [ ! -f "$CONFIG_PATH" ]; then + fatal_error "Neither $CONFIG_SAMPLE_PATH nor $CONFIG_PATH is present. The /var/www/simplerisk volume appears to be in an inconsistent state." + else + print_log "initial_setup:info" "$CONFIG_SAMPLE_PATH not found; reusing existing $CONFIG_PATH (likely upgrading from an older image on a persisted volume)." + fi # Replacing config variables if they exist SIMPLERISK_DB_HOSTNAME=${SIMPLERISK_DB_HOSTNAME:-localhost} && exec_cmd "sed -i \"s/\('DB_HOSTNAME', '\).*\(');\)/\1$SIMPLERISK_DB_HOSTNAME\2/g\" $CONFIG_PATH" From 0ce53aae004aabc1983f088d1aa7206880861fb8 Mon Sep 17 00:00:00 2001 From: Josh Sokol Date: Tue, 19 May 2026 16:18:24 -0500 Subject: [PATCH 3/5] fullstack: migrate entrypoint to config.sample.php Copy config.sample.php into config.php before the existing sed substitutions run, with a defensive fallback for upgrade users whose persisted /var/www/simplerisk volume has an old config.php but no config.sample.php. The bundled-MySQL provisioning flow is otherwise unchanged; the SimpleRisk installer's admin-detection handles the no-admin case on first browser hit. Also remove the SIMPLERISK_INSTALLED toggle (define is gone upstream) and the version=testing URL-uncomment line (its target defines no longer exist in the template). --- simplerisk/common/entrypoint.sh | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/simplerisk/common/entrypoint.sh b/simplerisk/common/entrypoint.sh index e2fb2fe..9a502da 100644 --- a/simplerisk/common/entrypoint.sh +++ b/simplerisk/common/entrypoint.sh @@ -27,7 +27,24 @@ set_config(){ if [ ! -f /configurations/simplerisk-config-configured ]; then print_log "initial_setup:config" "Setting up SimpleRisk's configuration" - CONFIG_PATH='/var/www/simplerisk/includes/config.php' + local CONFIG_PATH='/var/www/simplerisk/includes/config.php' + local CONFIG_SAMPLE_PATH='/var/www/simplerisk/includes/config.sample.php' + + # Copy the sample config into place. The SimpleRisk release ships + # config.sample.php; the entrypoint creates config.php from it + # before substituting the values generated below. For users + # upgrading from an older image on a persisted /var/www/simplerisk + # volume, config.sample.php won't be present — fall back to + # reusing the existing config.php, which the subsequent sed + # substitutions will rewrite in place. + if [ -f "$CONFIG_SAMPLE_PATH" ]; then + cp "$CONFIG_SAMPLE_PATH" "$CONFIG_PATH" + elif [ ! -f "$CONFIG_PATH" ]; then + print_log "initial_setup:error" "Neither $CONFIG_SAMPLE_PATH nor $CONFIG_PATH is present. The /var/www/simplerisk volume appears to be in an inconsistent state." + exit 1 + else + print_log "initial_setup:info" "$CONFIG_SAMPLE_PATH not found; reusing existing $CONFIG_PATH (likely upgrading from an older image on a persisted volume)." + fi SIMPLERISK_DB_HOSTNAME='127.0.0.1' @@ -37,9 +54,6 @@ set_config(){ set_db_password SIMPLERISK_DB_DATABASE=simplerisk && sed -i "s/\('DB_DATABASE', '\).*\(');\)/\1$SIMPLERISK_DB_DATABASE\2/g" $CONFIG_PATH - # shellcheck disable=SC2015 - [ "${version:-}" == "testing" ] && sed -i "s|//\(define('.*_URL\)|\1|g" $CONFIG_PATH || true - # Create a file so this doesn't run again touch /configurations/simplerisk-config-configured @@ -70,9 +84,6 @@ configure_db() { run_sql_command "${password}" "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER ON simplerisk.* TO 'simplerisk'@'${SIMPLERISK_DB_HOSTNAME}'" run_sql_command "${password}" "UPDATE mysql.db SET References_priv='Y',Index_priv='Y' WHERE db='simplerisk';" - # Update the SIMPLERISK_INSTALLED value because of the DB installation - sed -i "s/\('SIMPLERISK_INSTALLED', 'false'\)/'SIMPLERISK_INSTALLED', 'true'/g" $CONFIG_PATH - # Create a file so this doesn't run again touch /configurations/mysql-configured From dd9a903c27b8f9cc4133d9015082456000962705 Mon Sep 17 00:00:00 2001 From: "P." Date: Wed, 20 May 2026 09:07:04 -0600 Subject: [PATCH 4/5] simplerisk-minimal: remove DB_SETUP=manual --- simplerisk-minimal/README.md | 104 ++++++++++++++---------- simplerisk-minimal/common/entrypoint.sh | 4 +- 2 files changed, 61 insertions(+), 47 deletions(-) diff --git a/simplerisk-minimal/README.md b/simplerisk-minimal/README.md index 9ba6eaf..89357c6 100644 --- a/simplerisk-minimal/README.md +++ b/simplerisk-minimal/README.md @@ -2,7 +2,9 @@ [![Try in PWD](https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/simplerisk/docker/master/simplerisk-minimal/stack.yml) -This image is intended to run SimpleRisk in a 'microservices' approach (database is not included). It uses PHP 8.X with Apache as a base image. Also has the capability of setting properties of the `config.php` file through environment variables. +This image is intended to run SimpleRisk in a 'microservices' approach (database is not included). It uses PHP 8.X with +Apache as a base image. Also has the capability of setting properties of the `config.php` file through environment +variables. For any of the executions, it is recommended to map the 80 and 443 ports to be able to access the application. @@ -17,28 +19,37 @@ VERSION=8.X docker build -f php$VERSION/Dockerfile -t simplerisk/simplerisk-minimal:$VERSION . ``` -## Run +## Run There are two ways to run this container: ### Database Setup (Optional) -If this is the first time running the application, the MySQL database needs to be set up with the SimpleRisk schema. You have two options to set it up: +If this is the first time running the application, the MySQL database needs to be set up with the SimpleRisk schema. You +have two options to set it up: #### New Installer (GUI) -Since the `20220306-001` release, SimpleRisk offers a graphical installation method. You will need to run the container the following way: +Since the `20220306-001` release, SimpleRisk offers a graphical installation method. You will need to run the container +without the `DB_SETUP` variable: + ``` -docker run -d --name simplerisk -e DB_SETUP=manual -p 80:80 -p 443:443 simplerisk/simplerisk-minimal +docker run -d --name simplerisk -p 80:80 -p 443:443 simplerisk/simplerisk-minimal ``` #### Docker Setup (CLI) -You must provide the environment variable `DB_SETUP=automatic|automatic-only` and optionally provide any of the variables from the **Environment variables** section that start with `AUTO_DB_SETUP_*` to customize the setup. The only difference between the `DB_SETUP` values shown before is that `automatic` will configure the database and leave the container running until it stops, while `automatic-stop` will stop the container after configuring the database. The latter might be helpful in a situation where you only want to configure the database. +You must provide the environment variable `DB_SETUP=automatic|automatic-only` and optionally provide any of the +variables from the **Environment variables** section that start with `AUTO_DB_SETUP_*` to customize the setup. The only +difference between the `DB_SETUP` values shown before is that `automatic` will configure the database and leave the +container running until it stops, while `automatic-stop` will stop the container after configuring the database. The +latter might be helpful in a situation where you only want to configure the database. -Another detail to consider is that if the database set up is being executed and the `SIMPLERISK_DB_PASSWORD` variable is not provided, the application will generate a random password and show it on the container logs. +Another detail to consider is that if the database set up is being executed and the `SIMPLERISK_DB_PASSWORD` variable is +not provided, the application will generate a random password and show it on the container logs. The way to run the container on this mode are the following: + ```bash # Automatic setup (set database and keep running) docker run -d --name simplerisk -e DB_SETUP=automatic -e DB_SETUP_PASS=test -e SIMPLERISK_DB_HOSTNAME=172.17.0.2 -p 80:80 -p 443:443 simplerisk/simplerisk-minimal @@ -49,49 +60,54 @@ docker run -d --name simplerisk -e DB_SETUP=automatic-only -e DB_SETUP_PASS=test ### Normal execution -If the database is already set up for SimpleRisk to use it, there is no need to use the `DB_SETUP` variable; you can run the container by just providing the `SIMPLERISK_DB_*` options. For example, if the database is located at `db-server.example.com` on port 45329, the command to run the container would be: +If the database is already set up for SimpleRisk to use it, there is no need to use the `DB_SETUP` variable; you can run +the container by just providing the `SIMPLERISK_DB_*` options. For example, if the database is located at +`db-server.example.com` on port 45329, the command to run the container would be: + ``` docker run -d --name simplerisk -e SIMPLERISK_DB_PASSWORD=pass -e SIMPLERISK_DB_HOSTNAME=db-server.example.com -e SIMPLERISK_DB_PORT=45329 -p 80:80 -p 443:443 simplerisk/simplerisk-minimal ``` ## Environment variables -| Variable Name | Default Value | Purpose | -|:-------------:|:-------------:|:--------| -| `DB_SETUP` | `null` (Accepts any value) | The container will start as if the database has not been set up. The valid options here are `automatic` (in case you want the container to configure the database), `automatic-only` (the same as `automatic`, but stops the container after finishing the setup), `delete` (removes the SimpleRisk database and user from MySQL) or `manual` (allows the user to run the manual installation) | -| `DB_SETUP_USER` | `root` | Used when `DB_SETUP=automatic\|automatic-only\|delete`. User name of database privileged user to install SimpleRisk schema and other components | -| `DB_SETUP_PASS` | `root` | Used when `DB_SETUP=automatic\|automatic-only\|delete`. Password for database privileged user to install SimpleRisk schema and other components | -| `DB_SETUP_WAIT` | 20 | Used when `DB_SETUP=automatic\|automatic-only`. Time, in seconds, the application is going to wait to set up the database. Useful if you are deploying the database and SimpleRisk at the same time | -| `SIMPLERISK_DB_HOSTNAME` | `localhost` | Hostname of the database server | -| `SIMPLERISK_DB_PORT` | 3306 | Port to contact the database | -| `SIMPLERISK_DB_USERNAME` |`simplerisk` | User name to be used to access the SimpleRisk database | -| `SIMPLERISK_DB_PASSWORD` | `simplerisk` | Password to be used to access the SimpleRisk database. If not provided while setting up the database, a random password will be generated and shown on the container logs | -| `SIMPLERISK_DB_DATABASE` | `simplerisk` | Database name where all SimpleRisk objects are stored | -| `SIMPLERISK_DB_FOR_SESSIONS` | `true` | Indicator that the application will store all sessions on the configured database | -| `SIMPLERISK_DB_SSL_CERT_PATH` | Empty string (`''`) | Path where SSL certificates, to contact the database, are located | -| `SIMPLERISK_CRON_SETUP` | `enabled` | Install the cron job to run in this Docker container | -| `SIMPLERISK_CSRF_SECRET` | Auto-generated | Override the auto-generated CSRF secret | -| `ADMIN_USERNAME` | — | Username for an initial admin user created once during `DB_SETUP`. Requires `ADMIN_PASSWORD` and `ADMIN_EMAIL`. Skipped if the username already exists | -| `ADMIN_PASSWORD` | — | Password for the initial admin user | -| `ADMIN_EMAIL` | — | Email address for the initial admin user | -| `ADMIN_NAME` | `Administrator` | Display name for the initial admin user | +| Variable Name | Default Value | Purpose | +| :---------------------------: | :------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `DB_SETUP` | `null` (Accepts any value) | The container will start as if the database has not been set up. The valid options here are `automatic` (in case you want the container to configure the database), `automatic-only` (the same as `automatic`, but stops the container after finishing the setup) or `delete` (removes the SimpleRisk database and user from MySQL). If not provided, it will show the installer. | +| `DB_SETUP_USER` | `root` | Used when `DB_SETUP=automatic\|automatic-only\|delete`. User name of database privileged user to install SimpleRisk schema and other components | +| `DB_SETUP_PASS` | `root` | Used when `DB_SETUP=automatic\|automatic-only\|delete`. Password for database privileged user to install SimpleRisk schema and other components | +| `DB_SETUP_WAIT` | 20 | Used when `DB_SETUP=automatic\|automatic-only`. Time, in seconds, the application is going to wait to set up the database. Useful if you are deploying the database and SimpleRisk at the same time | +| `SIMPLERISK_DB_HOSTNAME` | `localhost` | Hostname of the database server | +| `SIMPLERISK_DB_PORT` | 3306 | Port to contact the database | +| `SIMPLERISK_DB_USERNAME` | `simplerisk` | User name to be used to access the SimpleRisk database | +| `SIMPLERISK_DB_PASSWORD` | `simplerisk` | Password to be used to access the SimpleRisk database. If not provided while setting up the database, a random password will be generated and shown on the container logs | +| `SIMPLERISK_DB_DATABASE` | `simplerisk` | Database name where all SimpleRisk objects are stored | +| `SIMPLERISK_DB_FOR_SESSIONS` | `true` | Indicator that the application will store all sessions on the configured database | +| `SIMPLERISK_DB_SSL_CERT_PATH` | Empty string (`''`) | Path where SSL certificates, to contact the database, are located | +| `SIMPLERISK_CRON_SETUP` | `enabled` | Install the cron job to run in this Docker container | +| `SIMPLERISK_CSRF_SECRET` | Auto-generated | Override the auto-generated CSRF secret | +| `ADMIN_USERNAME` | — | Username for an initial admin user created once during `DB_SETUP`. Requires `ADMIN_PASSWORD` and `ADMIN_EMAIL`. Skipped if the username already exists | +| `ADMIN_PASSWORD` | — | Password for the initial admin user | +| `ADMIN_EMAIL` | — | Email address for the initial admin user | +| `ADMIN_NAME` | `Administrator` | Display name for the initial admin user | ## Mail settings -The following environment variables configure the outbound mail settings stored in the SimpleRisk database (`settings` table). They are applied on every container start, so changing a value and restarting the container is all that is needed to update the configuration. Invalid values are silently skipped with a warning in the container logs. - -| Variable Name | Default Value | Purpose | -|:-------------:|:-------------:|:--------| -| `MAIL_TRANSPORT` | — | Transport to use: `smtp` or `sendmail` | -| `MAIL_FROM_EMAIL` | — | Sender email address (must be a valid email) | -| `MAIL_FROM_NAME` | — | Sender display name | -| `MAIL_REPLYTO_EMAIL` | — | Reply-to email address (must be a valid email) | -| `MAIL_REPLYTO_NAME` | — | Reply-to display name | -| `MAIL_HOST` | — | SMTP server hostname | -| `MAIL_PORT` | — | SMTP server port (must be numeric) | -| `MAIL_ENCRYPTION` | — | Encryption method: `none`, `tls`, or `ssl` | -| `MAIL_SMTPAUTH` | — | Whether SMTP authentication is required: `true` or `false` | -| `MAIL_SMTPAUTOTLS` | — | Whether to automatically use TLS: `true` or `false` | -| `MAIL_USERNAME` | — | SMTP authentication username | -| `MAIL_PASSWORD` | — | SMTP authentication password (not applied if empty) | -| `MAIL_PREPEND` | — | Prefix string prepended to all outbound email subjects | +The following environment variables configure the outbound mail settings stored in the SimpleRisk database (`settings` +table). They are applied on every container start, so changing a value and restarting the container is all that is +needed to update the configuration. Invalid values are silently skipped with a warning in the container logs. + +| Variable Name | Default Value | Purpose | +| :------------------: | :-----------: | :--------------------------------------------------------- | +| `MAIL_TRANSPORT` | — | Transport to use: `smtp` or `sendmail` | +| `MAIL_FROM_EMAIL` | — | Sender email address (must be a valid email) | +| `MAIL_FROM_NAME` | — | Sender display name | +| `MAIL_REPLYTO_EMAIL` | — | Reply-to email address (must be a valid email) | +| `MAIL_REPLYTO_NAME` | — | Reply-to display name | +| `MAIL_HOST` | — | SMTP server hostname | +| `MAIL_PORT` | — | SMTP server port (must be numeric) | +| `MAIL_ENCRYPTION` | — | Encryption method: `none`, `tls`, or `ssl` | +| `MAIL_SMTPAUTH` | — | Whether SMTP authentication is required: `true` or `false` | +| `MAIL_SMTPAUTOTLS` | — | Whether to automatically use TLS: `true` or `false` | +| `MAIL_USERNAME` | — | SMTP authentication username | +| `MAIL_PASSWORD` | — | SMTP authentication password (not applied if empty) | +| `MAIL_PREPEND` | — | Prefix string prepended to all outbound email subjects | diff --git a/simplerisk-minimal/common/entrypoint.sh b/simplerisk-minimal/common/entrypoint.sh index 97e9672..3b3ad99 100644 --- a/simplerisk-minimal/common/entrypoint.sh +++ b/simplerisk-minimal/common/entrypoint.sh @@ -40,14 +40,12 @@ validate_db_setup(){ print_log "initial_info:setup" "Setting database through the automatic process";; automatic-only) print_log "initial_info:setup" "Setting database through the automatic process and removing container";; - manual) - print_log "initial_info:setup" "Database will be set manually";; delete) print_log "initial_info:setup" "Perform deletion of database";; "") print_log "initial_info:setup" "Database is already set";; *) - fatal_error "The provided option for DB_SETUP is invalid. It must be automatic, automatic-only or manual.";; + fatal_error "The provided option for DB_SETUP is invalid. It must be automatic, automatic-only or delete.";; esac } From 96d0ea4009101855ab3896d1cf9d5a2f9aa957cb Mon Sep 17 00:00:00 2001 From: "P." Date: Wed, 20 May 2026 06:23:50 -0600 Subject: [PATCH 5/5] simplerisk-minimal: upgrade versions to 8.4 and 8.5 --- .github/workflows/container-validation.yml | 12 ++++++------ .github/workflows/push-to-dockerhub.yml | 16 ++++++++-------- .github/workflows/push-to-gh-pkgs.yml | 16 ++++++++-------- simplerisk-minimal/Dockerfile | 2 +- simplerisk-minimal/generate_dockerfile.sh | 2 +- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/container-validation.yml b/.github/workflows/container-validation.yml index 8e58680..3a0975d 100644 --- a/.github/workflows/container-validation.yml +++ b/.github/workflows/container-validation.yml @@ -24,20 +24,20 @@ jobs: image_tag: "simplerisk/simplerisk:testing" build_args: "ubuntu_version_code=noble" - simplerisk-minimal-php81: - name: 'Verify simplerisk/simplerisk-minimal image based on PHP 8.1 with Apache' + simplerisk-minimal-php84: + name: 'Verify simplerisk/simplerisk-minimal image based on PHP 8.4 with Apache' uses: ./.github/workflows/verify-image_rw.yml with: context_path: "simplerisk-minimal/" dockerfile_path: "simplerisk-minimal/Dockerfile" image_tag: "simplerisk/simplerisk-minimal:testing" - build_args: "php_version=8.1" + build_args: "php_version=8.4" - simplerisk-minimal-php83: - name: 'Verify simplerisk/simplerisk-minimal image based on PHP 8.3 with Apache' + simplerisk-minimal-php85: + name: 'Verify simplerisk/simplerisk-minimal image based on PHP 8.5 with Apache' uses: ./.github/workflows/verify-image_rw.yml with: context_path: "simplerisk-minimal/" dockerfile_path: "simplerisk-minimal/Dockerfile" image_tag: "simplerisk/simplerisk-minimal:testing" - build_args: "php_version=8.3" + build_args: "php_version=8.5" diff --git a/.github/workflows/push-to-dockerhub.yml b/.github/workflows/push-to-dockerhub.yml index 7971d31..e387afd 100644 --- a/.github/workflows/push-to-dockerhub.yml +++ b/.github/workflows/push-to-dockerhub.yml @@ -36,28 +36,28 @@ jobs: main_image: true build_args: "ubuntu_version_code=noble" secrets: inherit - simplerisk-minimal-php81: - name: 'Push simplerisk/simplerisk-minimal image based on PHP 8.1 with Apache' + simplerisk-minimal-php84: + name: 'Push simplerisk/simplerisk-minimal image based on PHP 8.4 with Apache' uses: ./.github/workflows/push-to-dockerhub_rw.yml with: context_path: "simplerisk-minimal" dockerfile_path: "simplerisk-minimal/Dockerfile" image_name: "simplerisk/simplerisk-minimal" version: "20260422-001" - os_version: "php81" - build_args: "php_version=8.1" + os_version: "php84" + build_args: "php_version=8.4" platforms: linux/amd64,linux/arm64 secrets: inherit - simplerisk-minimal-php83: - name: 'Push simplerisk/simplerisk-minimal image based on PHP 8.3 with Apache' + simplerisk-minimal-php85: + name: 'Push simplerisk/simplerisk-minimal image based on PHP 8.5 with Apache' uses: ./.github/workflows/push-to-dockerhub_rw.yml with: context_path: "simplerisk-minimal" dockerfile_path: "simplerisk-minimal/Dockerfile" image_name: "simplerisk/simplerisk-minimal" version: "20260422-001" - os_version: "php83" + os_version: "php85" main_image: true - build_args: "php_version=8.3" + build_args: "php_version=8.5" platforms: linux/amd64,linux/arm64 secrets: inherit diff --git a/.github/workflows/push-to-gh-pkgs.yml b/.github/workflows/push-to-gh-pkgs.yml index 551545c..0d511a0 100644 --- a/.github/workflows/push-to-gh-pkgs.yml +++ b/.github/workflows/push-to-gh-pkgs.yml @@ -36,26 +36,26 @@ jobs: main_image: true build_args: "ubuntu_version_code=noble" secrets: inherit - simplerisk-minimal-php81: - name: 'Push simplerisk/simplerisk-minimal image based on PHP 8.1 with Apache' + simplerisk-minimal-php84: + name: 'Push simplerisk/simplerisk-minimal image based on PHP 8.4 with Apache' uses: ./.github/workflows/push-to-gh-pkgs_rw.yml with: context_path: "simplerisk-minimal" dockerfile_path: "simplerisk-minimal/Dockerfile" image_name: "simplerisk-minimal" version: "20260422-001" - os_version: "php81" - build_args: "php_version=8.1" + os_version: "php84" + build_args: "php_version=8.4" secrets: inherit - simplerisk-minimal-php83: - name: 'Push simplerisk/simplerisk-minimal image based on PHP 8.3 with Apache' + simplerisk-minimal-php85: + name: 'Push simplerisk/simplerisk-minimal image based on PHP 8.5 with Apache' uses: ./.github/workflows/push-to-gh-pkgs_rw.yml with: context_path: "simplerisk-minimal" dockerfile_path: "simplerisk-minimal/Dockerfile" image_name: "simplerisk-minimal" version: "20260422-001" - os_version: "php83" + os_version: "php85" main_image: true - build_args: "php_version=8.3" + build_args: "php_version=8.5" secrets: inherit diff --git a/simplerisk-minimal/Dockerfile b/simplerisk-minimal/Dockerfile index 5ee68bf..dd44cbc 100644 --- a/simplerisk-minimal/Dockerfile +++ b/simplerisk-minimal/Dockerfile @@ -1,5 +1,5 @@ # Dockerfile generated by script -ARG php_version=8.4 +ARG php_version=8.5 FROM alpine/curl:8.12.1 AS downloader diff --git a/simplerisk-minimal/generate_dockerfile.sh b/simplerisk-minimal/generate_dockerfile.sh index 433fd1a..7a3461a 100755 --- a/simplerisk-minimal/generate_dockerfile.sh +++ b/simplerisk-minimal/generate_dockerfile.sh @@ -15,7 +15,7 @@ fi cat << EOF > "${SCRIPT_LOCATION}/Dockerfile" # Dockerfile generated by script -ARG php_version=8.4 +ARG php_version=8.5 EOF