Merge pull request #1396 from coollabsio/next

v4.0.0-beta.111
This commit is contained in:
Andras Bacsai 2023-11-06 21:08:16 +01:00 committed by GitHub
commit 581cc73cd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 503 additions and 227 deletions

View File

@ -6,6 +6,9 @@ use App\Enums\ApplicationDeploymentStatus;
use App\Models\Application; use App\Models\Application;
use App\Models\ApplicationDeploymentQueue; use App\Models\ApplicationDeploymentQueue;
use App\Models\Service; use App\Models\Service;
use App\Models\ServiceApplication;
use App\Models\ServiceDatabase;
use App\Models\StandaloneMariadb;
use App\Models\StandaloneMongodb; use App\Models\StandaloneMongodb;
use App\Models\StandaloneMysql; use App\Models\StandaloneMysql;
use App\Models\StandalonePostgresql; use App\Models\StandalonePostgresql;
@ -15,15 +18,18 @@ use Illuminate\Support\Facades\Storage;
class Init extends Command class Init extends Command
{ {
protected $signature = 'app:init'; protected $signature = 'app:init {--cleanup}';
protected $description = 'Cleanup instance related stuffs'; protected $description = 'Cleanup instance related stuffs';
public function handle() public function handle()
{ {
ray()->clearAll(); ray()->clearAll();
$this->cleanup_in_progress_application_deployments(); $cleanup = $this->option('cleanup');
if ($cleanup) {
$this->cleanup_stucked_resources(); $this->cleanup_stucked_resources();
// $this->cleanup_ssh(); $this->cleanup_ssh();
}
$this->cleanup_in_progress_application_deployments();
} }
private function cleanup_ssh() private function cleanup_ssh()
@ -38,7 +44,7 @@ class Init extends Command
Storage::delete($file); Storage::delete($file);
} }
} catch (\Throwable $e) { } catch (\Throwable $e) {
echo "Error: {$e->getMessage()}\n"; echo "Error in cleaning ssh: {$e->getMessage()}\n";
} }
} }
private function cleanup_in_progress_application_deployments() private function cleanup_in_progress_application_deployments()
@ -61,77 +67,129 @@ class Init extends Command
try { try {
$applications = Application::all(); $applications = Application::all();
foreach ($applications as $application) { foreach ($applications as $application) {
if (!$application->environment) { if (!data_get($application, 'environment')) {
ray('Application without environment', $application->name); ray('Application without environment', $application->name);
$application->delete(); $application->delete();
} }
if (!data_get($application, 'destination.server')) {
ray('Application without server', $application->name);
$application->delete();
}
if (!$application->destination()) { if (!$application->destination()) {
ray('Application without destination', $application->name); ray('Application without destination', $application->name);
$application->delete(); $application->delete();
} }
} }
} catch (\Throwable $e) {
echo "Error in application: {$e->getMessage()}\n";
}
try {
$postgresqls = StandalonePostgresql::all(); $postgresqls = StandalonePostgresql::all();
foreach ($postgresqls as $postgresql) { foreach ($postgresqls as $postgresql) {
if (!$postgresql->environment) { if (!data_get($postgresql, 'environment')) {
ray('Postgresql without environment', $postgresql->name); ray('Postgresql without environment', $postgresql->name);
$postgresql->delete(); $postgresql->delete();
} }
if (!data_get($postgresql, 'destination.server')) {
ray('Postgresql without server', $postgresql->name);
$postgresql->delete();
}
if (!$postgresql->destination()) { if (!$postgresql->destination()) {
ray('Postgresql without destination', $postgresql->name); ray('Postgresql without destination', $postgresql->name);
$postgresql->delete(); $postgresql->delete();
} }
} }
} catch (\Throwable $e) {
echo "Error in postgresql: {$e->getMessage()}\n";
}
try {
$redis = StandaloneRedis::all(); $redis = StandaloneRedis::all();
foreach ($redis as $redis) { foreach ($redis as $redis) {
if (!$redis->environment) { if (!data_get($redis, 'environment')) {
ray('Redis without environment', $redis->name); ray('Redis without environment', $redis->name);
$redis->delete(); $redis->delete();
} }
if (!data_get($redis, 'destination.server')) {
ray('Redis without server', $redis->name);
$redis->delete();
}
if (!$redis->destination()) { if (!$redis->destination()) {
ray('Redis without destination', $redis->name); ray('Redis without destination', $redis->name);
$redis->delete(); $redis->delete();
} }
} }
} catch (\Throwable $e) {
echo "Error in redis: {$e->getMessage()}\n";
}
try {
$mongodbs = StandaloneMongodb::all(); $mongodbs = StandaloneMongodb::all();
foreach ($mongodbs as $mongodb) { foreach ($mongodbs as $mongodb) {
if (!$mongodb->environment) { if (!data_get($mongodb, 'environment')) {
ray('Mongodb without environment', $mongodb->name); ray('Mongodb without environment', $mongodb->name);
$mongodb->delete(); $mongodb->delete();
} }
if (!data_get($mongodb, 'destination.server')) {
ray('Mongodb without server', $mongodb->name);
$mongodb->delete();
}
if (!$mongodb->destination()) { if (!$mongodb->destination()) {
ray('Mongodb without destination', $mongodb->name); ray('Mongodb without destination', $mongodb->name);
$mongodb->delete(); $mongodb->delete();
} }
} }
} catch (\Throwable $e) {
echo "Error in mongodb: {$e->getMessage()}\n";
}
try {
$mysqls = StandaloneMysql::all(); $mysqls = StandaloneMysql::all();
foreach ($mysqls as $mysql) { foreach ($mysqls as $mysql) {
if (!$mysql->environment) { if (!data_get($mysql, 'environment')) {
ray('Mysql without environment', $mysql->name); ray('Mysql without environment', $mysql->name);
$mysql->delete(); $mysql->delete();
} }
if (!data_get($mysql, 'destination.server')) {
ray('Mysql without server', $mysql->name);
$mysql->delete();
}
if (!$mysql->destination()) { if (!$mysql->destination()) {
ray('Mysql without destination', $mysql->name); ray('Mysql without destination', $mysql->name);
$mysql->delete(); $mysql->delete();
} }
} }
$mariadbs = StandaloneMysql::all(); } catch (\Throwable $e) {
echo "Error in mysql: {$e->getMessage()}\n";
}
try {
$mariadbs = StandaloneMariadb::all();
foreach ($mariadbs as $mariadb) { foreach ($mariadbs as $mariadb) {
if (!$mariadb->environment) { if (!data_get($mariadb, 'environment')) {
ray('Mariadb without environment', $mariadb->name); ray('Mariadb without environment', $mariadb->name);
$mariadb->delete(); $mariadb->delete();
} }
if (!data_get($mariadb, 'destination.server')) {
ray('Mariadb without server', $mariadb->name);
$mariadb->delete();
}
if (!$mariadb->destination()) { if (!$mariadb->destination()) {
ray('Mariadb without destination', $mariadb->name); ray('Mariadb without destination', $mariadb->name);
$mariadb->delete(); $mariadb->delete();
} }
} }
} catch (\Throwable $e) {
echo "Error in mariadb: {$e->getMessage()}\n";
}
try {
$services = Service::all(); $services = Service::all();
foreach ($services as $service) { foreach ($services as $service) {
if (!$service->environment) { if (!data_get($service, 'environment')) {
ray('Service without environment', $service->name); ray('Service without environment', $service->name);
$service->delete(); $service->delete();
} }
if (!$service->server) { if (!data_get($service, 'server')) {
ray('Service without server', $service->name); ray('Service without server', $service->name);
$service->delete(); $service->delete();
} }
@ -141,7 +199,29 @@ class Init extends Command
} }
} }
} catch (\Throwable $e) { } catch (\Throwable $e) {
echo "Error: {$e->getMessage()}\n"; echo "Error in service: {$e->getMessage()}\n";
}
try {
$serviceApplications = ServiceApplication::all();
foreach ($serviceApplications as $service) {
if (!data_get($service, 'service')) {
ray('ServiceApplication without service', $service->name);
$service->delete();
}
}
} catch (\Throwable $e) {
echo "Error in serviceApplications: {$e->getMessage()}\n";
}
try {
$serviceDatabases = ServiceDatabase::all();
foreach ($serviceDatabases as $service) {
if (!data_get($service, 'service')) {
ray('ServiceDatabase without service', $service->name);
$service->delete();
}
}
} catch (\Throwable $e) {
echo "Error in ServiceDatabases: {$e->getMessage()}\n";
} }
} }
} }

