mirror of
https://github.com/casjaysdevdocker/ampache
synced 2026-05-19 08:47:49 -04:00
Some checks failed
ampache / release-ampache (push) Has been cancelled
Dockerfile .env.scripts .gitattributes .gitea/ .gitignore LICENSE.md README.md rootfs/root/docker/setup/04-users.sh rootfs/root/docker/setup/05-custom.sh rootfs/tmp/ rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/bin/pkmgr rootfs/usr/local/etc/docker/bin/ rootfs/usr/local/etc/docker/init.d/
20 lines
872 B
Bash
Executable File
20 lines
872 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# casjaysdevdocker/ampache - launches php-fpm84 (background) then httpd (foreground).
|
|
#
|
|
# Single command for the framework's EXEC_CMD_BIN slot.
|
|
set -e
|
|
|
|
mkdir -p /run/apache2 /run/php-fpm /tmp/php-sessions /data/logs/php-fpm /data/logs/apache2
|
|
chown -Rf apache:apache /run/apache2 /run/php-fpm /tmp/php-sessions /data/logs/php-fpm /data/logs/apache2 2>/dev/null || true
|
|
|
|
# php-fpm: daemonize=no per our config; we put it in background here.
|
|
if ! pgrep -x php-fpm84 >/dev/null 2>&1; then
|
|
/usr/sbin/php-fpm84 --fpm-config /etc/php84/php-fpm.conf >>/data/logs/php-fpm/stdout.log 2>>/data/logs/php-fpm/stderr.log &
|
|
# wait up to 10s for the unix socket
|
|
i=0
|
|
while [ ! -S /run/php-fpm/php-fpm.sock ] && [ $i -lt 10 ]; do sleep 1; i=$((i+1)); done
|
|
fi
|
|
|
|
# httpd in foreground (-D FOREGROUND).
|
|
exec /usr/sbin/httpd -D FOREGROUND -f /etc/apache2/httpd.conf
|