mirror of
https://github.com/friendica/docker
synced 2025-01-04 04:38:21 +01:00
Merge pull request #92 from tianon/tweaks
Minor syntax/correctness tweaks
This commit is contained in:
commit
1e61667492
17 changed files with 79 additions and 72 deletions
|
@ -8,5 +8,6 @@ done
|
|||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
fi
|
||||
|
|
|
@ -28,16 +28,16 @@ setup_ssmtp() {
|
|||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
} > /etc/ssmtp/revaliases;
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
{
|
||||
echo "root=:$smtp_from@$HOSTNAME" ;
|
||||
echo "hostname=$HOSTNAME" ;
|
||||
echo "mailhub=$SMTP" ;
|
||||
echo "FromLineOverride=YES" ;
|
||||
echo "root=:$smtp_from@$HOSTNAME"
|
||||
echo "hostname=$HOSTNAME"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
|
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
if version_greater "$installed_version" "$image_version"; then
|
||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||
exit 1;
|
||||
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
|
|
@ -13,7 +13,7 @@ RUN set -ex; \
|
|||
# see https://friendi.ca/resources/requirements/
|
||||
RUN set -ex; \
|
||||
\
|
||||
apk add -U --no-cache --virtual .build-deps \
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
mysql-client \
|
||||
bash \
|
||||
$PHPIZE_DEPS \
|
||||
|
@ -67,8 +67,8 @@ RUN set -ex; \
|
|||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)"; \
|
||||
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
||||
apk del .build-deps;
|
||||
apk add --no-network --virtual .friendica-phpext-rundeps $runDeps; \
|
||||
apk del --no-network .build-deps;
|
||||
|
||||
# set recommended PHP.ini settings
|
||||
RUN set -ex; \
|
||||
|
|
|
@ -8,5 +8,6 @@ done
|
|||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
fi
|
||||
|
|
|
@ -28,16 +28,16 @@ setup_ssmtp() {
|
|||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
} > /etc/ssmtp/revaliases;
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
{
|
||||
echo "root=:$smtp_from@$HOSTNAME" ;
|
||||
echo "hostname=$HOSTNAME" ;
|
||||
echo "mailhub=$SMTP" ;
|
||||
echo "FromLineOverride=YES" ;
|
||||
echo "root=:$smtp_from@$HOSTNAME"
|
||||
echo "hostname=$HOSTNAME"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
|
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
if version_greater "$installed_version" "$image_version"; then
|
||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||
exit 1;
|
||||
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
|
|
@ -8,5 +8,6 @@ done
|
|||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
fi
|
||||
|
|
|
@ -28,16 +28,16 @@ setup_ssmtp() {
|
|||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
} > /etc/ssmtp/revaliases;
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
{
|
||||
echo "root=:$smtp_from@$HOSTNAME" ;
|
||||
echo "hostname=$HOSTNAME" ;
|
||||
echo "mailhub=$SMTP" ;
|
||||
echo "FromLineOverride=YES" ;
|
||||
echo "root=:$smtp_from@$HOSTNAME"
|
||||
echo "hostname=$HOSTNAME"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
|
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
if version_greater "$installed_version" "$image_version"; then
|
||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||
exit 1;
|
||||
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
|
|
@ -8,5 +8,6 @@ done
|
|||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
fi
|
||||
|
|
|
@ -28,16 +28,16 @@ setup_ssmtp() {
|
|||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
} > /etc/ssmtp/revaliases;
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
{
|
||||
echo "root=:$smtp_from@$HOSTNAME" ;
|
||||
echo "hostname=$HOSTNAME" ;
|
||||
echo "mailhub=$SMTP" ;
|
||||
echo "FromLineOverride=YES" ;
|
||||
echo "root=:$smtp_from@$HOSTNAME"
|
||||
echo "hostname=$HOSTNAME"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
|
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
if version_greater "$installed_version" "$image_version"; then
|
||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||
exit 1;
|
||||
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
|
|
@ -13,7 +13,7 @@ RUN set -ex; \
|
|||
# see https://friendi.ca/resources/requirements/
|
||||
RUN set -ex; \
|
||||
\
|
||||
apk add -U --no-cache --virtual .build-deps \
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
mysql-client \
|
||||
bash \
|
||||
$PHPIZE_DEPS \
|
||||
|
@ -67,8 +67,8 @@ RUN set -ex; \
|
|||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)"; \
|
||||
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
||||
apk del .build-deps;
|
||||
apk add --no-network --virtual .friendica-phpext-rundeps $runDeps; \
|
||||
apk del --no-network .build-deps;
|
||||
|
||||
# set recommended PHP.ini settings
|
||||
RUN set -ex; \
|
||||
|
|
|
@ -8,5 +8,6 @@ done
|
|||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
fi
|
||||
|
|
|
@ -28,16 +28,16 @@ setup_ssmtp() {
|
|||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
} > /etc/ssmtp/revaliases;
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
{
|
||||
echo "root=:$smtp_from@$HOSTNAME" ;
|
||||
echo "hostname=$HOSTNAME" ;
|
||||
echo "mailhub=$SMTP" ;
|
||||
echo "FromLineOverride=YES" ;
|
||||
echo "root=:$smtp_from@$HOSTNAME"
|
||||
echo "hostname=$HOSTNAME"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
|
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
if version_greater "$installed_version" "$image_version"; then
|
||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||
exit 1;
|
||||
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
|
|
@ -8,5 +8,6 @@ done
|
|||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
fi
|
||||
|
|
|
@ -28,16 +28,16 @@ setup_ssmtp() {
|
|||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
} > /etc/ssmtp/revaliases;
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
{
|
||||
echo "root=:$smtp_from@$HOSTNAME" ;
|
||||
echo "hostname=$HOSTNAME" ;
|
||||
echo "mailhub=$SMTP" ;
|
||||
echo "FromLineOverride=YES" ;
|
||||
echo "root=:$smtp_from@$HOSTNAME"
|
||||
echo "hostname=$HOSTNAME"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
|
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
if version_greater "$installed_version" "$image_version"; then
|
||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||
exit 1;
|
||||
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
|
|
@ -12,7 +12,7 @@ RUN set -ex; \
|
|||
# see https://friendi.ca/resources/requirements/
|
||||
RUN set -ex; \
|
||||
\
|
||||
apk add -U --no-cache --virtual .build-deps \
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
mysql-client \
|
||||
bash \
|
||||
$PHPIZE_DEPS \
|
||||
|
@ -66,8 +66,8 @@ RUN set -ex; \
|
|||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)"; \
|
||||
apk add --virtual .friendica-phpext-rundeps $runDeps; \
|
||||
apk del .build-deps;
|
||||
apk add --no-network --virtual .friendica-phpext-rundeps $runDeps; \
|
||||
apk del --no-network .build-deps;
|
||||
|
||||
# set recommended PHP.ini settings
|
||||
RUN set -ex; \
|
||||
|
|
|
@ -8,5 +8,6 @@ done
|
|||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
fi
|
||||
|
|
|
@ -28,16 +28,16 @@ setup_ssmtp() {
|
|||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP" ;
|
||||
} > /etc/ssmtp/revaliases;
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
{
|
||||
echo "root=:$smtp_from@$HOSTNAME" ;
|
||||
echo "hostname=$HOSTNAME" ;
|
||||
echo "mailhub=$SMTP" ;
|
||||
echo "FromLineOverride=YES" ;
|
||||
echo "root=:$smtp_from@$HOSTNAME"
|
||||
echo "hostname=$HOSTNAME"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "UseSTARTTLS=$SMTP_STARTTLS"; fi
|
||||
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "AuthUser=$SMTP_AUTH_USER"; fi
|
||||
|
@ -60,8 +60,8 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
# no downgrading possible
|
||||
if version_greater "$installed_version" "$image_version"; then
|
||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||
exit 1;
|
||||
echo "Can't copy Friendica sources because the version of the data ($installed_version) is higher than the docker image ($image_version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
setup_ssmtp
|
||||
|
|
Loading…
Reference in a new issue