Remove webhook maintenance mode replay feature (#7455)
This commit is contained in:
commit
b59bf454b9
16 changed files with 6 additions and 255 deletions
|
|
@ -5389,7 +5389,6 @@ ### 🚀 Features
|
||||||
- Add static ipv4 ipv6 support
|
- Add static ipv4 ipv6 support
|
||||||
- Server disabled by overflow
|
- Server disabled by overflow
|
||||||
- Preview deployment logs
|
- Preview deployment logs
|
||||||
- Collect webhooks during maintenance
|
|
||||||
- Logs and execute commands with several servers
|
- Logs and execute commands with several servers
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
namespace App\Http\Controllers\Webhook;
|
namespace App\Http\Controllers\Webhook;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Livewire\Project\Service\Storage;
|
|
||||||
use App\Models\Application;
|
use App\Models\Application;
|
||||||
use App\Models\ApplicationPreview;
|
use App\Models\ApplicationPreview;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
|
@ -15,23 +14,6 @@ class Bitbucket extends Controller
|
||||||
public function manual(Request $request)
|
public function manual(Request $request)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (app()->isDownForMaintenance()) {
|
|
||||||
$epoch = now()->valueOf();
|
|
||||||
$data = [
|
|
||||||
'attributes' => $request->attributes->all(),
|
|
||||||
'request' => $request->request->all(),
|
|
||||||
'query' => $request->query->all(),
|
|
||||||
'server' => $request->server->all(),
|
|
||||||
'files' => $request->files->all(),
|
|
||||||
'cookies' => $request->cookies->all(),
|
|
||||||
'headers' => $request->headers->all(),
|
|
||||||
'content' => $request->getContent(),
|
|
||||||
];
|
|
||||||
$json = json_encode($data);
|
|
||||||
Storage::disk('webhooks-during-maintenance')->put("{$epoch}_Bitbicket::manual_bitbucket", $json);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$return_payloads = collect([]);
|
$return_payloads = collect([]);
|
||||||
$payload = $request->collect();
|
$payload = $request->collect();
|
||||||
$headers = $request->headers->all();
|
$headers = $request->headers->all();
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
use App\Models\ApplicationPreview;
|
use App\Models\ApplicationPreview;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Visus\Cuid2\Cuid2;
|
use Visus\Cuid2\Cuid2;
|
||||||
|
|
||||||
|
|
@ -18,30 +17,6 @@ public function manual(Request $request)
|
||||||
try {
|
try {
|
||||||
$return_payloads = collect([]);
|
$return_payloads = collect([]);
|
||||||
$x_gitea_delivery = request()->header('X-Gitea-Delivery');
|
$x_gitea_delivery = request()->header('X-Gitea-Delivery');
|
||||||
if (app()->isDownForMaintenance()) {
|
|
||||||
$epoch = now()->valueOf();
|
|
||||||
$files = Storage::disk('webhooks-during-maintenance')->files();
|
|
||||||
$gitea_delivery_found = collect($files)->filter(function ($file) use ($x_gitea_delivery) {
|
|
||||||
return Str::contains($file, $x_gitea_delivery);
|
|
||||||
})->first();
|
|
||||||
if ($gitea_delivery_found) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$data = [
|
|
||||||
'attributes' => $request->attributes->all(),
|
|
||||||
'request' => $request->request->all(),
|
|
||||||
'query' => $request->query->all(),
|
|
||||||
'server' => $request->server->all(),
|
|
||||||
'files' => $request->files->all(),
|
|
||||||
'cookies' => $request->cookies->all(),
|
|
||||||
'headers' => $request->headers->all(),
|
|
||||||
'content' => $request->getContent(),
|
|
||||||
];
|
|
||||||
$json = json_encode($data);
|
|
||||||
Storage::disk('webhooks-during-maintenance')->put("{$epoch}_Gitea::manual_{$x_gitea_delivery}", $json);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$x_gitea_event = Str::lower($request->header('X-Gitea-Event'));
|
$x_gitea_event = Str::lower($request->header('X-Gitea-Event'));
|
||||||
$x_hub_signature_256 = Str::after($request->header('X-Hub-Signature-256'), 'sha256=');
|
$x_hub_signature_256 = Str::after($request->header('X-Hub-Signature-256'), 'sha256=');
|
||||||
$content_type = $request->header('Content-Type');
|
$content_type = $request->header('Content-Type');
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Visus\Cuid2\Cuid2;
|
use Visus\Cuid2\Cuid2;
|
||||||
|
|
||||||
|
|
@ -25,30 +24,6 @@ public function manual(Request $request)
|
||||||
try {
|
try {
|
||||||
$return_payloads = collect([]);
|
$return_payloads = collect([]);
|
||||||
$x_github_delivery = request()->header('X-GitHub-Delivery');
|
$x_github_delivery = request()->header('X-GitHub-Delivery');
|
||||||
if (app()->isDownForMaintenance()) {
|
|
||||||
$epoch = now()->valueOf();
|
|
||||||
$files = Storage::disk('webhooks-during-maintenance')->files();
|
|
||||||
$github_delivery_found = collect($files)->filter(function ($file) use ($x_github_delivery) {
|
|
||||||
return Str::contains($file, $x_github_delivery);
|
|
||||||
})->first();
|
|
||||||
if ($github_delivery_found) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$data = [
|
|
||||||
'attributes' => $request->attributes->all(),
|
|
||||||
'request' => $request->request->all(),
|
|
||||||
'query' => $request->query->all(),
|
|
||||||
'server' => $request->server->all(),
|
|
||||||
'files' => $request->files->all(),
|
|
||||||
'cookies' => $request->cookies->all(),
|
|
||||||
'headers' => $request->headers->all(),
|
|
||||||
'content' => $request->getContent(),
|
|
||||||
];
|
|
||||||
$json = json_encode($data);
|
|
||||||
Storage::disk('webhooks-during-maintenance')->put("{$epoch}_Github::manual_{$x_github_delivery}", $json);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$x_github_event = Str::lower($request->header('X-GitHub-Event'));
|
$x_github_event = Str::lower($request->header('X-GitHub-Event'));
|
||||||
$x_hub_signature_256 = Str::after($request->header('X-Hub-Signature-256'), 'sha256=');
|
$x_hub_signature_256 = Str::after($request->header('X-Hub-Signature-256'), 'sha256=');
|
||||||
$content_type = $request->header('Content-Type');
|
$content_type = $request->header('Content-Type');
|
||||||
|
|
@ -310,30 +285,6 @@ public function normal(Request $request)
|
||||||
$return_payloads = collect([]);
|
$return_payloads = collect([]);
|
||||||
$id = null;
|
$id = null;
|
||||||
$x_github_delivery = $request->header('X-GitHub-Delivery');
|
$x_github_delivery = $request->header('X-GitHub-Delivery');
|
||||||
if (app()->isDownForMaintenance()) {
|
|
||||||
$epoch = now()->valueOf();
|
|
||||||
$files = Storage::disk('webhooks-during-maintenance')->files();
|
|
||||||
$github_delivery_found = collect($files)->filter(function ($file) use ($x_github_delivery) {
|
|
||||||
return Str::contains($file, $x_github_delivery);
|
|
||||||
})->first();
|
|
||||||
if ($github_delivery_found) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$data = [
|
|
||||||
'attributes' => $request->attributes->all(),
|
|
||||||
'request' => $request->request->all(),
|
|
||||||
'query' => $request->query->all(),
|
|
||||||
'server' => $request->server->all(),
|
|
||||||
'files' => $request->files->all(),
|
|
||||||
'cookies' => $request->cookies->all(),
|
|
||||||
'headers' => $request->headers->all(),
|
|
||||||
'content' => $request->getContent(),
|
|
||||||
];
|
|
||||||
$json = json_encode($data);
|
|
||||||
Storage::disk('webhooks-during-maintenance')->put("{$epoch}_Github::normal_{$x_github_delivery}", $json);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$x_github_event = Str::lower($request->header('X-GitHub-Event'));
|
$x_github_event = Str::lower($request->header('X-GitHub-Event'));
|
||||||
$x_github_hook_installation_target_id = $request->header('X-GitHub-Hook-Installation-Target-Id');
|
$x_github_hook_installation_target_id = $request->header('X-GitHub-Hook-Installation-Target-Id');
|
||||||
$x_hub_signature_256 = Str::after($request->header('X-Hub-Signature-256'), 'sha256=');
|
$x_hub_signature_256 = Str::after($request->header('X-Hub-Signature-256'), 'sha256=');
|
||||||
|
|
@ -624,23 +575,6 @@ public function install(Request $request)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$installation_id = $request->get('installation_id');
|
$installation_id = $request->get('installation_id');
|
||||||
if (app()->isDownForMaintenance()) {
|
|
||||||
$epoch = now()->valueOf();
|
|
||||||
$data = [
|
|
||||||
'attributes' => $request->attributes->all(),
|
|
||||||
'request' => $request->request->all(),
|
|
||||||
'query' => $request->query->all(),
|
|
||||||
'server' => $request->server->all(),
|
|
||||||
'files' => $request->files->all(),
|
|
||||||
'cookies' => $request->cookies->all(),
|
|
||||||
'headers' => $request->headers->all(),
|
|
||||||
'content' => $request->getContent(),
|
|
||||||
];
|
|
||||||
$json = json_encode($data);
|
|
||||||
Storage::disk('webhooks-during-maintenance')->put("{$epoch}_Github::install_{$installation_id}", $json);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$source = $request->get('source');
|
$source = $request->get('source');
|
||||||
$setup_action = $request->get('setup_action');
|
$setup_action = $request->get('setup_action');
|
||||||
$github_app = GithubApp::where('uuid', $source)->firstOrFail();
|
$github_app = GithubApp::where('uuid', $source)->firstOrFail();
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
use App\Models\ApplicationPreview;
|
use App\Models\ApplicationPreview;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Visus\Cuid2\Cuid2;
|
use Visus\Cuid2\Cuid2;
|
||||||
|
|
||||||
|
|
@ -16,24 +15,6 @@ class Gitlab extends Controller
|
||||||
public function manual(Request $request)
|
public function manual(Request $request)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (app()->isDownForMaintenance()) {
|
|
||||||
$epoch = now()->valueOf();
|
|
||||||
$data = [
|
|
||||||
'attributes' => $request->attributes->all(),
|
|
||||||
'request' => $request->request->all(),
|
|
||||||
'query' => $request->query->all(),
|
|
||||||
'server' => $request->server->all(),
|
|
||||||
'files' => $request->files->all(),
|
|
||||||
'cookies' => $request->cookies->all(),
|
|
||||||
'headers' => $request->headers->all(),
|
|
||||||
'content' => $request->getContent(),
|
|
||||||
];
|
|
||||||
$json = json_encode($data);
|
|
||||||
Storage::disk('webhooks-during-maintenance')->put("{$epoch}_Gitlab::manual_gitlab", $json);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$return_payloads = collect([]);
|
$return_payloads = collect([]);
|
||||||
$payload = $request->collect();
|
$payload = $request->collect();
|
||||||
$headers = $request->headers->all();
|
$headers = $request->headers->all();
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
use App\Jobs\StripeProcessJob;
|
use App\Jobs\StripeProcessJob;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
|
|
||||||
class Stripe extends Controller
|
class Stripe extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -20,23 +19,6 @@ public function events(Request $request)
|
||||||
$signature,
|
$signature,
|
||||||
$webhookSecret
|
$webhookSecret
|
||||||
);
|
);
|
||||||
if (app()->isDownForMaintenance()) {
|
|
||||||
$epoch = now()->valueOf();
|
|
||||||
$data = [
|
|
||||||
'attributes' => $request->attributes->all(),
|
|
||||||
'request' => $request->request->all(),
|
|
||||||
'query' => $request->query->all(),
|
|
||||||
'server' => $request->server->all(),
|
|
||||||
'files' => $request->files->all(),
|
|
||||||
'cookies' => $request->cookies->all(),
|
|
||||||
'headers' => $request->headers->all(),
|
|
||||||
'content' => $request->getContent(),
|
|
||||||
];
|
|
||||||
$json = json_encode($data);
|
|
||||||
Storage::disk('webhooks-during-maintenance')->put("{$epoch}_Stripe::events_stripe", $json);
|
|
||||||
|
|
||||||
return response('Webhook received. Cool cool cool cool cool.', 200);
|
|
||||||
}
|
|
||||||
StripeProcessJob::dispatch($event);
|
StripeProcessJob::dispatch($event);
|
||||||
|
|
||||||
return response('Webhook received. Cool cool cool cool cool.', 200);
|
return response('Webhook received. Cool cool cool cool cool.', 200);
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Listeners;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Events\MaintenanceModeDisabled as EventsMaintenanceModeDisabled;
|
|
||||||
use Illuminate\Support\Facades\Request;
|
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
|
|
||||||
|
|
||||||
class MaintenanceModeDisabledNotification
|
|
||||||
{
|
|
||||||
public function __construct() {}
|
|
||||||
|
|
||||||
public function handle(EventsMaintenanceModeDisabled $event): void
|
|
||||||
{
|
|
||||||
$files = Storage::disk('webhooks-during-maintenance')->files();
|
|
||||||
$files = collect($files);
|
|
||||||
$files = $files->sort();
|
|
||||||
foreach ($files as $file) {
|
|
||||||
$content = Storage::disk('webhooks-during-maintenance')->get($file);
|
|
||||||
$data = json_decode($content, true);
|
|
||||||
$symfonyRequest = new SymfonyRequest(
|
|
||||||
$data['query'],
|
|
||||||
$data['request'],
|
|
||||||
$data['attributes'],
|
|
||||||
$data['cookies'],
|
|
||||||
$data['files'],
|
|
||||||
$data['server'],
|
|
||||||
$data['content']
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ($data['headers'] as $key => $value) {
|
|
||||||
$symfonyRequest->headers->set($key, $value);
|
|
||||||
}
|
|
||||||
$request = Request::createFromBase($symfonyRequest);
|
|
||||||
$endpoint = str($file)->after('_')->beforeLast('_')->value();
|
|
||||||
$class = "App\Http\Controllers\Webhook\\".ucfirst(str($endpoint)->before('::')->value());
|
|
||||||
$method = str($endpoint)->after('::')->value();
|
|
||||||
try {
|
|
||||||
$instance = new $class;
|
|
||||||
$instance->$method($request);
|
|
||||||
} catch (\Throwable $th) {
|
|
||||||
} finally {
|
|
||||||
Storage::disk('webhooks-during-maintenance')->delete($file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Listeners;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Events\MaintenanceModeEnabled as EventsMaintenanceModeEnabled;
|
|
||||||
|
|
||||||
class MaintenanceModeEnabledNotification
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Create the event listener.
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle the event.
|
|
||||||
*/
|
|
||||||
public function handle(EventsMaintenanceModeEnabled $event): void {}
|
|
||||||
}
|
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use App\Listeners\MaintenanceModeDisabledNotification;
|
|
||||||
use App\Listeners\MaintenanceModeEnabledNotification;
|
|
||||||
use Illuminate\Foundation\Events\MaintenanceModeDisabled;
|
|
||||||
use Illuminate\Foundation\Events\MaintenanceModeEnabled;
|
|
||||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
use SocialiteProviders\Authentik\AuthentikExtendSocialite;
|
use SocialiteProviders\Authentik\AuthentikExtendSocialite;
|
||||||
use SocialiteProviders\Azure\AzureExtendSocialite;
|
use SocialiteProviders\Azure\AzureExtendSocialite;
|
||||||
|
|
@ -19,12 +15,6 @@
|
||||||
class EventServiceProvider extends ServiceProvider
|
class EventServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
protected $listen = [
|
protected $listen = [
|
||||||
MaintenanceModeEnabled::class => [
|
|
||||||
MaintenanceModeEnabledNotification::class,
|
|
||||||
],
|
|
||||||
MaintenanceModeDisabled::class => [
|
|
||||||
MaintenanceModeDisabledNotification::class,
|
|
||||||
],
|
|
||||||
SocialiteWasCalled::class => [
|
SocialiteWasCalled::class => [
|
||||||
AzureExtendSocialite::class.'@handle',
|
AzureExtendSocialite::class.'@handle',
|
||||||
AuthentikExtendSocialite::class.'@handle',
|
AuthentikExtendSocialite::class.'@handle',
|
||||||
|
|
|
||||||
|
|
@ -35,13 +35,6 @@
|
||||||
'throw' => false,
|
'throw' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'webhooks-during-maintenance' => [
|
|
||||||
'driver' => 'local',
|
|
||||||
'root' => storage_path('app/webhooks-during-maintenance'),
|
|
||||||
'visibility' => 'private',
|
|
||||||
'throw' => false,
|
|
||||||
],
|
|
||||||
|
|
||||||
'public' => [
|
'public' => [
|
||||||
'driver' => 'local',
|
'driver' => 'local',
|
||||||
'root' => storage_path('app/public'),
|
'root' => storage_path('app/public'),
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ services:
|
||||||
- /data/coolify/databases:/var/www/html/storage/app/databases
|
- /data/coolify/databases:/var/www/html/storage/app/databases
|
||||||
- /data/coolify/services:/var/www/html/storage/app/services
|
- /data/coolify/services:/var/www/html/storage/app/services
|
||||||
- /data/coolify/backups:/var/www/html/storage/app/backups
|
- /data/coolify/backups:/var/www/html/storage/app/backups
|
||||||
- /data/coolify/webhooks-during-maintenance:/var/www/html/storage/app/webhooks-during-maintenance
|
|
||||||
environment:
|
environment:
|
||||||
- APP_ENV=${APP_ENV:-production}
|
- APP_ENV=${APP_ENV:-production}
|
||||||
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-256M}
|
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-256M}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ services:
|
||||||
- ./databases:/var/www/html/storage/app/databases
|
- ./databases:/var/www/html/storage/app/databases
|
||||||
- ./services:/var/www/html/storage/app/services
|
- ./services:/var/www/html/storage/app/services
|
||||||
- ./backups:/var/www/html/storage/app/backups
|
- ./backups:/var/www/html/storage/app/backups
|
||||||
- ./webhooks-during-maintenance:/var/www/html/storage/app/webhooks-during-maintenance
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -75,13 +74,7 @@ services:
|
||||||
POSTGRES_PASSWORD: "${DB_PASSWORD}"
|
POSTGRES_PASSWORD: "${DB_PASSWORD}"
|
||||||
POSTGRES_DB: "${DB_DATABASE:-coolify}"
|
POSTGRES_DB: "${DB_DATABASE:-coolify}"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}", "-d", "${DB_DATABASE:-coolify}" ]
|
||||||
[
|
|
||||||
"CMD-SHELL",
|
|
||||||
"pg_isready -U ${DB_USERNAME}",
|
|
||||||
"-d",
|
|
||||||
"${DB_DATABASE:-coolify}"
|
|
||||||
]
|
|
||||||
interval: 5s
|
interval: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
|
|
@ -121,7 +114,7 @@ services:
|
||||||
SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY}"
|
SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY}"
|
||||||
SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET}"
|
SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET}"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:6001/ready && wget -qO- http://127.0.0.1:6002/ready || exit 1"]
|
test: [ "CMD-SHELL", "wget -qO- http://127.0.0.1:6001/ready && wget -qO- http://127.0.0.1:6002/ready || exit 1" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ services:
|
||||||
- /data/coolify/databases:/var/www/html/storage/app/databases
|
- /data/coolify/databases:/var/www/html/storage/app/databases
|
||||||
- /data/coolify/services:/var/www/html/storage/app/services
|
- /data/coolify/services:/var/www/html/storage/app/services
|
||||||
- /data/coolify/backups:/var/www/html/storage/app/backups
|
- /data/coolify/backups:/var/www/html/storage/app/backups
|
||||||
- /data/coolify/webhooks-during-maintenance:/var/www/html/storage/app/webhooks-during-maintenance
|
|
||||||
environment:
|
environment:
|
||||||
- APP_ENV=${APP_ENV:-production}
|
- APP_ENV=${APP_ENV:-production}
|
||||||
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-256M}
|
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-256M}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ services:
|
||||||
- ./databases:/var/www/html/storage/app/databases
|
- ./databases:/var/www/html/storage/app/databases
|
||||||
- ./services:/var/www/html/storage/app/services
|
- ./services:/var/www/html/storage/app/services
|
||||||
- ./backups:/var/www/html/storage/app/backups
|
- ./backups:/var/www/html/storage/app/backups
|
||||||
- ./webhooks-during-maintenance:/var/www/html/storage/app/webhooks-during-maintenance
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -75,13 +74,7 @@ services:
|
||||||
POSTGRES_PASSWORD: "${DB_PASSWORD}"
|
POSTGRES_PASSWORD: "${DB_PASSWORD}"
|
||||||
POSTGRES_DB: "${DB_DATABASE:-coolify}"
|
POSTGRES_DB: "${DB_DATABASE:-coolify}"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}", "-d", "${DB_DATABASE:-coolify}" ]
|
||||||
[
|
|
||||||
"CMD-SHELL",
|
|
||||||
"pg_isready -U ${DB_USERNAME}",
|
|
||||||
"-d",
|
|
||||||
"${DB_DATABASE:-coolify}"
|
|
||||||
]
|
|
||||||
interval: 5s
|
interval: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
|
|
@ -121,7 +114,7 @@ services:
|
||||||
SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY}"
|
SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY}"
|
||||||
SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET}"
|
SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET}"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:6001/ready && wget -qO- http://127.0.0.1:6002/ready || exit 1"]
|
test: [ "CMD-SHELL", "wget -qO- http://127.0.0.1:6001/ready && wget -qO- http://127.0.0.1:6002/ready || exit 1" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ if [ "$WARNING_SPACE" = true ]; then
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p /data/coolify/{source,ssh,applications,databases,backups,services,proxy,webhooks-during-maintenance,sentinel}
|
mkdir -p /data/coolify/{source,ssh,applications,databases,backups,services,proxy,sentinel}
|
||||||
mkdir -p /data/coolify/ssh/{keys,mux}
|
mkdir -p /data/coolify/ssh/{keys,mux}
|
||||||
mkdir -p /data/coolify/proxy/dynamic
|
mkdir -p /data/coolify/proxy/dynamic
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ if [ "$WARNING_SPACE" = true ]; then
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p /data/coolify/{source,ssh,applications,databases,backups,services,proxy,webhooks-during-maintenance,sentinel}
|
mkdir -p /data/coolify/{source,ssh,applications,databases,backups,services,proxy,sentinel}
|
||||||
mkdir -p /data/coolify/ssh/{keys,mux}
|
mkdir -p /data/coolify/ssh/{keys,mux}
|
||||||
mkdir -p /data/coolify/proxy/dynamic
|
mkdir -p /data/coolify/proxy/dynamic
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue