Update port numbers for services

This commit is contained in:
Andras Bacsai 2024-03-12 19:09:08 +01:00
parent 336d44a5cc
commit c835c02bf2
7 changed files with 35 additions and 30 deletions

View File

@ -637,7 +637,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
} else {
$tempServiceName = $serviceName;
}
if (str(data_get($service,'image'))->contains('glitchtip')) {
if (str(data_get($service, 'image'))->contains('glitchtip')) {
$tempServiceName = 'glitchtip';
}
$serviceDefinition = data_get($allServices, $tempServiceName);
@ -1023,21 +1023,18 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
$savedService->save();
}
// Caddy needs exact port in some cases.
ray($predefinedPort, $key, $fqdn);
if ($predefinedPort && !$key->endsWith("_{$predefinedPort}")) {
if ($resource->server->proxyType() === 'CADDY') {
$env = EnvironmentVariable::where([
'key' => $key,
'service_id' => $resource->id,
])->first();
if ($env) {
$env_url = Url::fromString($env->value);
$env_port = $env_url->getPort();
if ($env_port !== $predefinedPort) {
$env_url = $env_url->withPort($predefinedPort);
$savedService->fqdn = $env_url->__toString();
$savedService->save();
}
if ($predefinedPort && !$key->endsWith("_{$predefinedPort}") && $command?->value() === 'FQDN' && $resource->server->proxyType() === 'CADDY') {
$env = EnvironmentVariable::where([
'key' => $key,
'service_id' => $resource->id,
])->first();
if ($env) {
$env_url = Url::fromString($env->value);
$env_port = $env_url->getPort();
if ($env_port !== $predefinedPort) {
$env_url = $env_url->withPort($predefinedPort);
$savedService->fqdn = $env_url->__toString();
$savedService->save();
}
}
}

View File

@ -289,10 +289,10 @@ class="w-full text-white rounded input input-sm bg-coolgray-200 disabled:bg-cool
</div>
@endforelse
</div>
@if ($isDatabase)
{{-- @if ($isDatabase)
<div class="text-center">Swarm clusters are excluded from this type of resource at the moment. It will
be activated soon. Stay tuned.</div>
@endif
@endif --}}
@endif
@if ($current_step === 'destinations')
<ul class="pb-10 steps">

View File

@ -2,6 +2,7 @@
# slogan: Fast analytics with the friendly UX and integrated tooling to let your company explore data on their own.
# tags: analytics,bi,business,intelligence
# logo: svgs/metabase.svg
# port: 3000
services:
metabase:
@ -9,7 +10,7 @@ services:
volumes:
- /dev/urandom:/dev/random:ro
environment:
- SERVICE_FQDN_METABASE
- SERVICE_FQDN_METABASE_3000
- MB_DB_TYPE=postgres
- MB_DB_HOST=postgresql
- MB_DB_PORT=5432

View File

@ -1,12 +1,13 @@
# documentation: https://github.com/alexta69/metube
# slogan: A web GUI for youtube-dl with playlist support. It enables you to effortlessly download videos from YouTube and dozens of other sites.
# tags: youtube, download, videos, playlist
# port: 8081
services:
metube:
image: ghcr.io/alexta69/metube:latest
environment:
- SERVICE_FQDN_METUBE
- SERVICE_FQDN_METUBE_8081
- UID=1000
- GID=1000
volumes:

View File

@ -2,6 +2,7 @@
# slogan: Moodle is the worlds most customisable and trusted eLearning solution that empowers educators to improve our world.
# tags: moodle, elearning, education, lms, cms, open, source, low, code
# logo: svgs/moodle.png
# port: 8080
services:
mariadb:
@ -20,7 +21,7 @@ services:
moodle:
image: docker.io/bitnami/moodle:4.3
environment:
- SERVICE_FQDN_MOODLE
- SERVICE_FQDN_MOODLE_8080
- MOODLE_DATABASE_HOST=mariadb
- MOODLE_DATABASE_PORT_NUMBER=3306
- MOODLE_DATABASE_USER=$SERVICE_USER_MARIADB

View File

@ -2,12 +2,13 @@
# slogan: n8n is an extendable workflow automation tool.
# tags: n8n,workflow,automation,open,source,low,code
# logo: svgs/n8n.png
# port: 5678
services:
n8n:
image: docker.n8n.io/n8nio/n8n
environment:
- SERVICE_FQDN_N8N
- SERVICE_FQDN_N8N_5678
- N8N_EDITOR_BASE_URL=${SERVICE_FQDN_N8N}
- WEBHOOK_URL=${SERVICE_FQDN_N8N}
- N8N_HOST=${SERVICE_URL_N8N}

View File

@ -444,7 +444,7 @@
"metabase": {
"documentation": "https:\/\/www.metabase.com",
"slogan": "Fast analytics with the friendly UX and integrated tooling to let your company explore data on their own.",
"compose": "c2VydmljZXM6CiAgbWV0YWJhc2U6CiAgICBpbWFnZTog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OgogICAgICAtICdQT1NUR1JFU19VU0VSPSR7U0VSVklDRV9VU0VSX1BPU1RHUkVTUUx9JwogICAgICAtICdQT1NUR1JFU19QQVNTV09SRD0ke1NFUlZJQ0VfUEFTU1dPUkRfUE9TVEdSRVNRTH0nCiAgICAgIC0gJ1BPU1RHUkVTX0RCPSR7UE9TVEdSRVNRTF9EQVRBQkFTRTotbWV0YWJhc2V9JwogICAgaGVhbHRoY2hlY2s6CiAgICAgIHRlc3Q6CiAgICAgICAgLSBDTUQtU0hFTEwKICAgICAgICAtICdwZ19pc3JlYWR5IC1VICQke1BPU1RHUkVTX1VTRVJ9IC1kICQke1BPU1RHUkVTX0RCfScKICAgICAgaW50ZXJ2YWw6IDVzCiAgICAgIHRpbWVvdXQ6IDIwcwogICAgICByZXRyaWVzOiAxMAo=",
"tags": [
"analytics",
"bi",
@ -452,12 +452,13 @@
"intelligence"
],
"logo": "svgs\/metabase.svg",
"minversion": "0.0.0"
"minversion": "0.0.0",
"port": "3000"
},
"metube": {
"documentation": "https:\/\/github.com\/alexta69\/metube",
"slogan": "A web GUI for youtube-dl with playlist support. It enables you to effortlessly download videos from YouTube and dozens of other sites.",
"compose": "c2VydmljZXM6CiAgbWV0dWJlOgogICAgaW1hZ2U6ICdnaGNyLmlvL2FsZXh0YTY5L21ldHViZTpsYXRlc3QnCiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBTRVJWSUNFX0ZRRE5fTUVUVUJFCiAgICAgIC0gVUlEPTEwMDAKICAgICAgLSBHSUQ9MTAwMAogICAgdm9sdW1lczoKICAgICAgLSAnbWV0dWJlLWRvd25sb2FkczovZG93bmxvYWRzJwogICAgaGVhbHRoY2hlY2s6CiAgICAgIHRlc3Q6CiAgICAgICAgLSBDTUQKICAgICAgICAtIGN1cmwKICAgICAgICAtICctZicKICAgICAgICAtICdodHRwOi8vbG9jYWxob3N0OjgwODEnCiAgICAgIGludGVydmFsOiAycwogICAgICB0aW1lb3V0OiAxMHMKICAgICAgcmV0cmllczogMTUK",
"compose": "c2VydmljZXM6CiAgbWV0dWJlOgogICAgaW1hZ2U6ICdnaGNyLmlvL2FsZXh0YTY5L21ldHViZTpsYXRlc3QnCiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBTRVJWSUNFX0ZRRE5fTUVUVUJFXzgwODEKICAgICAgLSBVSUQ9MTAwMAogICAgICAtIEdJRD0xMDAwCiAgICB2b2x1bWVzOgogICAgICAtICdtZXR1YmUtZG93bmxvYWRzOi9kb3dubG9hZHMnCiAgICBoZWFsdGhjaGVjazoKICAgICAgdGVzdDoKICAgICAgICAtIENNRAogICAgICAgIC0gY3VybAogICAgICAgIC0gJy1mJwogICAgICAgIC0gJ2h0dHA6Ly9sb2NhbGhvc3Q6ODA4MScKICAgICAgaW50ZXJ2YWw6IDJzCiAgICAgIHRpbWVvdXQ6IDEwcwogICAgICByZXRyaWVzOiAxNQo=",
"tags": [
"youtube",
"download",
@ -465,7 +466,8 @@
"playlist"
],
"logo": "svgs\/unknown.svg",
"minversion": "0.0.0"
"minversion": "0.0.0",
"port": "8081"
},
"minio": {
"documentation": "https:\/\/min.io\/docs\/minio\/container\/index.html",
@ -484,7 +486,7 @@
"moodle": {
"documentation": "https:\/\/moodle.org",
"slogan": "Moodle is the world\u2019s most customisable and trusted eLearning solution that empowers educators to improve our world.",
"compose": "c2VydmljZXM6CiAgbWFyaWFkYjoKICAgIGltYWdlOiAnbWFyaWFkYjoxMS4xJwogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gQUxMT1dfRU1QVFlfUEFTU1dPUkQ9bm8KICAgICAgLSBNWVNRTF9ST09UX1BBU1NXT1JEPSRTRVJWSUNFX1BBU1NXT1JEX1JPT1QKICAgICAgLSBNWVNRTF9EQVRBQkFTRT1iaXRuYW1pX21vb2RsZQogICAgICAtIE1ZU1FMX1VTRVI9JFNFUlZJQ0VfVVNFUl9NQVJJQURCCiAgICAgIC0gTVlTUUxfUEFTU1dPUkQ9JFNFUlZJQ0VfUEFTU1dPUk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XJ9JwogICAgICAtIE1PT0RMRV9QQVNTV09SRD0kU0VSVklDRV9QQVNTV09SRF9NT09ETEUKICAgICAgLSBNT09ETEVfRU1BSUw9dXNlckBleGFtcGxlLmNvbQogICAgICAtICdNT09ETEVfU0lURV9OQU1FPSR7TU9PRExFX1NJVEVfTkFNRTotTmV3IFNpdGV9JwogICAgdm9sdW1lczoKICAgICAgLSAnbW9vZGxlLWRhdGE6L2JpdG5hbWkvbW9vZGxlJwogICAgICAtICdtb29kbGVkYXRhLWRhdGE6L2JpdG5hbWkvbW9vZGxlZGF0YScKICAgIGRlcGVuZHNfb246CiAgICAgIC0gbWFyaWFkYgo=",
"tags": [
"moodle",
"elearning",
@ -497,7 +499,8 @@
"code"
],
"logo": "svgs\/moodle.png",
"minversion": "0.0.0"
"minversion": "0.0.0",
"port": "8080"
},
"n8n-with-postgresql": {
"documentation": "https:\/\/n8n.io",
@ -518,7 +521,7 @@
"n8n": {
"documentation": "https:\/\/n8n.io",
"slogan": "n8n is an extendable workflow automation tool.",
"compose": "c2VydmljZXM6CiAgbjhuOgogICAgaW1hZ2U6IGRvY2tlci5uOG4uaW8vbjhuaW8vbjhuCiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBTRVJWSUNFX0ZRRE5fTjhOCiAgICAgIC0gJ044Tl9FRElUT1JfQkFTRV9VUkw9JHtTRVJWSUNFX0ZRRE5fTjhOfScKICAgICAgLSAnV0VCSE9PS19VUkw9JHtTRVJWSUNFX0ZRRE5fTjhOfScKICAgICAgLSAnTjhOX0hPU1Q9JHtTRVJWSUNFX1VSTF9OOE59JwogICAgICAtICdHRU5FUklDX1RJTUVaT05FPSJFdXJvcGUvQmVybGluIicKICAgICAgLSAnVFo9IkV1cm9wZS9CZXJsaW4iJwogICAgdm9sdW1lczoKICAgICAgLSAnbjhuLWRhdGE6L2hvbWUvbm9kZS8ubjhuJwo=",
"compose": "c2VydmljZXM6CiAgbjhuOgogICAgaW1hZ2U6IGRvY2tlci5uOG4uaW8vbjhuaW8vbjhuCiAgICBlbnZpcm9ubWVudDoKICAgICAgLSBTRVJWSUNFX0ZRRE5fTjhOXzU2NzgKICAgICAgLSAnTjhOX0VESVRPUl9CQVNFX1VSTD0ke1NFUlZJQ0VfRlFETl9OOE59JwogICAgICAtICdXRUJIT09LX1VSTD0ke1NFUlZJQ0VfRlFETl9OOE59JwogICAgICAtICdOOE5fSE9TVD0ke1NFUlZJQ0VfVVJMX044Tn0nCiAgICAgIC0gJ0dFTkVSSUNfVElNRVpPTkU9IkV1cm9wZS9CZXJsaW4iJwogICAgICAtICdUWj0iRXVyb3BlL0JlcmxpbiInCiAgICB2b2x1bWVzOgogICAgICAtICduOG4tZGF0YTovaG9tZS9ub2RlLy5uOG4nCg==",
"tags": [
"n8n",
"workflow",
@ -529,7 +532,8 @@
"code"
],
"logo": "svgs\/n8n.png",
"minversion": "0.0.0"
"minversion": "0.0.0",
"port": "5678"
},
"next-image-transformation": {
"documentation": "https:\/\/github.com\/coollabsio\/next-image-transformation",