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