clean config, support read-only non-root docker
All checks were successful
docker / docker (push) Successful in 22s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-07-11 15:33:40 +03:00
parent 16f954f1e5
commit 54b3588c3a
12 changed files with 300 additions and 539 deletions

View File

@ -1,11 +1,17 @@
#!/bin/sh
set -e
#!/bin/sh -e
if [ ! -f '/var/www/html/4get/data/config.php' ] && [ -f './gen_config.php' ]
then
php ./gen_config.php
rm -f ./gen_config.php
config='/srv/4get/data/config.php'
defconfig='/srv/4get/data/config.def.php'
# check for the configuration file
if [ ! -f "${config}" ]; then
echo "configuration file not specified"
echo "here's the default configuration, modify and mount this to ${config}"
echo
cat "${defconfig}"
exit 1
fi
echo "Starting up apache2"
exec httpd -DFOREGROUND
# execute apache
echo "starting apache web server"
exec httpd -D FOREGROUND