Skip to content

Commit cd98b50

Browse files
committed
docker: adjust PHP version in apache config
Signed-off-by: nachoparker <[email protected]>
1 parent 21b7fe7 commit cd98b50

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

bin/ncp-docker-hook

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Here we have the opportunity to make changes in the persistent volume configuration before
2+
# anything is started, after pulling a new image
3+
4+
# adjust PHP version (in case of php upgrade)
5+
if php --version | grep -q v7.4 && [[ -f /data/etc/apache2/conf-available/php7.3-fpm.conf ]]; then
6+
a2disconf php7.3-fpm
7+
mv /data/etc/apache2/conf-available/php7.{3,4}-fpm.conf
8+
sed -i 's|php7.3|php7.4|g' /data/etc/apache2/conf-available/php7.4-fpm.conf
9+
a2enconf php7.4-fpm
10+
fi
11+

build/docker/lamp/010lamp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,14 @@ set -e
1818
# MOVE CONFIGS TO PERSISTENT VOLUME
1919
persistent_cfg /etc/apache2
2020

21+
# Run hardcoded hooks. This allows scripts in the image to change persistent values before
22+
# initialization. Use case is to download a new image.
23+
if [[ -f /usr/local/bin/ncp-docker-hook ]]; then
24+
source /usr/local/bin/ncp-docker-hook
25+
fi
26+
2127
echo "Starting PHP-fpm"
22-
php-fpm${PHPVER}
28+
php-fpm"${PHPVER}"
2329

2430
echo "Starting Apache"
2531
/usr/sbin/apache2ctl start

changelog.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11

2-
[v1.46.8](https://github.com/nextcloud/nextcloudpi/commit/dc7046b) (2022-03-04) SSH: cannot check for default password because of Debian bug #1003151
2+
[v1.46.9](https://github.com/nextcloud/nextcloudpi/commit/db56128) (2022-03-07) docker: adjust PHP version in apache config
33

4-
[v1.46.7](https://github.com/nextcloud/nextcloudpi/commit/f473f73) (2022-03-04) nc-hdd-monitor: fix Bullseye service name
4+
[v1.46.8 ](https://github.com/nextcloud/nextcloudpi/commit/21b7fe7) (2022-03-04) SSH: cannot check for default password because of Debian bug #1003151
55

6-
[v1.46.6](https://github.com/nextcloud/nextcloudpi/commit/c9610e4) (2022-03-03) ncp-dist-upgrade: fix VM grub-pc issue
6+
[v1.46.7 ](https://github.com/nextcloud/nextcloudpi/commit/f473f73) (2022-03-04) nc-hdd-monitor: fix Bullseye service name
7+
8+
[v1.46.6 ](https://github.com/nextcloud/nextcloudpi/commit/c9610e4) (2022-03-03) ncp-dist-upgrade: fix VM grub-pc issue
79

810
[v1.46.5 ](https://github.com/nextcloud/nextcloudpi/commit/062c803) (2022-03-02) ncp-dist-upgrade: add DHCP fix for raspios
911

0 commit comments

Comments
 (0)