Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 7.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v3.1.5 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v3.1.6 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand Down
2 changes: 1 addition & 1 deletion 8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v3.1.5 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v3.1.6 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand Down
2 changes: 1 addition & 1 deletion 8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v3.1.5 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v3.1.6 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand Down
2 changes: 1 addition & 1 deletion 8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v3.1.5 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v3.1.6 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand Down
2 changes: 1 addition & 1 deletion 8.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v3.1.5 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v3.1.6 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand Down
2 changes: 1 addition & 1 deletion 8.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v3.1.5 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v3.1.6 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand Down
2 changes: 1 addition & 1 deletion 8.4/overlay/tmp/PHP_BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.4.17-r0
8.4.18-r0
2 changes: 1 addition & 1 deletion 8.4/overlay/tmp/PHP_REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.4.17
8.4.18
2 changes: 1 addition & 1 deletion 8.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /tmp
RUN \
# get the Nu scripts from the PHP image overlay
echo "Cloning Alpine overlay." && \
apk add git && git clone --branch v3.1.5 https://github.com/bfren/docker-php.git && \
apk add git && git clone --branch v3.1.6 https://github.com/bfren/docker-php.git && \
mkdir /overlay && \
mv docker-php/overlay/etc /overlay/

Expand Down
2 changes: 1 addition & 1 deletion 8.5/overlay/tmp/PHP_BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.5.2-r0
8.5.3-r0
2 changes: 1 addition & 1 deletion 8.5/overlay/tmp/PHP_REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.5.2
8.5.3
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.1.5
8.1.6
2 changes: 1 addition & 1 deletion generate-dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail
docker pull bfren/alpine

BASE_VERSION="7.1.4"
PHP_BRANCH="v3.1.5"
PHP_BRANCH="v3.1.6"
PHP_VERSIONS="7.4 8.0 8.1 8.2 8.3 8.4 8.5"

for V in ${PHP_VERSIONS} ; do
Expand Down
12 changes: 6 additions & 6 deletions overlay/etc/bf/init.d/22-php-ini.nu
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use bf
use bf-nginx-php
use bf-php
bf env load

# Apply any overrides to php.ini
export def main [] {
# load any override files and apply them
let ini_override = bf env PHP_INI_OVERRIDE_D
if ($ini_override | path exists) { $"($ini_override)/*.json" | into glob | ls --full-paths $in | get name | sort | each {|x|
let override_values = bf fs read $x | from json
bf-php ini $override_values
} }
# get ini override values
let override_values = bf-nginx-php ini get_override_values

# download specified php.ini file and apply any override values
bf-php ini $override_values

# return nothing
return
Expand Down
25 changes: 25 additions & 0 deletions overlay/etc/nu/scripts/bf-nginx-php/ini.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
use bf

# Get php.ini override values
export def get_override_values []: nothing -> record {
# get variables
let ini_override = bf env PHP_INI_OVERRIDE_D

# if the override path does not exist return nothing
if not ($ini_override | path exists) {
return
}

# load override json files,
# sorted alphabetically
# read as json
# reduce array so later values override earlier values
return $"($ini_override)/*.json"
| into glob
| ls --full-paths $in
| get name
| sort --natural
| each {|x| bf fs read $x | from json }
| reduce {|it, acc| $acc | merge $it }
| into record
}
1 change: 1 addition & 0 deletions overlay/etc/nu/scripts/bf-nginx-php/mod.nu
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export module conf.nu
export module ini.nu
export module run.nu
export module sessions.nu
8 changes: 3 additions & 5 deletions overlay/etc/nu/scripts/bf-nginx-php/sessions.nu
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
use bf
use ini.nu

# Clean sessions as user www
export def clean [] {
# load environment
bf env load

# get session max lifetime (if set)
let ini_override = bf env PHP_INI_OVERRIDE
let max_lifetime = match ($ini_override | path exists) {
true => ($ini_override | open | get --optional "session.gc_maxlifetime")
false => 86400
}
let ini_override = bf env PHP_INI_OVERRIDE_D
let max_lifetime = ini get_override_values | default 86400 session.gc_maxlifetime

# hat-tip https://www.getpagespeed.com/server-setup/php/cleanup-php-sessions-like-a-pro
let args = [
Expand Down