fix: service dockercompose predefined networks

version++
fix: modal of changing service stack
fix: appwrite template
This commit is contained in:
Andras Bacsai 2023-11-06 15:22:11 +01:00
parent 534372c29c
commit eab7fd44d4
9 changed files with 54 additions and 65 deletions

View File

@ -257,13 +257,25 @@ class Service extends BaseModel
]);
}
}
$networks = $serviceNetworks->toArray();
foreach ($definedNetwork as $key => $network) {
$networks = array_merge($networks, [
$network
]);
$networks = collect();
foreach ($serviceNetworks as $key =>$serviceNetwork) {
if (gettype($serviceNetwork) === 'string') {
// 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
if ($serviceVolumes->count() > 0) {

View File

@ -6,6 +6,7 @@ use App\Models\Server;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Spatie\Url\Url;
use Visus\Cuid2\Cuid2;
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->push('traefik.enable=true');
foreach ($domains as $loop => $domain) {
$uuid = new Cuid2(7);
$url = Url::fromString($domain);
$host = $url->getHost();
$path = $url->getPath();

View File

@ -7,7 +7,7 @@ return [
// The release version of your application
// 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
'environment' => config('app.env'),

View File

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

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">
<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 flex-col items-start gap-4 min-w-fit">
<a target="_blank" href="{{ $service->documentation() }}">Documentation <x-external-link /></a>

View File

@ -3,6 +3,8 @@ _APP_LOCALE=en
_APP_OPTIONS_ABUSE=enabled
_APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=
_APP_DOMAIN=
_APP_DOMAIN_TARGET=
_APP_DOMAIN_FUNCTIONS=
_APP_CONSOLE_WHITELIST_ROOT=enabled
_APP_CONSOLE_WHITELIST_EMAILS=

View File

@ -17,19 +17,6 @@ services:
image: appwrite/appwrite:1.4
container_name: appwrite
<<: *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:
- appwrite-uploads:/storage/uploads:rw
- appwrite-cache:/storage/cache:rw
@ -56,9 +43,9 @@ services:
- _APP_OPTIONS_ABUSE
- _APP_OPTIONS_FORCE_HTTPS
- _APP_OPENSSL_KEY_V1
- _APP_DOMAIN
- _APP_DOMAIN_TARGET
- _APP_DOMAIN_FUNCTIONS
- _APP_DOMAIN=$SERVICE_FQDN_APPWRITE
- _APP_DOMAIN_TARGET=$SERVICE_FQDN_APPWRITE
- _APP_DOMAIN_FUNCTIONS=$SERVICE_FQDN_APPWRITE
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_REDIS_USER
@ -137,24 +124,10 @@ services:
- _APP_ASSISTANT_OPENAI_API_KEY
appwrite-realtime:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: realtime
container_name: appwrite-realtime
<<: *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:
@ -180,7 +153,7 @@ services:
- _APP_LOGGING_CONFIG
appwrite-worker-audits:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: worker-audits
<<: *x-logging
container_name: appwrite-worker-audits
@ -207,7 +180,7 @@ services:
- _APP_LOGGING_CONFIG
appwrite-worker-webhooks:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: worker-webhooks
<<: *x-logging
container_name: appwrite-worker-webhooks
@ -230,7 +203,7 @@ services:
- _APP_LOGGING_CONFIG
appwrite-worker-deletes:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: worker-deletes
<<: *x-logging
container_name: appwrite-worker-deletes
@ -286,7 +259,7 @@ services:
- _APP_EXECUTOR_HOST
appwrite-worker-databases:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: worker-databases
<<: *x-logging
container_name: appwrite-worker-databases
@ -313,7 +286,7 @@ services:
- _APP_LOGGING_CONFIG
appwrite-worker-builds:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: worker-builds
<<: *x-logging
container_name: appwrite-worker-builds
@ -375,7 +348,7 @@ services:
- _APP_STORAGE_WASABI_BUCKET
appwrite-worker-certificates:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: worker-certificates
<<: *x-logging
container_name: appwrite-worker-certificates
@ -409,7 +382,7 @@ services:
- _APP_LOGGING_CONFIG
appwrite-worker-functions:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: worker-functions
<<: *x-logging
container_name: appwrite-worker-functions
@ -446,7 +419,7 @@ services:
- _APP_LOGGING_PROVIDER
appwrite-worker-mails:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: worker-mails
<<: *x-logging
container_name: appwrite-worker-mails
@ -474,7 +447,7 @@ services:
- _APP_LOGGING_CONFIG
appwrite-worker-messaging:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: worker-messaging
<<: *x-logging
container_name: appwrite-worker-messaging
@ -496,7 +469,7 @@ services:
- _APP_LOGGING_CONFIG
appwrite-worker-migrations:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: worker-migrations
<<: *x-logging
container_name: appwrite-worker-migrations
@ -527,7 +500,7 @@ services:
- _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET
appwrite-maintenance:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: maintenance
<<: *x-logging
container_name: appwrite-maintenance
@ -561,7 +534,7 @@ services:
- _APP_MAINTENANCE_RETENTION_SCHEDULES
appwrite-usage:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: usage
container_name: appwrite-usage
<<: *x-logging
@ -592,7 +565,7 @@ services:
- _APP_LOGGING_CONFIG
appwrite-schedule:
image: appwrite/appwrite:1.4.3
image: appwrite/appwrite:1.4
entrypoint: schedule
container_name: appwrite-schedule
<<: *x-logging
@ -616,15 +589,15 @@ services:
- _APP_DB_USER
- _APP_DB_PASS
appwrite-assistant:
image: appwrite/assistant:0.2.1
container_name: appwrite-assistant
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
environment:
- _APP_ASSISTANT_OPENAI_API_KEY
# appwrite-assistant:
# image: appwrite/assistant:0.2.1
# container_name: appwrite-assistant
# <<: *x-logging
# restart: unless-stopped
# networks:
# - appwrite
# environment:
# - _APP_ASSISTANT_OPENAI_API_KEY
openruntimes-executor:
container_name: openruntimes-executor

File diff suppressed because one or more lines are too long

View File

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