This commit is contained in:
Andras Bacsai 2023-05-26 09:45:18 +02:00
parent 6f50f857c6
commit c5a40926e3
5 changed files with 9 additions and 3 deletions

View File

@ -19,7 +19,8 @@ protected function schedule(Schedule $schedule): void
$schedule->job(new InstanceDockerCleanupJob)->everyFiveMinutes();
$schedule->job(new InstanceAutoUpdateJob)->everyFifteenMinutes();
$schedule->job(new InstanceProxyCheckJob)->everyMinute();
// Disabled for now, added oom_kill_disable: true to docker-compose.yml
// $schedule->job(new InstanceProxyCheckJob)->everyMinute();
}
/**

View File

@ -3,6 +3,7 @@
namespace App\Jobs;
use App\Actions\Proxy\InstallProxy;
use App\Enums\ProxyTypes;
use App\Models\Server;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
@ -29,7 +30,7 @@ public function handle()
try {
$container_name = 'coolify-proxy';
$configuration_path = config('coolify.proxy_config_path');
$servers = Server::whereRelation('settings', 'is_validated', true)->get();
$servers = Server::whereRelation('settings', 'is_validated', true)->where('extra_attributes->proxy_type', ProxyTypes::TRAEFIK_V2)->get();
foreach ($servers as $server) {
$status = get_container_status(server: $server, container_id: $container_name);

View File

@ -27,6 +27,7 @@ function getProxyConfiguration(Server $server)
"networks" => $array_of_networks->toArray(),
"services" => [
"traefik" => [
"oom_kill_disable" => true,
"container_name" => "coolify-proxy",
"image" => "traefik:v2.10",
"restart" => "always",

View File

@ -1,6 +1,7 @@
version: '3.8'
services:
coolify:
oom_kill_disable: true
image: "ghcr.io/coollabsio/coolify:${LATEST_IMAGE:-4.0.0-nightly.0}"
volumes:
- type: bind
@ -41,6 +42,7 @@ services:
postgres:
condition: service_healthy
postgres:
oom_kill_disable: true
volumes:
- coolify-db:/var/lib/postgresql/data
environment:
@ -59,6 +61,7 @@ services:
retries: 5
timeout: 2s
redis:
oom_kill_disable: true
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
environment:
REDIS_PASSWORD: "${REDIS_PASSWORD}"

View File

@ -27,4 +27,4 @@ RUN echo "alias a='php artisan'" >>/etc/bash.bashrc
RUN echo "alias mfs='php artisan migrate:fresh --seed'" >>/etc/bash.bashrc
RUN echo "alias cda='composer dump-autoload'" >>/etc/bash.bashrc
RUN echo "alias run='./scripts/run'" >>/etc/bash.bashrc
RUN echo "alias logs='logs -f storage/logs/laravel.log'" >>/etc/bash.bashrc
RUN echo "alias logs='tail -f storage/logs/laravel.log'" >>/etc/bash.bashrc