Skip to content

Commit ee6917b

Browse files
authored
Merge pull request #80 from devilbox/release-0.61
Release v0.61
2 parents 1728629 + 67d0568 commit ee6917b

File tree

2 files changed

+48
-48
lines changed

2 files changed

+48
-48
lines changed

Dockerfiles/prod/data/docker-entrypoint.sh

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,38 @@ set -p pipefail
1616
# MY_GID
1717

1818
# Path to scripts to source
19-
CONFIG_DIR="/docker-entrypoint.d"
19+
DVL_CONFIG_DIR="/docker-entrypoint.d"
2020

2121
# php.ini.d directory
22-
PHP_INI_DIR="/usr/local/etc/php/conf.d"
22+
DVL_PHP_INI_DIR="/usr/local/etc/php/conf.d"
2323

2424
# php-fpm conf.d directory
25-
PHP_FPM_DIR="/usr/local/etc/php-fpm.d"
25+
DVL_PHP_FPM_DIR="/usr/local/etc/php-fpm.d"
2626

2727
# This is the log file for any mail related functions
28-
PHP_MAIL_LOG="/var/log/mail.log"
28+
DVL_PHP_MAIL_LOG="/var/log/mail.log"
2929

3030
# This file holds error and access log definitions
31-
PHP_FPM_CONF_LOGFILE="${PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
32-
PHP_INI_CONF_LOGFILE="${PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
31+
DVL_PHP_FPM_CONF_LOGFILE="${DVL_PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
32+
DVL_PHP_INI_CONF_LOGFILE="${DVL_PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
3333

3434
# PHP-FPM log dir
35-
FPM_LOG_DIR="/var/log/php"
35+
DVL_FPM_LOG_DIR="/var/log/php"
3636

3737
# Custom ini dir (to be copied to actual ini dir)
38-
PHP_CUST_INI_DIR="/etc/php-custom.d"
38+
DVL_PHP_CUST_INI_DIR="/etc/php-custom.d"
3939

4040
# Custom PHP-FPM dir (to be copied to actual FPM conf dir)
41-
PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
41+
DVL_PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
4242

4343
# Supervisord config directory
44-
SUPERVISOR_CONFD="/etc/supervisor/conf.d"
44+
DVL_SUPERVISOR_CONFD="/etc/supervisor/conf.d"
4545

4646