View File

@ -14,7 +14,7 @@ class Delete extends Component
{ {
try { try {
$this->authorize('delete', $this->server); $this->authorize('delete', $this->server);
if (!$this->server->isEmpty()) { if ($this->server->hasDefinedResources()) {
$this->emit('error', 'Server has defined resources. Please delete them first.'); $this->emit('error', 'Server has defined resources. Please delete them first.');
return; return;
} }

View File

@ -293,7 +293,6 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
$this->build_image_name = Str::lower("{$this->application->git_repository}:{$tag}-build"); $this->build_image_name = Str::lower("{$this->application->git_repository}:{$tag}-build");
$this->production_image_name = Str::lower("{$this->application->uuid}:{$tag}"); $this->production_image_name = Str::lower("{$this->application->uuid}:{$tag}");
} }
ray('Build Image Name: ' . $this->build_image_name . ' & Production Image Name: ' . $this->production_image_name)->green();
} }
private function just_restart() private function just_restart()
{ {

View File

@ -34,8 +34,11 @@ class Application extends BaseModel
static::deleting(function ($application) { static::deleting(function ($application) {
$application->settings()->delete(); $application->settings()->delete();
$storages = $application->persistentStorages()->get(); $storages = $application->persistentStorages()->get();
$server = data_get($application, 'destination.server');
if ($server) {
foreach ($storages as $storage) { foreach ($storages as $storage) {
instant_remote_process(["docker volume rm -f $storage->name"], $application->destination->server, false); instant_remote_process(["docker volume rm -f $storage->name"], $server, false);
}
} }
$application->persistentStorages()->delete(); $application->persistentStorages()->delete();
$application->environment_variables()->delete(); $application->environment_variables()->delete();

View File

@ -109,11 +109,12 @@ class Server extends BaseModel
return $this->proxy->modelScope(); return $this->proxy->modelScope();
} }
public function isEmpty() public function hasDefinedResources()
{ {
$applications = $this->applications()->count() === 0; $applications = $this->applications()->count() === 0;
$databases = $this->databases()->count() === 0; $databases = $this->databases()->count() === 0;
if ($applications && $databases) { $services = $this->services()->count() === 0;
if ($applications || $databases || $services) {
return true; return true;
} }
return false; return false;

View File

@ -5,7 +5,6 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Cache;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Illuminate\Support\Str; use Illuminate\Support\Str;
@ -23,21 +22,21 @@ class Service extends BaseModel
foreach ($storages as $storage) { foreach ($storages as $storage) {
$storagesToDelete->push($storage); $storagesToDelete->push($storage);
} }
$application->persistentStorages()->delete();
} }
foreach ($service->databases()->get() as $database) { foreach ($service->databases()->get() as $database) {
$storages = $database->persistentStorages()->get(); $storages = $database->persistentStorages()->get();
foreach ($storages as $storage) { foreach ($storages as $storage) {
$storagesToDelete->push($storage); $storagesToDelete->push($storage);
} }
$database->persistentStorages()->delete();
} }
$service->environment_variables()->delete(); $service->environment_variables()->delete();
$service->applications()->delete(); $service->applications()->delete();
$service->databases()->delete(); $service->databases()->delete();
if ($storagesToDelete->count() > 0) {
$storagesToDelete->each(function ($storage) use ($service) { $server = data_get($service, 'server');
instant_remote_process(["docker volume rm -f $storage->name"], $service->server, false); if ($server && $storagesToDelete->count() > 0) {
$storagesToDelete->each(function ($storage) use ($server) {
instant_remote_process(["docker volume rm -f $storage->name"], $server, false);
}); });
} }
}); });
@ -257,13 +256,25 @@ class Service extends BaseModel
]); ]);
} }
} }
$networks = $serviceNetworks->toArray(); $networks = collect();
foreach ($definedNetwork as $key => $network) { foreach ($serviceNetworks as $key =>$serviceNetwork) {
$networks = array_merge($networks, [ if (gettype($serviceNetwork) === 'string') {
$network // networks:
]); // - appwrite
$networks->put($serviceNetwork, null);
} else if (gettype($serviceNetwork) === 'array') {
// networks:
// default:
// ipv4_address: 192.168.203.254
// $networks->put($serviceNetwork, null);
ray($key);
$networks->put($key,$serviceNetwork);
} }
data_set($service, 'networks', $networks); }
foreach ($definedNetwork as $key => $network) {
$networks->put($network, null);
}
data_set($service, 'networks', $networks->toArray());
// Collect/create/update volumes // Collect/create/update volumes
if ($serviceVolumes->count() > 0) { if ($serviceVolumes->count() > 0) {

View File

@ -11,6 +11,13 @@ class ServiceApplication extends BaseModel
use HasFactory; use HasFactory;
protected $guarded = []; protected $guarded = [];
protected static function booted()
{
static::deleting(function ($service) {
$service->persistentStorages()->delete();
$service->fileStorages()->delete();
});
}
public function type() public function type()
{ {
return 'service'; return 'service';

View File

@ -9,6 +9,13 @@ class ServiceDatabase extends BaseModel
use HasFactory; use HasFactory;
protected $guarded = []; protected $guarded = [];
protected static function booted()
{
static::deleting(function ($service) {
$service->persistentStorages()->delete();
$service->fileStorages()->delete();
});
}
public function type() public function type()
{ {
return 'service'; return 'service';

View File

@ -30,8 +30,11 @@ class StandaloneMariadb extends BaseModel
}); });
static::deleting(function ($database) { static::deleting(function ($database) {
$storages = $database->persistentStorages()->get(); $storages = $database->persistentStorages()->get();
$server = data_get($database, 'destination.server');
if ($server) {
foreach ($storages as $storage) { foreach ($storages as $storage) {
instant_remote_process(["docker volume rm -f $storage->name"], $database->destination->server, false); instant_remote_process(["docker volume rm -f $storage->name"], $server, false);
}
} }
$database->scheduledBackups()->delete(); $database->scheduledBackups()->delete();
$database->persistentStorages()->delete(); $database->persistentStorages()->delete();

View File

@ -33,8 +33,11 @@ class StandaloneMongodb extends BaseModel
}); });
static::deleting(function ($database) { static::deleting(function ($database) {
$storages = $database->persistentStorages()->get(); $storages = $database->persistentStorages()->get();
$server = data_get($database, 'destination.server');
if ($server) {
foreach ($storages as $storage) { foreach ($storages as $storage) {
instant_remote_process(["docker volume rm -f $storage->name"], $database->destination->server, false); instant_remote_process(["docker volume rm -f $storage->name"], $server, false);
}
} }
$database->scheduledBackups()->delete(); $database->scheduledBackups()->delete();
$database->persistentStorages()->delete(); $database->persistentStorages()->delete();

View File

@ -30,8 +30,11 @@ class StandaloneMysql extends BaseModel
}); });
static::deleting(function ($database) { static::deleting(function ($database) {
$storages = $database->persistentStorages()->get(); $storages = $database->persistentStorages()->get();
$server = data_get($database, 'destination.server');
if ($server) {
foreach ($storages as $storage) { foreach ($storages as $storage) {
instant_remote_process(["docker volume rm -f $storage->name"], $database->destination->server, false); instant_remote_process(["docker volume rm -f $storage->name"], $server, false);
}
} }
$database->scheduledBackups()->delete(); $database->scheduledBackups()->delete();
$database->persistentStorages()->delete(); $database->persistentStorages()->delete();

View File

@ -30,8 +30,11 @@ class StandalonePostgresql extends BaseModel
}); });
static::deleting(function ($database) { static::deleting(function ($database) {
$storages = $database->persistentStorages()->get(); $storages = $database->persistentStorages()->get();
$server = data_get($database, 'destination.server');
if ($server) {
foreach ($storages as $storage) { foreach ($storages as $storage) {
instant_remote_process(["docker volume rm -f $storage->name"], $database->destination->server, false); instant_remote_process(["docker volume rm -f $storage->name"], $server, false);
}
} }
$database->scheduledBackups()->delete(); $database->scheduledBackups()->delete();
$database->persistentStorages()->delete(); $database->persistentStorages()->delete();

View File

@ -26,8 +26,11 @@ class StandaloneRedis extends BaseModel
static::deleting(function ($database) { static::deleting(function ($database) {
$database->scheduledBackups()->delete(); $database->scheduledBackups()->delete();
$storages = $database->persistentStorages()->get(); $storages = $database->persistentStorages()->get();
$server = data_get($database, 'destination.server');
if ($server) {
foreach ($storages as $storage) { foreach ($storages as $storage) {
instant_remote_process(["docker volume rm -f $storage->name"], $database->destination->server, false); instant_remote_process(["docker volume rm -f $storage->name"], $server, false);
}
} }
$database->persistentStorages()->delete(); $database->persistentStorages()->delete();
$database->environment_variables()->delete(); $database->environment_variables()->delete();

View File

@ -6,6 +6,7 @@ use App\Models\Server;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Spatie\Url\Url; use Spatie\Url\Url;
use Visus\Cuid2\Cuid2;
function getCurrentApplicationContainerStatus(Server $server, int $id, ?int $pullRequestId = null): Collection function getCurrentApplicationContainerStatus(Server $server, int $id, ?int $pullRequestId = null): Collection
{ {
@ -141,6 +142,7 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_
$labels = collect([]); $labels = collect([]);
$labels->push('traefik.enable=true'); $labels->push('traefik.enable=true');
foreach ($domains as $loop => $domain) { foreach ($domains as $loop => $domain) {
$uuid = new Cuid2(7);
$url = Url::fromString($domain); $url = Url::fromString($domain);
$host = $url->getHost(); $host = $url->getHost();
$path = $url->getPath(); $path = $url->getPath();

View File

@ -7,7 +7,7 @@ return [
// The release version of your application // The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => '4.0.0-beta.110', 'release' => '4.0.0-beta.111',
// When left empty or `null` the Laravel environment will be used // When left empty or `null` the Laravel environment will be used
'environment' => config('app.env'), 'environment' => config('app.env'),

View File

@ -1,3 +1,3 @@
<?php <?php
return '4.0.0-beta.110'; return '4.0.0-beta.111';

View File

@ -60,6 +60,14 @@ services:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- /data/coolify/:/data/coolify - /data/coolify/:/data/coolify
# - coolify-data-dev:/data/coolify # - coolify-data-dev:/data/coolify
remote-host:
<<: *testing-host-base
container_name: coolify-remote-host
volumes:
- /:/host
- /var/run/docker.sock:/var/run/docker.sock
- /data/coolify/:/data/coolify
# - coolify-data-dev:/data/coolify
mailpit: mailpit:
image: "axllent/mailpit:latest" image: "axllent/mailpit:latest"
container_name: coolify-mail container_name: coolify-mail

View File

@ -50,15 +50,16 @@
<h3>Build</h3> <h3>Build</h3>
@if ($application->could_set_build_commands()) @if ($application->could_set_build_commands())
@if ($application->build_pack === 'nixpacks') @if ($application->build_pack === 'nixpacks')
<div>Nixpacks will detect your package manager/configurations: <a class="underline" href="https://nixpacks.com/docs/providers">Nixpacks documentation</a></div> <div>Nixpacks will detect your package manager/configurations: <a class="underline"
href="https://nixpacks.com/docs/providers">Nixpacks documentation</a></div>
<div class="text-warning">You probably do not need to modify the commands below.</div> <div class="text-warning">You probably do not need to modify the commands below.</div>
<div class="flex flex-col gap-2 xl:flex-row"> <div class="flex flex-col gap-2 xl:flex-row">
<x-forms.input placeholder="If you modify this, you probably need to have a nixpacks.toml" id="application.install_command" <x-forms.input placeholder="If you modify this, you probably need to have a nixpacks.toml"
label="Install Command" /> id="application.install_command" label="Install Command" />
<x-forms.input placeholder="If you modify this, you probably need to have a nixpacks.toml" id="application.build_command" <x-forms.input placeholder="If you modify this, you probably need to have a nixpacks.toml"
label="Build Command" /> id="application.build_command" label="Build Command" />
<x-forms.input placeholder="If you modify this, you probably need to have a nixpacks.toml" id="application.start_command" <x-forms.input placeholder="If you modify this, you probably need to have a nixpacks.toml"
label="Start Command" /> id="application.start_command" label="Start Command" />
</div> </div>
@endif @endif
@endif @endif
@ -103,11 +104,7 @@
<x-forms.input placeholder="3000:3000" id="application.ports_mappings" label="Ports Mappings" <x-forms.input placeholder="3000:3000" id="application.ports_mappings" label="Ports Mappings"
helper="A comma separated list of ports you would like to map to the host system. Useful when you do not want to use domains.<br><br><span class='inline-block font-bold text-warning'>Example:</span><br>3000:3000,3002:3002<br><br>Rolling update is not supported if you have a port mapped to the host." /> helper="A comma separated list of ports you would like to map to the host system. Useful when you do not want to use domains.<br><br><span class='inline-block font-bold text-warning'>Example:</span><br>3000:3000,3002:3002<br><br>Rolling update is not supported if you have a port mapped to the host." />
</div> </div>
@if ($labelsChanged) <x-forms.textarea label="Container Labels" rows="15" id="customLabels"></x-forms.textarea>
<x-forms.textarea label="Custom Labels" rows="15" id="customLabels"></x-forms.textarea>
@else
<x-forms.textarea label="Coolify Generated Labels" rows="15" id="customLabels"></x-forms.textarea>
@endif
<x-forms.button wire:click="resetDefaultLabels">Reset to Coolify Generated Labels</x-forms.button> <x-forms.button wire:click="resetDefaultLabels">Reset to Coolify Generated Labels</x-forms.button>
</div> </div>
<h3>Advanced</h3> <h3>Advanced</h3>

View File

@ -1,6 +1,6 @@
<div x-data="{ raw: true, activeTab: window.location.hash ? window.location.hash.substring(1) : 'service-stack' }" x-init="$wire.checkStatus" wire:poll.10000ms="checkStatus"> <div x-data="{ raw: true, activeTab: window.location.hash ? window.location.hash.substring(1) : 'service-stack' }" x-init="$wire.checkStatus" wire:poll.10000ms="checkStatus">
<livewire:project.service.navbar :service="$service" :parameters="$parameters" :query="$query" /> <livewire:project.service.navbar :service="$service" :parameters="$parameters" :query="$query" />
<livewire:project.service.compose-modal key={{ now() }} :raw="$service->docker_compose_raw" :actual="$service->docker_compose" /> <livewire:project.service.compose-modal :raw="$service->docker_compose_raw" :actual="$service->docker_compose" />
<div class="flex h-full pt-6"> <div class="flex h-full pt-6">
<div class="flex flex-col items-start gap-4 min-w-fit"> <div class="flex flex-col items-start gap-4 min-w-fit">
<a target="_blank" href="{{ $service->documentation() }}">Documentation <x-external-link /></a> <a target="_blank" href="{{ $service->documentation() }}">Documentation <x-external-link /></a>

View File

@ -11,8 +11,12 @@
<div class="pb-4">This will remove this server from Coolify. Beware! There is no coming <div class="pb-4">This will remove this server from Coolify. Beware! There is no coming
back! back!
</div> </div>
@if ($server->hasDefinedResources())
<div class="text-warning">Please delete all resources before deleting this server.</div>
@else
<x-forms.button isError isModal modalId="deleteServer"> <x-forms.button isError isModal modalId="deleteServer">
Delete Delete
</x-forms.button> </x-forms.button>
@endif @endif
@endif
</div> </div>

View File

@ -62,7 +62,6 @@
helper="Disk cleanup job will be executed if disk usage is more than this number." /> helper="Disk cleanup job will be executed if disk usage is more than this number." />
@endif @endif
</form> </form>
<livewire:server.delete :server="$server" />
<script> <script>
Livewire.on('installDocker', () => { Livewire.on('installDocker', () => {
installDocker.showModal(); installDocker.showModal();

View File

@ -11,4 +11,5 @@
</x-modal> </x-modal>
<x-server.navbar :server="$server" :parameters="$parameters" /> <x-server.navbar :server="$server" :parameters="$parameters" />
<livewire:server.form :server="$server" /> <livewire:server.form :server="$server" />
<livewire:server.delete :server="$server" />
</div> </div>

View File

@ -10,7 +10,7 @@
<div class="text-xs truncate subtitle lg:text-sm">{{ $project->name }}</div> <div class="text-xs truncate subtitle lg:text-sm">{{ $project->name }}</div>
<div class="grid gap-2 lg:grid-cols-2"> <div class="grid gap-2 lg:grid-cols-2">
@forelse ($project->environments as $environment) @forelse ($project->environments as $environment)
<a class="items-center justify-center box description" href="{{ route('project.resources', [$project->uuid, $environment->name]) }}"> <a class="items-center justify-center font-bold box" href="{{ route('project.resources', [$project->uuid, $environment->name]) }}">
{{ $environment->name }} {{ $environment->name }}
</a> </a>
@empty @empty

View File

@ -3,6 +3,8 @@ _APP_LOCALE=en
_APP_OPTIONS_ABUSE=enabled _APP_OPTIONS_ABUSE=enabled
_APP_OPTIONS_FORCE_HTTPS=disabled _APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1= _APP_OPENSSL_KEY_V1=
_APP_DOMAIN=
_APP_DOMAIN_TARGET=
_APP_DOMAIN_FUNCTIONS= _APP_DOMAIN_FUNCTIONS=
_APP_CONSOLE_WHITELIST_ROOT=enabled _APP_CONSOLE_WHITELIST_ROOT=enabled
_APP_CONSOLE_WHITELIST_EMAILS= _APP_CONSOLE_WHITELIST_EMAILS=
@ -18,19 +20,19 @@ _APP_USAGE_AGGREGATION_INTERVAL=30
_APP_USAGE_TIMESERIES_INTERVAL=30 _APP_USAGE_TIMESERIES_INTERVAL=30
_APP_USAGE_DATABASE_INTERVAL=900 _APP_USAGE_DATABASE_INTERVAL=900
_APP_WORKER_PER_CORE=6 _APP_WORKER_PER_CORE=6
_APP_REDIS_HOST=redis _APP_REDIS_HOST=appwrite-redis
_APP_REDIS_PORT=6379 _APP_REDIS_PORT=6379
_APP_REDIS_USER= _APP_REDIS_USER=
_APP_REDIS_PASS= _APP_REDIS_PASS=
_APP_DB_HOST=mariadb _APP_DB_HOST=appwrite-mariadb
_APP_DB_PORT=3306 _APP_DB_PORT=3306
_APP_DB_SCHEMA=appwrite _APP_DB_SCHEMA=appwrite
_APP_DB_USER=$SERVICE_USER_MYSQL _APP_DB_USER=$SERVICE_USER_MYSQL
_APP_DB_PASS=$SERVICE_PASSWORD_MYSQL _APP_DB_PASS=$SERVICE_PASSWORD_MYSQL
_APP_DB_ROOT_PASS=$SERVICE_PASSWORD_ROOTMYSQL _APP_DB_ROOT_PASS=$SERVICE_PASSWORD_ROOTMYSQL
_APP_INFLUXDB_HOST=influxdb _APP_INFLUXDB_HOST=appwrite-influxdb
_APP_INFLUXDB_PORT=8086 _APP_INFLUXDB_PORT=8086
_APP_STATSD_HOST=telegraf _APP_STATSD_HOST=appwrite-telegraf
_APP_STATSD_PORT=8125 _APP_STATSD_PORT=8125
_APP_SMTP_HOST= _APP_SMTP_HOST=
_APP_SMTP_PORT= _APP_SMTP_PORT=
@ -42,7 +44,7 @@ _APP_SMS_FROM=
_APP_STORAGE_LIMIT=30000000 _APP_STORAGE_LIMIT=30000000
_APP_STORAGE_PREVIEW_LIMIT=20000000 _APP_STORAGE_PREVIEW_LIMIT=20000000
_APP_STORAGE_ANTIVIRUS=disabled _APP_STORAGE_ANTIVIRUS=disabled
_APP_STORAGE_ANTIVIRUS_HOST=clamav _APP_STORAGE_ANTIVIRUS_HOST=appwrite-clamav
_APP_STORAGE_ANTIVIRUS_PORT=3310 _APP_STORAGE_ANTIVIRUS_PORT=3310
_APP_STORAGE_DEVICE=local _APP_STORAGE_DEVICE=local
_APP_STORAGE_S3_ACCESS_KEY= _APP_STORAGE_S3_ACCESS_KEY=
@ -72,11 +74,10 @@ _APP_FUNCTIONS_CONTAINERS=10
_APP_FUNCTIONS_CPUS=0 _APP_FUNCTIONS_CPUS=0
_APP_FUNCTIONS_MEMORY=0 _APP_FUNCTIONS_MEMORY=0
_APP_FUNCTIONS_MEMORY_SWAP=0 _APP_FUNCTIONS_MEMORY_SWAP=0
_APP_FUNCTIONS_RUNTIMES=node-16.0,php-8.0,python-3.9,ruby-3.0 _APP_FUNCTIONS_RUNTIMES=node-20.0,php-8.2,python-3.11,ruby-3.2
_APP_EXECUTOR_SECRET=your-secret-key _APP_EXECUTOR_SECRET=$SERVICE_PASSWORD_64_APPWRITE
_APP_EXECUTOR_HOST=http://appwrite-executor/v1 _APP_EXECUTOR_HOST=http://appwrite-executor/v1
_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes
_APP_FUNCTIONS_ENVS=node-16.0,php-7.4,python-3.9,ruby-3.0
_APP_FUNCTIONS_INACTIVE_THRESHOLD=60 _APP_FUNCTIONS_INACTIVE_THRESHOLD=60
DOCKERHUB_PULL_USERNAME= DOCKERHUB_PULL_USERNAME=
DOCKERHUB_PULL_PASSWORD= DOCKERHUB_PULL_PASSWORD=

View File

@ -17,19 +17,6 @@ services:
image: appwrite/appwrite:1.4 image: appwrite/appwrite:1.4
container_name: appwrite container_name: appwrite
<<: *x-logging <<: *x-logging
labels:
- traefik.constraint-label-stack=appwrite
- traefik.docker.network=appwrite
- traefik.http.services.appwrite_api.loadbalancer.server.port=80
#http
- traefik.http.routers.appwrite_api_http.entrypoints=web
- traefik.http.routers.appwrite_api_http.rule=PathPrefix(`/`)
- traefik.http.routers.appwrite_api_http.service=appwrite_api
# https
- traefik.http.routers.appwrite_api_https.entrypoints=websecure
- traefik.http.routers.appwrite_api_https.rule=PathPrefix(`/`)
- traefik.http.routers.appwrite_api_https.service=appwrite_api
- traefik.http.routers.appwrite_api_https.tls=true
volumes: volumes:
- appwrite-uploads:/storage/uploads:rw - appwrite-uploads:/storage/uploads:rw
- appwrite-cache:/storage/cache:rw - appwrite-cache:/storage/cache:rw
@ -37,10 +24,10 @@ services:
- appwrite-certificates:/storage/certificates:rw - appwrite-certificates:/storage/certificates:rw
- appwrite-functions:/storage/functions:rw - appwrite-functions:/storage/functions:rw
depends_on: depends_on:
- mariadb - appwrite-mariadb
- redis - appwrite-redis
# - clamav # - appwrite-clamav
- influxdb - appwrite-influxdb
environment: environment:
- SERVICE_FQDN_APPWRITE=/ - SERVICE_FQDN_APPWRITE=/
- _APP_ENV - _APP_ENV
@ -56,9 +43,9 @@ services:
- _APP_OPTIONS_ABUSE - _APP_OPTIONS_ABUSE
- _APP_OPTIONS_FORCE_HTTPS - _APP_OPTIONS_FORCE_HTTPS
- _APP_OPENSSL_KEY_V1 - _APP_OPENSSL_KEY_V1
- _APP_DOMAIN - _APP_DOMAIN=$SERVICE_FQDN_APPWRITE
- _APP_DOMAIN_TARGET - _APP_DOMAIN_TARGET=$SERVICE_FQDN_APPWRITE
- _APP_DOMAIN_FUNCTIONS - _APP_DOMAIN_FUNCTIONS=$SERVICE_FQDN_APPWRITE
- _APP_REDIS_HOST - _APP_REDIS_HOST
- _APP_REDIS_PORT - _APP_REDIS_PORT
- _APP_REDIS_USER - _APP_REDIS_USER
@ -137,29 +124,12 @@ services:
- _APP_ASSISTANT_OPENAI_API_KEY - _APP_ASSISTANT_OPENAI_API_KEY
appwrite-realtime: appwrite-realtime:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: realtime entrypoint: realtime
container_name: appwrite-realtime
<<: *x-logging <<: *x-logging
labels:
- "traefik.constraint-label-stack=appwrite"
- "traefik.docker.network=appwrite"
- "traefik.http.services.appwrite_realtime.loadbalancer.server.port=80"
#ws
- traefik.http.routers.appwrite_realtime_ws.entrypoints=web
- traefik.http.routers.appwrite_realtime_ws.rule=PathPrefix(`/v1/realtime`)
- traefik.http.routers.appwrite_realtime_ws.service=appwrite_realtime
# wss
- traefik.http.routers.appwrite_realtime_wss.entrypoints=websecure
- traefik.http.routers.appwrite_realtime_wss.rule=PathPrefix(`/v1/realtime`)
- traefik.http.routers.appwrite_realtime_wss.service=appwrite_realtime
- traefik.http.routers.appwrite_realtime_wss.tls=true
- traefik.http.routers.appwrite_realtime_wss.tls.certresolver=dns
networks:
- appwrite
depends_on: depends_on:
- mariadb - appwrite-mariadb
- redis - appwrite-redis
environment: environment:
- SERVICE_FQDN_APPWRITE=/v1/realtime - SERVICE_FQDN_APPWRITE=/v1/realtime
- _APP_ENV - _APP_ENV
@ -180,16 +150,13 @@ services:
- _APP_LOGGING_CONFIG - _APP_LOGGING_CONFIG
appwrite-worker-audits: appwrite-worker-audits:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: worker-audits entrypoint: worker-audits
<<: *x-logging <<: *x-logging
container_name: appwrite-worker-audits container_name: appwrite-worker-audits
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- redis - appwrite-redis
- mariadb - appwrite-mariadb
environment: environment:
- _APP_ENV - _APP_ENV
- _APP_WORKER_PER_CORE - _APP_WORKER_PER_CORE
@ -207,16 +174,13 @@ services:
- _APP_LOGGING_CONFIG - _APP_LOGGING_CONFIG
appwrite-worker-webhooks: appwrite-worker-webhooks:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: worker-webhooks entrypoint: worker-webhooks
<<: *x-logging <<: *x-logging
container_name: appwrite-worker-webhooks container_name: appwrite-worker-webhooks
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- redis - appwrite-redis
- mariadb - appwrite-mariadb
environment: environment:
- _APP_ENV - _APP_ENV
- _APP_WORKER_PER_CORE - _APP_WORKER_PER_CORE
@ -230,16 +194,13 @@ services:
- _APP_LOGGING_CONFIG - _APP_LOGGING_CONFIG
appwrite-worker-deletes: appwrite-worker-deletes:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: worker-deletes entrypoint: worker-deletes
<<: *x-logging <<: *x-logging
container_name: appwrite-worker-deletes container_name: appwrite-worker-deletes
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- redis - appwrite-redis
- mariadb - appwrite-mariadb
volumes: volumes:
- appwrite-uploads:/storage/uploads:rw - appwrite-uploads:/storage/uploads:rw
- appwrite-cache:/storage/cache:rw - appwrite-cache:/storage/cache:rw
@ -286,16 +247,13 @@ services:
- _APP_EXECUTOR_HOST - _APP_EXECUTOR_HOST
appwrite-worker-databases: appwrite-worker-databases:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: worker-databases entrypoint: worker-databases
<<: *x-logging <<: *x-logging
container_name: appwrite-worker-databases container_name: appwrite-worker-databases
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- redis - appwrite-redis
- mariadb - appwrite-mariadb
environment: environment:
- _APP_ENV - _APP_ENV
- _APP_WORKER_PER_CORE - _APP_WORKER_PER_CORE
@ -313,16 +271,13 @@ services:
- _APP_LOGGING_CONFIG - _APP_LOGGING_CONFIG
appwrite-worker-builds: appwrite-worker-builds:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: worker-builds entrypoint: worker-builds
<<: *x-logging <<: *x-logging
container_name: appwrite-worker-builds container_name: appwrite-worker-builds
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- redis - appwrite-redis
- mariadb - appwrite-mariadb
volumes: volumes:
- appwrite-functions:/storage/functions:rw - appwrite-functions:/storage/functions:rw
- appwrite-builds:/storage/builds:rw - appwrite-builds:/storage/builds:rw
@ -375,16 +330,13 @@ services:
- _APP_STORAGE_WASABI_BUCKET - _APP_STORAGE_WASABI_BUCKET
appwrite-worker-certificates: appwrite-worker-certificates:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: worker-certificates entrypoint: worker-certificates
<<: *x-logging <<: *x-logging
container_name: appwrite-worker-certificates container_name: appwrite-worker-certificates
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- redis - appwrite-redis
- mariadb - appwrite-mariadb
volumes: volumes:
- appwrite-config:/storage/config:rw - appwrite-config:/storage/config:rw
- appwrite-certificates:/storage/certificates:rw - appwrite-certificates:/storage/certificates:rw
@ -409,16 +361,13 @@ services:
- _APP_LOGGING_CONFIG - _APP_LOGGING_CONFIG
appwrite-worker-functions: appwrite-worker-functions:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: worker-functions entrypoint: worker-functions
<<: *x-logging <<: *x-logging
container_name: appwrite-worker-functions container_name: appwrite-worker-functions
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- redis - appwrite-redis
- mariadb - appwrite-mariadb
- openruntimes-executor - openruntimes-executor
environment: environment:
- _APP_ENV - _APP_ENV
@ -446,15 +395,12 @@ services:
- _APP_LOGGING_PROVIDER - _APP_LOGGING_PROVIDER
appwrite-worker-mails: appwrite-worker-mails:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: worker-mails entrypoint: worker-mails
<<: *x-logging <<: *x-logging
container_name: appwrite-worker-mails container_name: appwrite-worker-mails
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- redis - appwrite-redis
environment: environment:
- _APP_ENV - _APP_ENV
- _APP_WORKER_PER_CORE - _APP_WORKER_PER_CORE
@ -474,15 +420,12 @@ services:
- _APP_LOGGING_CONFIG - _APP_LOGGING_CONFIG
appwrite-worker-messaging: appwrite-worker-messaging:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: worker-messaging entrypoint: worker-messaging
<<: *x-logging <<: *x-logging
container_name: appwrite-worker-messaging container_name: appwrite-worker-messaging
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- redis - appwrite-redis
environment: environment:
- _APP_ENV - _APP_ENV
- _APP_WORKER_PER_CORE - _APP_WORKER_PER_CORE
@ -496,15 +439,12 @@ services:
- _APP_LOGGING_CONFIG - _APP_LOGGING_CONFIG
appwrite-worker-migrations: appwrite-worker-migrations:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: worker-migrations entrypoint: worker-migrations
<<: *x-logging <<: *x-logging
container_name: appwrite-worker-migrations container_name: appwrite-worker-migrations
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- mariadb - appwrite-mariadb
environment: environment:
- _APP_ENV - _APP_ENV
- _APP_WORKER_PER_CORE - _APP_WORKER_PER_CORE
@ -527,15 +467,12 @@ services:
- _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET - _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET
appwrite-maintenance: appwrite-maintenance:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: maintenance entrypoint: maintenance
<<: *x-logging <<: *x-logging
container_name: appwrite-maintenance container_name: appwrite-maintenance
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- redis - appwrite-redis
environment: environment:
- _APP_ENV - _APP_ENV
- _APP_WORKER_PER_CORE - _APP_WORKER_PER_CORE
@ -561,16 +498,13 @@ services:
- _APP_MAINTENANCE_RETENTION_SCHEDULES - _APP_MAINTENANCE_RETENTION_SCHEDULES
appwrite-usage: appwrite-usage:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: usage entrypoint: usage
container_name: appwrite-usage container_name: appwrite-usage
<<: *x-logging <<: *x-logging
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- influxdb - appwrite-influxdb
- mariadb - appwrite-mariadb
environment: environment:
- _APP_ENV - _APP_ENV
- _APP_WORKER_PER_CORE - _APP_WORKER_PER_CORE
@ -592,16 +526,13 @@ services:
- _APP_LOGGING_CONFIG - _APP_LOGGING_CONFIG
appwrite-schedule: appwrite-schedule:
image: appwrite/appwrite:1.4.3 image: appwrite/appwrite:1.4
entrypoint: schedule entrypoint: schedule
container_name: appwrite-schedule container_name: appwrite-schedule
<<: *x-logging <<: *x-logging
restart: unless-stopped
networks:
- appwrite
depends_on: depends_on:
- mariadb - appwrite-mariadb
- redis - appwrite-redis
environment: environment:
- _APP_ENV - _APP_ENV
- _APP_WORKER_PER_CORE - _APP_WORKER_PER_CORE
@ -616,15 +547,13 @@ services:
- _APP_DB_USER - _APP_DB_USER
- _APP_DB_PASS - _APP_DB_PASS
appwrite-assistant: # appwrite-assistant:
image: appwrite/assistant:0.2.1 # image: appwrite/assistant:0.2.1
container_name: appwrite-assistant # container_name: appwrite-assistant
<<: *x-logging # <<: *x-logging
restart: unless-stopped #
networks: # environment:
- appwrite # - _APP_ASSISTANT_OPENAI_API_KEY
environment:
- _APP_ASSISTANT_OPENAI_API_KEY
openruntimes-executor: openruntimes-executor:
container_name: openruntimes-executor container_name: openruntimes-executor
@ -632,9 +561,6 @@ services:
<<: *x-logging <<: *x-logging
stop_signal: SIGINT stop_signal: SIGINT
image: openruntimes/executor:0.4.1 image: openruntimes/executor:0.4.1
networks:
- appwrite
- runtimes
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- appwrite-builds:/storage/builds:rw - appwrite-builds:/storage/builds:rw
@ -675,13 +601,10 @@ services:
- OPR_EXECUTOR_STORAGE_WASABI_REGION=$_APP_STORAGE_WASABI_REGION - OPR_EXECUTOR_STORAGE_WASABI_REGION=$_APP_STORAGE_WASABI_REGION
- OPR_EXECUTOR_STORAGE_WASABI_BUCKET=$_APP_STORAGE_WASABI_BUCKET - OPR_EXECUTOR_STORAGE_WASABI_BUCKET=$_APP_STORAGE_WASABI_BUCKET
mariadb: appwrite-mariadb:
image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p
container_name: appwrite-mariadb container_name: appwrite-mariadb
<<: *x-logging <<: *x-logging
restart: unless-stopped
networks:
- appwrite
volumes: volumes:
- appwrite-mariadb:/var/lib/mysql:rw - appwrite-mariadb:/var/lib/mysql:rw
environment: environment:
@ -691,59 +614,40 @@ services:
- MYSQL_PASSWORD=${_APP_DB_PASS} - MYSQL_PASSWORD=${_APP_DB_PASS}
command: 'mysqld --innodb-flush-method=fsync' command: 'mysqld --innodb-flush-method=fsync'
redis: appwrite-redis:
image: redis:7.0.4-alpine image: redis:7.0.4-alpine
container_name: appwrite-redis container_name: appwrite-redis
<<: *x-logging <<: *x-logging
restart: unless-stopped
command: > command: >
redis-server redis-server
--maxmemory 512mb --maxmemory 512mb
--maxmemory-policy allkeys-lru --maxmemory-policy allkeys-lru
--maxmemory-samples 5 --maxmemory-samples 5
networks:
- appwrite
volumes: volumes:
- appwrite-redis:/data:rw - appwrite-redis:/data:rw
# clamav: # appwrite-clamav:
# image: appwrite/clamav:1.2.0 # image: appwrite/clamav:1.2.0
# container_name: appwrite-clamav # container_name: appwrite-clamav
# restart: unless-stopped #
# networks:
# - appwrite
# volumes: # volumes:
# - appwrite-uploads:/storage/uploads # - appwrite-uploads:/storage/uploads
influxdb: appwrite-influxdb:
image: appwrite/influxdb:1.5.0 image: appwrite/influxdb:1.5.0
container_name: appwrite-influxdb container_name: appwrite-influxdb
<<: *x-logging <<: *x-logging
restart: unless-stopped
networks:
- appwrite
volumes: volumes:
- appwrite-influxdb:/var/lib/influxdb:rw - appwrite-influxdb:/var/lib/influxdb:rw
telegraf: appwrite-telegraf:
image: appwrite/telegraf:1.4.0 image: appwrite/telegraf:1.4.0
container_name: appwrite-telegraf container_name: appwrite-telegraf
<<: *x-logging <<: *x-logging
restart: unless-stopped
networks:
- appwrite
environment: environment:
- _APP_INFLUXDB_HOST - _APP_INFLUXDB_HOST
- _APP_INFLUXDB_PORT - _APP_INFLUXDB_PORT
networks:
gateway:
name: gateway
appwrite:
name: appwrite
runtimes:
name: runtimes
volumes: volumes:
appwrite-mariadb: appwrite-mariadb:
appwrite-redis: appwrite-redis:

View File

@ -0,0 +1,45 @@
# documentation: https://docs.gitea.com
# slogan: Gitea (with MariaDB) is a self-hosted, lightweight Git service, offering version control, collaboration, and code hosting.
# tags: version control, collaboration, code, hosting, lightweight, mariadb
services:
gitea:
image: gitea/gitea:latest
environment:
- SERVICE_FQDN_GITEA
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=mariadb
- GITEA__database__NAME=${MYSQL_DATABASE-gitea}
- GITEA__database__USER=$SERVICE_USER_MYSQL
- GITEA__database__PASSWD=$SERVICE_PASSWORD_MYSQL
volumes:
- gitea-data:/var/lib/gitea
- gitea-timezone:/etc/timezone:ro
- gitea-localtime:/etc/localtime:ro
labels:
- "traefik.http.services.gitea-websecure.loadbalancer.server.port=3000"
depends_on:
mariadb:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 2s
timeout: 10s
retries: 15
mariadb:
image: mariadb:11
volumes:
- gitea-mariadb-data:/var/lib/mysql
environment:
- MYSQL_USER=${SERVICE_USER_MYSQL}
- MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_MYSQLROOT}
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 20s
retries: 10

View File

@ -0,0 +1,45 @@
# documentation: https://docs.gitea.com
# slogan: Gitea (with MySQL) is a self-hosted, lightweight Git service, offering version control, collaboration, and code hosting.
# tags: version control, collaboration, code, hosting, lightweight, mysql
services:
gitea:
image: gitea/gitea:latest
environment:
- SERVICE_FQDN_GITEA
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=mysql
- GITEA__database__NAME=${MYSQL_DATABASE-gitea}
- GITEA__database__USER=$SERVICE_USER_MYSQL
- GITEA__database__PASSWD=$SERVICE_PASSWORD_MYSQL
volumes:
- gitea-data:/var/lib/gitea
- gitea-timezone:/etc/timezone:ro
- gitea-localtime:/etc/localtime:ro
labels:
- "traefik.http.services.gitea-websecure.loadbalancer.server.port=3000"
depends_on:
mysql:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 2s
timeout: 10s
retries: 15
mysql:
image: mysql:8.0
volumes:
- gitea-mysql-data:/var/lib/mysql
environment:
- MYSQL_USER=${SERVICE_USER_MYSQL}
- MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_MYSQLROOT}
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 20s
retries: 10

View File

@ -0,0 +1,44 @@
# documentation: https://docs.gitea.com
# slogan: Gitea (with PostgreSQL)vis a self-hosted, lightweight Git service, offering version control, collaboration, and code hosting.
# tags: version control, collaboration, code, hosting, lightweight, postgresql
services:
gitea:
image: gitea/gitea:latest
environment:
- SERVICE_FQDN_GITEA
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=postgresql
- GITEA__database__NAME=${POSTGRESQL_DATABASE-gitea}
- GITEA__database__USER=$SERVICE_USER_POSTGRESQL
- GITEA__database__PASSWD=$SERVICE_PASSWORD_POSTGRESQL
volumes:
- gitea-data:/var/lib/gitea
- gitea-timezone:/etc/timezone:ro
- gitea-localtime:/etc/localtime:ro
labels:
- "traefik.http.services.gitea-websecure.loadbalancer.server.port=3000"
depends_on:
postgresql:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 2s
timeout: 10s
retries: 15
postgresql:
image: postgres:15-alpine
volumes:
- gitea-postgresql-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${SERVICE_USER_POSTGRESQL}
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}
- POSTGRES_DB=${POSTGRESQL_DATABASE}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 20s
retries: 10

View File

@ -0,0 +1,20 @@
# documentation: https://docs.gitea.com
# slogan: Gitea is a self-hosted, lightweight Git service, offering version control, collaboration, and code hosting.
# tags: version control, collaboration, code, hosting, lightweight
services:
gitea:
image: gitea/gitea:latest
environment:
- SERVICE_FQDN_GITEA_3000
- USER_UID=1000
- USER_GID=1000
volumes:
- gitea-data:/var/lib/gitea
- gitea-timezone:/etc/timezone:ro
- gitea-localtime:/etc/localtime:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 2s
timeout: 10s
retries: 15

View File

@ -0,0 +1,20 @@
# documentation: https://docs.nextcloud.com
# slogan: NextCloud is a self-hosted, open-source platform that provides file storage, collaboration, and communication tools for seamless data management.
# tags: cloud, collaboration, communication, filestorage, data
services:
nextcloud:
image: lscr.io/linuxserver/nextcloud:latest
environment:
- SERVICE_FQDN_NEXTCLOUD
- PUID=1000
- PGID=1000
- TZ=Europe/Madrid
volumes:
- nextcloud-config:/config
- nextcloud-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 2s
timeout: 10s
retries: 15

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
"version": "3.12.36" "version": "3.12.36"
}, },
"v4": { "v4": {
"version": "4.0.0-beta.110" "version": "4.0.0-beta.111"
} }
} }
} }