mirror of
https://github.com/friendica/docker
synced 2025-01-19 17:37:00 +01:00
run ./update.sh
This commit is contained in:
parent
e0448d4ac2
commit
11e884d952
20 changed files with 13 additions and 296 deletions
|
@ -1,47 +0,0 @@
|
|||
#!/usr/local/bin/php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This script tries to connect to a database for a given interval
|
||||
* Useful in case of installation e.g. to wait for the database to not generate unnecessary errors
|
||||
*
|
||||
* Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}]
|
||||
*/
|
||||
|
||||
$timeout = 60;
|
||||
switch ($argc) {
|
||||
case 4:
|
||||
$timeout = (float)$argv[3];
|
||||
case 3:
|
||||
$host = $argv[1];
|
||||
$port = (int)$argv[2];
|
||||
break;
|
||||
default:
|
||||
fwrite(STDERR, 'Usage: '.$argv[0].' host port [timeout]'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($timeout < 0) {
|
||||
fwrite(STDERR, 'Timeout must be greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($port < 1) {
|
||||
fwrite(STDERR, 'Port must be an integer greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
$socketTimeout = (float)ini_get('default_socket_timeout');
|
||||
if ($socketTimeout > $timeout) {
|
||||
$socketTimeout = $timeout;
|
||||
}
|
||||
$stopTime = time() + $timeout;
|
||||
do {
|
||||
$sock = @fsockopen($host, $port, $errno, $errstr, $socketTimeout);
|
||||
if ($sock !== false) {
|
||||
fclose($sock);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(0);
|
||||
}
|
||||
sleep(1);
|
||||
fwrite(STDOUT, '.');
|
||||
} while (time() < $stopTime);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(1);
|
|
@ -6,7 +6,7 @@ while [ ! -f /var/www/html/bin/daemon.php ]; do
|
|||
done
|
||||
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
|
|
|
@ -117,7 +117,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
if [ "$install" = true ]; then
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
|
||||
echo "Starting Friendica installation ..."
|
||||
run_as "php /var/www/html/bin/console.php autoinstall $install_options"
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/local/bin/php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This script tries to connect to a database for a given interval
|
||||
* Useful in case of installation e.g. to wait for the database to not generate unnecessary errors
|
||||
*
|
||||
* Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}]
|
||||
*/
|
||||
|
||||
$timeout = 60;
|
||||
switch ($argc) {
|
||||
case 4:
|
||||
$timeout = (float)$argv[3];
|
||||
case 3:
|
||||
$host = $argv[1];
|
||||
$port = (int)$argv[2];
|
||||
break;
|
||||
default:
|
||||
fwrite(STDERR, 'Usage: '.$argv[0].' host port [timeout]'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($timeout < 0) {
|
||||
fwrite(STDERR, 'Timeout must be greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($port < 1) {
|
||||
fwrite(STDERR, 'Port must be an integer greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
$socketTimeout = (float)ini_get('default_socket_timeout');
|
||||
if ($socketTimeout > $timeout) {
|
||||
$socketTimeout = $timeout;
|
||||
}
|
||||
$stopTime = time() + $timeout;
|
||||
do {
|
||||
$sock = @fsockopen($host, $port, $errno, $errstr, $socketTimeout);
|
||||
if ($sock !== false) {
|
||||
fclose($sock);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(0);
|
||||
}
|
||||
sleep(1);
|
||||
fwrite(STDOUT, '.');
|
||||
} while (time() < $stopTime);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(1);
|
|
@ -6,7 +6,7 @@ while [ ! -f /var/www/html/bin/daemon.php ]; do
|
|||
done
|
||||
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
|
|
|
@ -117,7 +117,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
if [ "$install" = true ]; then
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
|
||||
echo "Starting Friendica installation ..."
|
||||
run_as "php /var/www/html/bin/console.php autoinstall $install_options"
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/local/bin/php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This script tries to connect to a database for a given interval
|
||||
* Useful in case of installation e.g. to wait for the database to not generate unnecessary errors
|
||||
*
|
||||
* Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}]
|
||||
*/
|
||||
|
||||
$timeout = 60;
|
||||
switch ($argc) {
|
||||
case 4:
|
||||
$timeout = (float)$argv[3];
|
||||
case 3:
|
||||
$host = $argv[1];
|
||||
$port = (int)$argv[2];
|
||||
break;
|
||||
default:
|
||||
fwrite(STDERR, 'Usage: '.$argv[0].' host port [timeout]'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($timeout < 0) {
|
||||
fwrite(STDERR, 'Timeout must be greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($port < 1) {
|
||||
fwrite(STDERR, 'Port must be an integer greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
$socketTimeout = (float)ini_get('default_socket_timeout');
|
||||
if ($socketTimeout > $timeout) {
|
||||
$socketTimeout = $timeout;
|
||||
}
|
||||
$stopTime = time() + $timeout;
|
||||
do {
|
||||
$sock = @fsockopen($host, $port, $errno, $errstr, $socketTimeout);
|
||||
if ($sock !== false) {
|
||||
fclose($sock);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(0);
|
||||
}
|
||||
sleep(1);
|
||||
fwrite(STDOUT, '.');
|
||||
} while (time() < $stopTime);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(1);
|
|
@ -6,7 +6,7 @@ while [ ! -f /var/www/html/bin/daemon.php ]; do
|
|||
done
|
||||
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
|
|
|
@ -117,7 +117,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
if [ "$install" = true ]; then
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
|
||||
echo "Starting Friendica installation ..."
|
||||
run_as "php /var/www/html/bin/console.php autoinstall $install_options"
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/local/bin/php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This script tries to connect to a database for a given interval
|
||||
* Useful in case of installation e.g. to wait for the database to not generate unnecessary errors
|
||||
*
|
||||
* Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}]
|
||||
*/
|
||||
|
||||
$timeout = 60;
|
||||
switch ($argc) {
|
||||
case 4:
|
||||
$timeout = (float)$argv[3];
|
||||
case 3:
|
||||
$host = $argv[1];
|
||||
$port = (int)$argv[2];
|
||||
break;
|
||||
default:
|
||||
fwrite(STDERR, 'Usage: '.$argv[0].' host port [timeout]'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($timeout < 0) {
|
||||
fwrite(STDERR, 'Timeout must be greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($port < 1) {
|
||||
fwrite(STDERR, 'Port must be an integer greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
$socketTimeout = (float)ini_get('default_socket_timeout');
|
||||
if ($socketTimeout > $timeout) {
|
||||
$socketTimeout = $timeout;
|
||||
}
|
||||
$stopTime = time() + $timeout;
|
||||
do {
|
||||
$sock = @fsockopen($host, $port, $errno, $errstr, $socketTimeout);
|
||||
if ($sock !== false) {
|
||||
fclose($sock);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(0);
|
||||
}
|
||||
sleep(1);
|
||||
fwrite(STDOUT, '.');
|
||||
} while (time() < $stopTime);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(1);
|
|
@ -6,7 +6,7 @@ while [ ! -f /var/www/html/bin/daemon.php ]; do
|
|||
done
|
||||
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
|
|
|
@ -117,7 +117,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
if [ "$install" = true ]; then
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
|
||||
echo "Starting Friendica installation ..."
|
||||
run_as "php /var/www/html/bin/console.php autoinstall $install_options"
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/local/bin/php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This script tries to connect to a database for a given interval
|
||||
* Useful in case of installation e.g. to wait for the database to not generate unnecessary errors
|
||||
*
|
||||
* Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}]
|
||||
*/
|
||||
|
||||
$timeout = 60;
|
||||
switch ($argc) {
|
||||
case 4:
|
||||
$timeout = (float)$argv[3];
|
||||
case 3:
|
||||
$host = $argv[1];
|
||||
$port = (int)$argv[2];
|
||||
break;
|
||||
default:
|
||||
fwrite(STDERR, 'Usage: '.$argv[0].' host port [timeout]'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($timeout < 0) {
|
||||
fwrite(STDERR, 'Timeout must be greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($port < 1) {
|
||||
fwrite(STDERR, 'Port must be an integer greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
$socketTimeout = (float)ini_get('default_socket_timeout');
|
||||
if ($socketTimeout > $timeout) {
|
||||
$socketTimeout = $timeout;
|
||||
}
|
||||
$stopTime = time() + $timeout;
|
||||
do {
|
||||
$sock = @fsockopen($host, $port, $errno, $errstr, $socketTimeout);
|
||||
if ($sock !== false) {
|
||||
fclose($sock);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(0);
|
||||
}
|
||||
sleep(1);
|
||||
fwrite(STDOUT, '.');
|
||||
} while (time() < $stopTime);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(1);
|
|
@ -6,7 +6,7 @@ while [ ! -f /var/www/html/bin/daemon.php ]; do
|
|||
done
|
||||
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
|
|
|
@ -117,7 +117,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
if [ "$install" = true ]; then
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
|
||||
echo "Starting Friendica installation ..."
|
||||
run_as "php /var/www/html/bin/console.php autoinstall $install_options"
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/local/bin/php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This script tries to connect to a database for a given interval
|
||||
* Useful in case of installation e.g. to wait for the database to not generate unnecessary errors
|
||||
*
|
||||
* Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}]
|
||||
*/
|
||||
|
||||
$timeout = 60;
|
||||
switch ($argc) {
|
||||
case 4:
|
||||
$timeout = (float)$argv[3];
|
||||
case 3:
|
||||
$host = $argv[1];
|
||||
$port = (int)$argv[2];
|
||||
break;
|
||||
default:
|
||||
fwrite(STDERR, 'Usage: '.$argv[0].' host port [timeout]'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($timeout < 0) {
|
||||
fwrite(STDERR, 'Timeout must be greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
if ($port < 1) {
|
||||
fwrite(STDERR, 'Port must be an integer greater than zero'."\n");
|
||||
exit(2);
|
||||
}
|
||||
$socketTimeout = (float)ini_get('default_socket_timeout');
|
||||
if ($socketTimeout > $timeout) {
|
||||
$socketTimeout = $timeout;
|
||||
}
|
||||
$stopTime = time() + $timeout;
|
||||
do {
|
||||
$sock = @fsockopen($host, $port, $errno, $errstr, $socketTimeout);
|
||||
if ($sock !== false) {
|
||||
fclose($sock);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(0);
|
||||
}
|
||||
sleep(1);
|
||||
fwrite(STDOUT, '.');
|
||||
} while (time() < $stopTime);
|
||||
fwrite(STDOUT, "\n");
|
||||
exit(1);
|
|
@ -6,7 +6,7 @@ while [ ! -f /var/www/html/bin/daemon.php ]; do
|
|||
done
|
||||
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
|
|
|
@ -117,7 +117,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
|||
|
||||
if [ "$install" = true ]; then
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
|
||||
echo "Starting Friendica installation ..."
|
||||
run_as "php /var/www/html/bin/console.php autoinstall $install_options"
|
||||
|
|
|
@ -6,7 +6,7 @@ while [ ! -f /var/www/html/bin/daemon.php ]; do
|
|||
done
|
||||
|
||||
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
||||
if /var/www/html/bin//wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
if /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
||||
exec php /var/www/html/bin/daemon.php -f start
|
||||
else
|
||||
echo "[ERROR] Waited 300 seconds, no response" >&2
|
||||
|
|
|
@ -135,7 +135,6 @@ function create_variant() {
|
|||
cp upgrade.exclude "$dir/"
|
||||
|
||||
cp -rT .config "$dir/config"
|
||||
cp -rT .bin "$dir/bin"
|
||||
|
||||
travisEnvAmd64='\n - env: VERSION='"$dockerName"' VARIANT='"$variant"' ARCH=amd64'"$travisEnvAmd64"
|
||||
for arch in i386 amd64; do
|
||||
|
|
Loading…
Reference in a new issue