4747
###
4848
### Source libs
4949
###
50-
init="$( find "${CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
50+
init="$( find "${DVL_CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
5151
for f in ${init}; do
5252
# shellcheck disable=SC1090
5353
. "${f}"
@@ -76,7 +76,7 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
7676
###
7777
### Set timezone
7878
###
79-
set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
79+
set_timezone "TIMEZONE" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
8080

8181

8282
###
@@ -92,9 +92,9 @@ fi
9292
###
9393
set_docker_logs \
9494
"DOCKER_LOGS" \
95-
"${FPM_LOG_DIR}" \
96-
"${PHP_FPM_CONF_LOGFILE}" \
97-
"${PHP_INI_CONF_LOGFILE}" \
95+
"${DVL_FPM_LOG_DIR}" \
96+
"${DVL_PHP_FPM_CONF_LOGFILE}" \
97+
"${DVL_PHP_INI_CONF_LOGFILE}" \
9898
"${MY_USER}" \
9999
"${MY_GROUP}" \
100100
"${DEBUG_LEVEL}"
@@ -105,10 +105,10 @@ set_docker_logs \
105105
###
106106
if is_docker_logs_enabled "DOCKER_LOGS" >/dev/null; then
107107
# PHP mail function should log to stderr
108-
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
108+
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
109109
else
110110
# PHP mail function should log to file
111-
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "${PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
111+
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "${DVL_PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
112112
fi
113113

114114

@@ -130,7 +130,7 @@ for line in $( port_forward_get_lines "FORWARD_PORTS_TO_LOCALHOST" ); do
130130
supervisor_add_service \
131131
"socat-${lport}-${rhost}-${rport}" \
132132
"/usr/bin/socat tcp-listen:${lport},reuseaddr,fork tcp:${rhost}:${rport}" \
133-
"${SUPERVISOR_CONFD}" \
133+
"${DVL_SUPERVISOR_CONFD}" \
134134
"${DEBUG_LEVEL}"
135135
done
136136

@@ -139,30 +139,30 @@ done
139139
### Supervisor: rsyslogd & postfix
140140
###
141141
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
142-
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
143-
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
142+
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
143+
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
144144
fi
145145

146146

147147
###
148148
### Supervisor: php-fpm
149149
###
150-
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
150+
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
151151

152152

153153
###
154154
### Copy custom *.ini files
155155
###
156-
copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
156+
copy_ini_files "${DVL_PHP_CUST_INI_DIR}" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
157157

158158

159159
###
160160
### Copy custom PHP-FPM *.conf files
161161
###
162162
if [ "${PHP_VERSION}" = "5.2" ]; then
163-
copy_fpm_5_2_conf_file "${PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}"
163+
copy_fpm_5_2_conf_file "${DVL_PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}"
164164
else
165-
copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}"
165+
copy_fpm_files "${DVL_PHP_CUST_FPM_DIR}" "${DVL_PHP_FPM_DIR}" "${DEBUG_LEVEL}"
166166
fi
167167

168168

Dockerfiles/work/data/docker-entrypoint.sh

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,38 @@ set -p pipefail
1616
# MY_GID
1717

1818
# Path to scripts to source
19-
CONFIG_DIR="/docker-entrypoint.d"
19+
DVL_CONFIG_DIR="/docker-entrypoint.d"
2020

2121
# php.ini.d directory
22-
PHP_INI_DIR="/usr/local/etc/php/conf.d"
22+
DVL_PHP_INI_DIR="/usr/local/etc/php/conf.d"
2323

2424
# php-fpm conf.d directory
25-
PHP_FPM_DIR="/usr/local/etc/php-fpm.d"
25+
DVL_PHP_FPM_DIR="/usr/local/etc/php-fpm.d"
2626

2727
# This is the log file for any mail related functions
28-
PHP_MAIL_LOG="/var/log/mail.log"
28+
DVL_PHP_MAIL_LOG="/var/log/mail.log"
2929

3030
# This file holds error and access log definitions
31-
PHP_FPM_CONF_LOGFILE="${PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
32-
PHP_INI_CONF_LOGFILE="${PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
31+
DVL_PHP_FPM_CONF_LOGFILE="${DVL_PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
32+
DVL_PHP_INI_CONF_LOGFILE="${DVL_PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
3333

3434
# PHP-FPM log dir
35-
FPM_LOG_DIR="/var/log/php"
35+
DVL_FPM_LOG_DIR="/var/log/php"
3636

3737
# Custom ini dir (to be copied to actual ini dir)
38-
PHP_CUST_INI_DIR="/etc/php-custom.d"
38+
DVL_PHP_CUST_INI_DIR="/etc/php-custom.d"
3939

4040
# Custom PHP-FPM dir (to be copied to actual FPM conf dir)
41-
PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
41+
DVL_PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
4242

4343
# Supervisord config directory
44-
SUPERVISOR_CONFD="/etc/supervisor/conf.d"
44+
DVL_SUPERVISOR_CONFD="/etc/supervisor/conf.d"
4545

4646

4747
###
4848
### Source libs
4949
###
50-
init="$( find "${CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
50+
init="$( find "${DVL_CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
5151
for f in ${init}; do
5252
# shellcheck disable=SC1090
5353
. "${f}"
@@ -76,7 +76,7 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
7676
###
7777
### Set timezone
7878
###
79-
set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
79+
set_timezone "TIMEZONE" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
8080

8181

8282
###
@@ -92,9 +92,9 @@ fi
9292
###
9393
set_docker_logs \
9494
"DOCKER_LOGS" \
95-
"${FPM_LOG_DIR}" \
96-
"${PHP_FPM_CONF_LOGFILE}" \
97-
"${PHP_INI_CONF_LOGFILE}" \
95+
"${DVL_FPM_LOG_DIR}" \
96+
"${DVL_PHP_FPM_CONF_LOGFILE}" \
97+
"${DVL_PHP_INI_CONF_LOGFILE}" \
9898
"${MY_USER}" \
9999
"${MY_GROUP}" \
100100
"${DEBUG_LEVEL}"
@@ -105,10 +105,10 @@ set_docker_logs \
105105
###
106106
if is_docker_logs_enabled "DOCKER_LOGS" >/dev/null; then
107107
# PHP mail function should log to stderr
108-
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
108+
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
109109
else
110110
# PHP mail function should log to file
111-
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "${PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
111+
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "${DVL_PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
112112
fi
113113

114114

@@ -130,7 +130,7 @@ for line in $( port_forward_get_lines "FORWARD_PORTS_TO_LOCALHOST" ); do
130130
supervisor_add_service \
131131
"socat-${lport}-${rhost}-${rport}" \
132132
"/usr/bin/socat tcp-listen:${lport},reuseaddr,fork tcp:${rhost}:${rport}" \
133-
"${SUPERVISOR_CONFD}" \
133+
"${DVL_SUPERVISOR_CONFD}" \
134134
"${DEBUG_LEVEL}"
135135
done
136136

@@ -139,30 +139,30 @@ done
139139
### Supervisor: rsyslogd & postfix
140140
###
141141
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
142-
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
143-
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
142+
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
143+
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
144144
fi
145145

146146

147147
###
148148
### Supervisor: php-fpm
149149
###
150-
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
150+
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
151151

152152

153153
###
154154
### Copy custom *.ini files
155155
###
156-
copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
156+
copy_ini_files "${DVL_PHP_CUST_INI_DIR}" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
157157

158158

159159
###
160160
### Copy custom PHP-FPM *.conf files
161161
###
162162
if [ "${PHP_VERSION}" = "5.2" ]; then
163-
copy_fpm_5_2_conf_file "${PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}"
163+
copy_fpm_5_2_conf_file "${DVL_PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}"
164164
else
165-
copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}"
165+
copy_fpm_files "${DVL_PHP_CUST_FPM_DIR}" "${DVL_PHP_FPM_DIR}" "${DEBUG_LEVEL}"
166166
fi
167167

168168

0 commit comments

Comments
 (0)