Refactor docker-compose files to remove version numbers

This commit is contained in:
Andras Bacsai 2024-05-08 09:23:36 +02:00
parent 3eb4aed867
commit fb80318553
18 changed files with 5 additions and 25 deletions

View File

@ -33,7 +33,6 @@ public function handle(StandaloneClickhouse $database)
$environment_variables = $this->generate_environment_variables();
$docker_compose = [
'version' => '3.8',
'services' => [
$container_name => [
'image' => $this->database->image,

View File

@ -107,7 +107,6 @@ public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|St
COPY nginx.conf /etc/nginx/nginx.conf
EOF;
$docker_compose = [
'version' => '3.8',
'services' => [
$proxyContainerName => [
'build' => [

View File

@ -36,7 +36,6 @@ public function handle(StandaloneDragonfly $database)
$environment_variables = $this->generate_environment_variables();
$docker_compose = [
'version' => '3.8',
'services' => [
$container_name => [
'image' => $this->database->image,

View File

@ -37,7 +37,6 @@ public function handle(StandaloneKeydb $database)
$this->add_custom_keydb();
$docker_compose = [
'version' => '3.8',
'services' => [
$container_name => [
'image' => $this->database->image,

View File

@ -32,7 +32,6 @@ public function handle(StandaloneMariadb $database)
$environment_variables = $this->generate_environment_variables();
$this->add_custom_mysql();
$docker_compose = [
'version' => '3.8',
'services' => [
$container_name => [
'image' => $this->database->image,

View File

@ -35,7 +35,6 @@ public function handle(StandaloneMongodb $database)
$this->add_custom_mongo_conf();
$docker_compose = [
'version' => '3.8',
'services' => [
$container_name => [
'image' => $this->database->image,

View File

@ -32,7 +32,6 @@ public function handle(StandaloneMysql $database)
$environment_variables = $this->generate_environment_variables();
$this->add_custom_mysql();
$docker_compose = [
'version' => '3.8',
'services' => [
$container_name => [
'image' => $this->database->image,

View File

@ -35,7 +35,6 @@ public function handle(StandalonePostgresql $database)
$this->add_custom_conf();
$docker_compose = [
'version' => '3.8',
'services' => [
$container_name => [
'image' => $this->database->image,

View File

@ -37,7 +37,6 @@ public function handle(StandaloneRedis $database)
$this->add_custom_redis();
$docker_compose = [
'version' => '3.8',
'services' => [
$container_name => [
'image' => $this->database->image,

View File

@ -1289,7 +1289,6 @@ private function generate_compose_file()
$this->application->parseHealthcheckFromDockerfile($dockerfile);
}
$docker_compose = [
'version' => '3.8',
'services' => [
$this->container_name => [
'image' => $this->production_image_name,

View File

@ -45,7 +45,7 @@ public function activityFinished()
public function check_status($showNotification = false)
{
GetContainersStatus::run($this->application->destination->server);
GetContainersStatus::run($this->database->destination->server);
// dispatch_sync(new ContainerStatusJob($this->database->destination->server));
$this->database->refresh();
if ($showNotification) $this->dispatch('success', 'Database status updated.');

View File

@ -637,7 +637,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
$allServices = getServiceTemplates();
$topLevelVolumes = collect(data_get($yaml, 'volumes', []));
$topLevelNetworks = collect(data_get($yaml, 'networks', []));
$dockerComposeVersion = data_get($yaml, 'version') ?? '3.8';
$services = data_get($yaml, 'services');
$generatedServiceFQDNS = collect([]);
@ -1192,7 +1191,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
return $service;
});
$finalServices = [
'version' => $dockerComposeVersion,
'services' => $services->toArray(),
'volumes' => $topLevelVolumes->toArray(),
'networks' => $topLevelNetworks->toArray(),
@ -1230,7 +1228,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
$topLevelVolumes = collect([]);
}
$topLevelNetworks = collect(data_get($yaml, 'networks', []));
$dockerComposeVersion = data_get($yaml, 'version') ?? '3.8';
$services = data_get($yaml, 'services');
$generatedServiceFQDNS = collect([]);
@ -1661,7 +1658,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
});
}
$finalServices = [
'version' => $dockerComposeVersion,
'services' => $services->toArray(),
'volumes' => $topLevelVolumes->toArray(),
'networks' => $topLevelNetworks->toArray(),

View File

@ -11,7 +11,6 @@ x-logging: &x-logging
options:
max-file: '5'
max-size: '10m'
version: '3'
services:
appwrite:

View File

@ -4,8 +4,6 @@
# logo: svgs/authentik.png
# port: 9000
version: "3.4"
services:
postgresql:
image: docker.io/library/postgres:12-alpine

View File

@ -4,7 +4,6 @@
# logo: svgs/glitchtip.png
# port: 8080
version: "3.8"
services:
postgres:
image: postgres:16-alpine

View File

@ -2,7 +2,6 @@
# slogan: Penpot is the first Open Source design and prototyping platform for product teams.
# tags: penpot,design,prototyping,figma,open,source
version: "3.5"
services:
frontend:
image: "penpotapp/frontend:latest"

View File

@ -4,7 +4,6 @@
# tags: analytics, privacy, google, alternative
# port: 8000
version: "3.3"
services:
plausible:
image: plausible/analytics:v2.0

File diff suppressed because one or more lines are too long