mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-20 16:01:14 +00:00
Rebuild docker-entrypoint scripts
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Available global variables:
|
||||
# + MY_USER
|
||||
# + MY_GROUP
|
||||
# + DEBUG_LEVEL
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
###
|
||||
### Settings
|
||||
###
|
||||
set -e
|
||||
set -u
|
||||
set -p pipefail
|
||||
|
||||
|
||||
###
|
||||
### Globals
|
||||
###
|
||||
|
||||
# The following global variables are available by our Dockerfile itself:
|
||||
# MY_USER
|
||||
# MY_GROUP
|
||||
# MY_UID
|
||||
# MY_GID
|
||||
|
||||
# Path to scripts to source
|
||||
CONFIG_DIR="/docker-entrypoint.d"
|
||||
|
||||
|
||||
@@ -25,27 +29,27 @@ for f in ${init}; do
|
||||
done
|
||||
|
||||
|
||||
###
|
||||
### Set Debug level
|
||||
###
|
||||
DEBUG_LEVEL="$( get_debug_level "DEBUG_ENTRYPOINT" "0" )"
|
||||
log "info" "Debug level: ${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
|
||||
#############################################################
|
||||
## Entry Point
|
||||
#############################################################
|
||||
|
||||
###
|
||||
### Set Debug level
|
||||
###
|
||||
DEBUG_LEVEL="$( env_get "DEBUG_ENTRYPOINT" "0" )"
|
||||
log "info" "Debug level: ${DEBUG_LEVEL}" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### Change uid/gid
|
||||
###
|
||||
set_uid "NEW_UID"
|
||||
set_gid "NEW_GID"
|
||||
set_uid "NEW_UID" "${MY_USER}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
|
||||
set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### Startup
|
||||
###
|
||||
log "info" "Starting $( php-fpm -v 2>&1 | head -1 )"
|
||||
log "info" "Starting $( php-fpm -v 2>&1 | head -1 )" "${DEBUG_LEVEL}"
|
||||
exec /usr/local/sbin/php-fpm
|
||||
|
||||
Reference in New Issue
Block a user