initial release (nginx+php ok)
This commit is contained in:
21
rootfs/app/entrypoint.sh
Executable file
21
rootfs/app/entrypoint.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
WEBROOT=/www
|
||||
PHP=${PHP:-none}
|
||||
USERNAME=${USERNAME:-theuser}
|
||||
adduser -DH -h "${WEBROOT}" -G "nginx" -u "1000" "${USERNAME}"
|
||||
|
||||
chown "${USERNAME}:nginx" "${WEBROOT}" -R
|
||||
find "${WEBROOT}" -type d -exec chmod 0755 {} \;
|
||||
find "${WEBROOT}" -type f -exec chmod 0644 {} \;
|
||||
|
||||
envsubst < /app/nginx.conf.tpl > /etc/nginx/http.d/default.conf
|
||||
|
||||
case "${PHP}" in
|
||||
"php84") /usr/sbin/php-fpm84 -D ;;
|
||||
"php83") /usr/sbin/php-fpm83 -D ;;
|
||||
"php82") /usr/sbin/php-fpm82 -D ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
nginx
|
||||
Reference in New Issue
Block a user