put a few things on high queue
This commit is contained in:
@@ -49,7 +49,7 @@ class StartDatabase
|
||||
break;
|
||||
}
|
||||
if ($database->is_public && $database->public_port) {
|
||||
StartDatabaseProxy::dispatch($database);
|
||||
StartDatabaseProxy::dispatch($database)->onQueue('high');
|
||||
}
|
||||
|
||||
return $activity;
|
||||
|
||||
@@ -12,11 +12,11 @@ class InstallDocker
|
||||
|
||||
public function handle(Server $server)
|
||||
{
|
||||
$dockerVersion = config('constants.docker_install_version');
|
||||
$supported_os_type = $server->validateOS();
|
||||
if (! $supported_os_type) {
|
||||
throw new \Exception('Server OS type is not supported for automated installation. Please install Docker manually before continuing: <a target="_blank" class="underline" href="https://coolify.io/docs/installation#manually">documentation</a>.');
|
||||
}
|
||||
$dockerVersion = '26.0';
|
||||
$config = base64_encode('{
|
||||
"log-driver": "json-file",
|
||||
"log-opts": {
|
||||
|
||||
@@ -130,10 +130,10 @@ class ServerCheck
|
||||
if ($foundLogDrainContainer) {
|
||||
$status = data_get($foundLogDrainContainer, 'State.Status');
|
||||
if ($status !== 'running') {
|
||||
StartLogDrain::dispatch($this->server);
|
||||
StartLogDrain::dispatch($this->server)->onQueue('high');
|
||||
}
|
||||
} else {
|
||||
StartLogDrain::dispatch($this->server);
|
||||
StartLogDrain::dispatch($this->server)->onQueue('high');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class Init extends Command
|
||||
$server->settings->update(['is_metrics_enabled' => false]);
|
||||
}
|
||||
if ($server->isFunctional()) {
|
||||
StopSentinel::dispatch($server);
|
||||
StopSentinel::dispatch($server)->onQueue('high');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ class ServicesDelete extends Command
|
||||
if (! $confirmed) {
|
||||
break;
|
||||
}
|
||||
DeleteResourceJob::dispatch($toDelete);
|
||||
DeleteResourceJob::dispatch($toDelete)->onQueue('high');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,7 @@ class ServicesDelete extends Command
|
||||
if (! $confirmed) {
|
||||
return;
|
||||
}
|
||||
DeleteResourceJob::dispatch($toDelete);
|
||||
DeleteResourceJob::dispatch($toDelete)->onQueue('high');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ class ServicesDelete extends Command
|
||||
if (! $confirmed) {
|
||||
return;
|
||||
}
|
||||
DeleteResourceJob::dispatch($toDelete);
|
||||
DeleteResourceJob::dispatch($toDelete)->onQueue('high');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1358,7 +1358,7 @@ class ApplicationsController extends Controller
|
||||
deleteVolumes: $request->query->get('delete_volumes', true),
|
||||
dockerCleanup: $request->query->get('docker_cleanup', true),
|
||||
deleteConnectedNetworks: $request->query->get('delete_connected_networks', true)
|
||||
);
|
||||
)->onQueue('high');
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Application deletion request queued.',
|
||||
@@ -2482,7 +2482,7 @@ class ApplicationsController extends Controller
|
||||
if (! $application) {
|
||||
return response()->json(['message' => 'Application not found.'], 404);
|
||||
}
|
||||
StopApplication::dispatch($application);
|
||||
StopApplication::dispatch($application)->onQueue('high');
|
||||
|
||||
return response()->json(
|
||||
[
|
||||
|
||||
@@ -497,9 +497,9 @@ class DatabasesController extends Controller
|
||||
$database->update($request->all());
|
||||
|
||||
if ($whatToDoWithDatabaseProxy === 'start') {
|
||||
StartDatabaseProxy::dispatch($database);
|
||||
StartDatabaseProxy::dispatch($database)->onQueue('high');
|
||||
} elseif ($whatToDoWithDatabaseProxy === 'stop') {
|
||||
StopDatabaseProxy::dispatch($database);
|
||||
StopDatabaseProxy::dispatch($database)->onQueue('high');
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
@@ -1593,7 +1593,7 @@ class DatabasesController extends Controller
|
||||
deleteVolumes: $request->query->get('delete_volumes', true),
|
||||
dockerCleanup: $request->query->get('docker_cleanup', true),
|
||||
deleteConnectedNetworks: $request->query->get('delete_connected_networks', true)
|
||||
);
|
||||
)->onQueue('high');
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Database deletion request queued.',
|
||||
@@ -1742,7 +1742,7 @@ class DatabasesController extends Controller
|
||||
if (str($database->status)->contains('stopped') || str($database->status)->contains('exited')) {
|
||||
return response()->json(['message' => 'Database is already stopped.'], 400);
|
||||
}
|
||||
StopDatabase::dispatch($database);
|
||||
StopDatabase::dispatch($database)->onQueue('high');
|
||||
|
||||
return response()->json(
|
||||
[
|
||||
|
||||
@@ -538,7 +538,7 @@ class ServersController extends Controller
|
||||
'is_build_server' => $request->is_build_server,
|
||||
]);
|
||||
if ($request->instant_validate) {
|
||||
ValidateServer::dispatch($server);
|
||||
ValidateServer::dispatch($server)->onQueue('high');
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
@@ -651,7 +651,7 @@ class ServersController extends Controller
|
||||
]);
|
||||
}
|
||||
if ($request->instant_validate) {
|
||||
ValidateServer::dispatch($server);
|
||||
ValidateServer::dispatch($server)->onQueue('high');
|
||||
}
|
||||
|
||||
return response()->json(serializeApiResponse($server))->setStatusCode(201);
|
||||
@@ -787,7 +787,7 @@ class ServersController extends Controller
|
||||
if (! $server) {
|
||||
return response()->json(['message' => 'Server not found.'], 404);
|
||||
}
|
||||
ValidateServer::dispatch($server);
|
||||
ValidateServer::dispatch($server)->onQueue('high');
|
||||
|
||||
return response()->json(['message' => 'Validation started.']);
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ class ServicesController extends Controller
|
||||
deleteVolumes: $request->query->get('delete_volumes', true),
|
||||
dockerCleanup: $request->query->get('docker_cleanup', true),
|
||||
deleteConnectedNetworks: $request->query->get('delete_connected_networks', true)
|
||||
);
|
||||
)->onQueue('high');
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Service deletion request queued.',
|
||||
@@ -1154,7 +1154,7 @@ class ServicesController extends Controller
|
||||
if (str($service->status())->contains('stopped') || str($service->status())->contains('exited')) {
|
||||
return response()->json(['message' => 'Service is already stopped.'], 400);
|
||||
}
|
||||
StopService::dispatch($service);
|
||||
StopService::dispatch($service)->onQueue('high');
|
||||
|
||||
return response()->json(
|
||||
[
|
||||
|
||||
@@ -360,7 +360,7 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue
|
||||
private function checkLogDrainContainer()
|
||||
{
|
||||
if ($this->server->isLogDrainEnabled() && $this->foundLogDrainContainer === false) {
|
||||
StartLogDrain::dispatch($this->server);
|
||||
StartLogDrain::dispatch($this->server)->onQueue('high');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,10 +94,10 @@ class ServerCheckJob implements ShouldBeEncrypted, ShouldQueue
|
||||
if ($foundLogDrainContainer) {
|
||||
$status = data_get($foundLogDrainContainer, 'State.Status');
|
||||
if ($status !== 'running') {
|
||||
StartLogDrain::dispatch($this->server);
|
||||
StartLogDrain::dispatch($this->server)->onQueue('high');
|
||||
}
|
||||
} else {
|
||||
StartLogDrain::dispatch($this->server);
|
||||
StartLogDrain::dispatch($this->server)->onQueue('high');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'docker_install_version' => '26.0',
|
||||
'docs' => [
|
||||
'base_url' => 'https://coolify.io/docs',
|
||||
'contact' => 'https://coolify.io/docs/contact',
|
||||
|
||||
@@ -5,7 +5,7 @@ set -e # Exit immediately if a command exits with a non-zero status
|
||||
## $1 could be empty, so we need to disable this check
|
||||
#set -u # Treat unset variables as an error and exit
|
||||
set -o pipefail # Cause a pipeline to return the status of the last command that exited with a non-zero status
|
||||
CDN="https://cdn.coollabs.io/coolify-nightly"
|
||||
CDN="https://cdn.coollabs.io/coolify"
|
||||
DATE=$(date +"%Y%m%d-%H%M%S")
|
||||
|
||||
VERSION="1.6"
|
||||
@@ -13,7 +13,7 @@ DOCKER_VERSION="26.0"
|
||||
# TODO: Ask for a user
|
||||
CURRENT_USER=$USER
|
||||
|
||||
mkdir -p /data/coolify/{source,ssh,applications,databases,backups,services,proxy,webhooks-during-maintenance,metrics,logs}
|
||||
mkdir -p /data/coolify/{source,ssh,applications,databases,backups,services,proxy,webhooks-during-maintenance,sentinel}
|
||||
mkdir -p /data/coolify/ssh/{keys,mux}
|
||||
mkdir -p /data/coolify/proxy/dynamic
|
||||
|
||||
@@ -164,7 +164,6 @@ sles | opensuse-leap | opensuse-tumbleweed)
|
||||
esac
|
||||
|
||||
|
||||
|
||||
echo -e "2. Check OpenSSH server configuration. "
|
||||
|
||||
# Detect OpenSSH server
|
||||
@@ -262,9 +261,14 @@ if ! [ -x "$(command -v docker)" ]; then
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
curl -s https://releases.rancher.com/install-docker/${DOCKER_VERSION}.sh | sh >/dev/null 2>&1
|
||||
if [ "$OS_TYPE" = "ubuntu" ] && [ "$OS_VERSION" = "24.10" ]; then
|
||||
echo "Docker automated installation is not supported on Ubuntu 24.10 (non-LTS release)."
|
||||
echo "Please install Docker manually."
|
||||
exit 1
|
||||
fi
|
||||
curl -s https://releases.rancher.com/install-docker/${DOCKER_VERSION}.sh | sh 2>&1
|
||||
if ! [ -x "$(command -v docker)" ]; then
|
||||
curl -s https://get.docker.com | sh -s -- --version ${DOCKER_VERSION} >/dev/null 2>&1
|
||||
curl -s https://get.docker.com | sh -s -- --version ${DOCKER_VERSION} 2>&1
|
||||
if ! [ -x "$(command -v docker)" ]; then
|
||||
echo " - Docker installation failed."
|
||||
echo " Maybe your OS is not supported?"
|
||||
@@ -404,10 +408,10 @@ if [ ! -f ~/.ssh/authorized_keys ]; then
|
||||
fi
|
||||
|
||||
set +e
|
||||
IF_COOLIFY_VOLUME_EXISTS=$(docker volume ls | grep coolify-db | wc -l)
|
||||
IS_COOLIFY_VOLUME_EXISTS=$(docker volume ls | grep coolify-db | wc -l)
|
||||
set -e
|
||||
|
||||
if [ "$IF_COOLIFY_VOLUME_EXISTS" -eq 0 ]; then
|
||||
if [ "$IS_COOLIFY_VOLUME_EXISTS" -eq 0 ]; then
|
||||
echo " - Generating SSH key."
|
||||
ssh-keygen -t ed25519 -a 100 -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal -q -N "" -C coolify
|
||||
chown 9999 /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal
|
||||
@@ -424,7 +428,7 @@ echo -e " - It could take a while based on your server's performance, network sp
|
||||
echo -e " - Please wait."
|
||||
getAJoke
|
||||
|
||||
bash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}" "${LATEST_HELPER_VERSION:-latest}" >/dev/null 2>&1
|
||||
bash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}" "${LATEST_HELPER_VERSION:-latest}"
|
||||
echo " - Coolify installed successfully."
|
||||
rm -f $ENV_FILE-$DATE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user