fix doclinks

This commit is contained in:
Andras Bacsai 2022-11-03 15:37:39 +01:00
parent ba2db666aa
commit 363755c3bf
7 changed files with 37 additions and 42 deletions

View File

@ -1,5 +1,6 @@
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: v1.8.6 defaultVersion: v1.8.6
documentation: https://docs.appsmith.com/getting-started/setup/instance-configuration/
type: appsmith type: appsmith
name: Appsmith name: Appsmith
services: services:
@ -12,7 +13,7 @@
volumes: volumes:
- $$id-stacks-data:/appsmith-stacks - $$id-stacks-data:/appsmith-stacks
ports: ports:
- '8080' - '80'
variables: variables:
- id: $$config_appsmith_mail_enabled - id: $$config_appsmith_mail_enabled
name: APPSMITH_MAIL_ENABLED name: APPSMITH_MAIL_ENABLED
@ -29,9 +30,9 @@
label: Disable Intercom label: Disable Intercom
defaultValue: 'true' defaultValue: 'true'
description: '' description: ''
documentation: https://hub.docker.com/r/zadam/trilium
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 0.56.2 defaultVersion: 0.56.2
documentation: https://hub.docker.com/r/zadam/trilium
type: trilium type: trilium
name: Trilium Notes name: Trilium Notes
services: services:
@ -43,9 +44,9 @@
ports: ports:
- '8080' - '8080'
variables: [] variables: []
documentation: https://hub.docker.com/r/zadam/trilium
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 1.9.2 defaultVersion: 1.9.2
documentation: https://hub.docker.com/r/louislam/uptime-kuma
type: uptimekuma type: uptimekuma
name: UptimeKuma name: UptimeKuma
services: services:
@ -57,9 +58,9 @@
ports: ports:
- '3001' - '3001'
variables: [] variables: []
documentation: https://hub.docker.com/r/louislam/uptime-kuma
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 5.8 defaultVersion: 5.8
documentation: https://hub.docker.com/r/silviof/docker-languagetool
type: languagetool type: languagetool
name: LanguageTool name: LanguageTool
services: services:
@ -71,9 +72,9 @@
ports: ports:
- '8010' - '8010'
variables: [] variables: []
documentation: https://hub.docker.com/r/silviof/docker-languagetool
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 1.26.0 defaultVersion: 1.26.0
documentation: https://hub.docker.com/r/vaultwarden/server
type: vaultwarden type: vaultwarden
name: VaultWarden name: VaultWarden
services: services:
@ -85,9 +86,9 @@
ports: ports:
- '80' - '80'
variables: [] variables: []
documentation: https://hub.docker.com/r/vaultwarden/server
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 9.2.3 defaultVersion: 9.2.3
documentation: https://hub.docker.com/r/grafana/grafana
type: grafana type: grafana
name: Grafana name: Grafana
description: >- description: >-
@ -103,12 +104,11 @@
ports: ports:
- '3000' - '3000'
variables: [] variables: []
documentation: https://hub.docker.com/r/grafana/grafana
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 1.0.3 defaultVersion: 1.0.3
documentation: https://appwrite.io/docs
type: appwrite type: appwrite
name: Appwrite name: Appwrite
documentation: https://appwrite.io/docs
description: Secure Backend Server for Web, Mobile & Flutter Developers. description: Secure Backend Server for Web, Mobile & Flutter Developers.
services: services:
"$$id": "$$id":
@ -1122,6 +1122,7 @@
The default value is 15 minutes. The default value is 15 minutes.
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: latest defaultVersion: latest
documentation: https://docs.weblate.org/en/latest/admin/install/docker.html
type: weblate type: weblate
name: Weblate name: Weblate
description: '' description: ''
@ -1197,6 +1198,7 @@
description: '' description: ''
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 2022.10.14-1a5b0965 defaultVersion: 2022.10.14-1a5b0965
documentation: https://docs.searxng.org/
type: searxng type: searxng
name: SearXNG name: SearXNG
description: '' description: ''
@ -1270,6 +1272,7 @@
description: '' description: ''
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: v2.0.6 defaultVersion: v2.0.6
documentation: https://glitchtip.com/documentation
type: glitchtip type: glitchtip
name: GlitchTip name: GlitchTip
description: '' description: ''
@ -1488,6 +1491,7 @@
description: '' description: ''
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: v2.13.0 defaultVersion: v2.13.0
documentation: https://hasura.io/docs/latest/index/
type: hasura type: hasura
name: Hasura name: Hasura
description: 'Instant realtime GraphQL APIs on any Postgres application, existing or new.' description: 'Instant realtime GraphQL APIs on any Postgres application, existing or new.'
@ -1551,6 +1555,7 @@
description: '' description: ''
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: postgresql-v1.38.0 defaultVersion: postgresql-v1.38.0
documentation: https://umami.is/docs/getting-started
type: umami-postgresql type: umami-postgresql
name: Umami (PostgreSQL) name: Umami (PostgreSQL)
description: >- description: >-
@ -1760,6 +1765,7 @@
showOnConfiguration: true showOnConfiguration: true
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: v0.29.1 defaultVersion: v0.29.1
documentation: https://docs.meilisearch.com/learn/getting_started/quick_start.html
type: meilisearch type: meilisearch
name: MeiliSearch name: MeiliSearch
description: >- description: >-
@ -1789,6 +1795,7 @@
showOnConfiguration: true showOnConfiguration: true
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: latest defaultVersion: latest
documentation: https://ghost.org/resources/
type: ghost-mariadb type: ghost-mariadb
name: Ghost (MariaDB) name: Ghost (MariaDB)
description: >- description: >-
@ -1903,6 +1910,7 @@
description: '' description: ''
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: '5.22' defaultVersion: '5.22'
documentation: https://ghost.org/resources/
type: ghost-only type: ghost-only
name: Ghost Only (No Database) name: Ghost Only (No Database)
description: >- description: >-
@ -1967,6 +1975,7 @@
required: true required: true
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: '5.22' defaultVersion: '5.22'
documentation: https://ghost.org/resources/
type: ghost-mysql type: ghost-mysql
name: Ghost (MySQL) name: Ghost (MySQL)
description: >- description: >-
@ -2044,6 +2053,7 @@
description: '' description: ''
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: php8.1 defaultVersion: php8.1
documentation: https://wordpress.org/
type: wordpress type: wordpress
name: WordPress (with MySQL) name: WordPress (with MySQL)
description: WordPress is a content management system based on PHP with new MySQL database. description: WordPress is a content management system based on PHP with new MySQL database.
@ -2129,6 +2139,7 @@
readOnly: true readOnly: true
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: php8.1 defaultVersion: php8.1
documentation: https://wordpress.org/
type: wordpress-only type: wordpress-only
name: WordPress Only (No Database) name: WordPress Only (No Database)
description: WordPress is a content management system based on PHP without MySQL. description: WordPress is a content management system based on PHP without MySQL.
@ -2198,6 +2209,7 @@
@ini_set('display_errors', 0); @ini_set('display_errors', 0);
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 4.7.1 defaultVersion: 4.7.1
documentation: https://coder.com/docs/coder-oss/latest
type: vscodeserver type: vscodeserver
name: VSCode Server name: VSCode Server
description: >- description: >-
@ -2227,6 +2239,7 @@
showOnConfiguration: true showOnConfiguration: true
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: RELEASE.2022-10-15T19-57-03Z defaultVersion: RELEASE.2022-10-15T19-57-03Z
documentation: https://min.io/docs/minio
type: minio type: minio
name: MinIO name: MinIO
description: ' MinIO is a cloud storage server compatible with Amazon S3' description: ' MinIO is a cloud storage server compatible with Amazon S3'
@ -2282,6 +2295,7 @@
showOnConfiguration: true showOnConfiguration: true
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 0.21.1 defaultVersion: 0.21.1
documentation: https://fider.io/docs
type: fider type: fider
name: Fider name: Fider
description: Fider is a platform to collect and organize customer feedback. description: Fider is a platform to collect and organize customer feedback.
@ -2399,6 +2413,7 @@
description: '' description: ''
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 0.198.1 defaultVersion: 0.198.1
documentation: https://docs.n8n.io
type: n8n type: n8n
name: n8n.io name: n8n.io
description: n8n is a free and open node based Workflow Automation Tool. description: n8n is a free and open node based Workflow Automation Tool.
@ -2424,6 +2439,7 @@
description: '' description: ''
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: stable defaultVersion: stable
documentation: https://plausible.io/doc/
type: plausibleanalytics type: plausibleanalytics
name: Plausible Analytics name: Plausible Analytics
description: Plausible is a lightweight and open-source website analytics tool. description: Plausible is a lightweight and open-source website analytics tool.
@ -2568,6 +2584,7 @@
description: This is the default script name. description: This is the default script name.
- templateVersion: 1.0.0 - templateVersion: 1.0.0
defaultVersion: 0.98.1 defaultVersion: 0.98.1
documentation: https://docs.nocodb.com
type: nocodb type: nocodb
name: NocoDB name: NocoDB
description: >- description: >-
@ -2641,4 +2658,3 @@
label: NocoDB Disable Telemetry label: NocoDB Disable Telemetry
defaultValue: '1' defaultValue: '1'
description: Disable telemetry (Enter "1" to disable). description: Disable telemetry (Enter "1" to disable).
documentation: See https://github.com/nocodb/nocodb

View File

@ -432,10 +432,10 @@ async function plausibleAnalytics(service: any, template: any) {
async function migrateSettings(settings: any[], service: any, template: any) { async function migrateSettings(settings: any[], service: any, template: any) {
for (const setting of settings) { for (const setting of settings) {
if (!setting) continue; if (!setting) continue;
console.log(setting)
let [name, value] = setting.split('@@@') let [name, value] = setting.split('@@@')
let minio = null let minio = name
if (name === 'MINIO_SERVER_URL') { if (name === 'MINIO_SERVER_URL') {
minio = name
name = 'coolify_fqdn_minio_console' name = 'coolify_fqdn_minio_console'
} }
if (!value || value === 'null') { if (!value || value === 'null') {

View File

@ -150,6 +150,7 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
} }
parsedTemplate[realKey] = { parsedTemplate[realKey] = {
name, name,
documentation: value.documentation || foundTemplate.documentation || 'https://docs.coollabs.io',
image: value.image, image: value.image,
environment: [], environment: [],
fqdns: [], fqdns: [],
@ -216,9 +217,9 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
if (service.serviceSetting.length > 0) { if (service.serviceSetting.length > 0) {
for (const setting of service.serviceSetting) { for (const setting of service.serviceSetting) {
const { value, variableName } = setting const { value, variableName } = setting
const regex = new RegExp(`\\$\\$config_${variableName.replace('$$config_','')}\\"`, 'gi') const regex = new RegExp(`\\$\\$config_${variableName.replace('$$config_', '')}\\"`, 'gi')
if (value === '$$generate_fqdn') { if (value === '$$generate_fqdn') {
strParsedTemplate = strParsedTemplate.replaceAll(regex, service.fqdn + "\"" || '' + "\"") strParsedTemplate = strParsedTemplate.replaceAll(regex, service.fqdn + "\"" || '' + "\"")
} else if (value === '$$generate_domain') { } else if (value === '$$generate_domain') {
strParsedTemplate = strParsedTemplate.replaceAll(regex, getDomain(service.fqdn) + "\"") strParsedTemplate = strParsedTemplate.replaceAll(regex, getDomain(service.fqdn) + "\"")
} else if (service.destinationDocker?.network && value === '$$generate_network') { } else if (service.destinationDocker?.network && value === '$$generate_network') {

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
export let service: any; export let service: any;
import { status } from '$lib/store'; export let template: any;
import { page } from '$app/stores'; import { page } from '$app/stores';
import ServiceLinks from './_ServiceLinks.svelte'; import ServiceLinks from './_ServiceLinks.svelte';
</script> </script>
@ -10,7 +10,7 @@
<span>General</span> <span>General</span>
</li> </li>
<li class="rounded"> <li class="rounded">
<ServiceLinks {service} linkToDocs={true} /> <ServiceLinks {template} {service} linkToDocs={true} />
</li> </li>
<li class="rounded" class:bg-coollabs={$page.url.pathname === `/services/${$page.params.id}`}> <li class="rounded" class:bg-coollabs={$page.url.pathname === `/services/${$page.params.id}`}>
<a href={`/services/${$page.params.id}`} class="no-underline w-full" <a href={`/services/${$page.params.id}`} class="no-underline w-full"

View File

@ -1,36 +1,14 @@
<script lang="ts"> <script lang="ts">
import DocLink from '$lib/components/DocLink.svelte'; import DocLink from '$lib/components/DocLink.svelte';
export let service: any; export let service: any;
export let template: any;
export let linkToDocs: boolean = false; export let linkToDocs: boolean = false;
import * as Icons from '$lib/components/svg/services'; import * as Icons from '$lib/components/svg/services';
const name: any = service.type && service.type[0].toUpperCase() + service.type.substring(1); const name: any = service.type && service.type[0].toUpperCase() + service.type.substring(1);
const links: any = {
plausible: 'https://plausible.io/doc/',
nocodb: 'https://docs.nocodb.com',
minio: 'https://min.io/docs/minio',
vscodeserver: 'https://coder.com/docs/coder-oss/latest',
wordpress: 'https://wordpress.org/',
vaultwarden: 'https://github.com/dani-garcia/vaultwarden',
languagetool: 'https://languagetool.org/dev',
n8n: 'https://docs.n8n.io',
uptimekuma: 'https://github.com/louislam/uptime-kuma',
ghost: 'https://ghost.org/resources/',
umami: 'https://umami.is/docs/getting-started',
hasura: 'https://hasura.io/docs/latest/index/',
fider: 'https://fider.io/docs',
appwrite: 'https://appwrite.io/docs',
moodle: 'https://docs.moodle.org/400/en/Main_page',
glitchtip: 'https://glitchtip.com/documentation',
searxng: 'https://searxng.org',
weblate: 'https://docs.weblate.org/en/latest/',
grafana: 'https://github.com/grafana/grafana',
trilium: 'https://github.com/zadam/trilium'
};
</script> </script>
{#if linkToDocs} {#if linkToDocs}
<DocLink url={links[service.type]} text={`Documentation`} isExternal={true} /> <DocLink url={template[service.id].documentation} text={`Documentation`} isExternal={true} />
{:else} {:else}
<svelte:component this={Icons[name]} /> <svelte:component this={Icons[name]} />
{/if} {/if}

View File

@ -55,7 +55,7 @@
<script lang="ts"> <script lang="ts">
export let service: any; export let service: any;
export let template: any;
import { page } from '$app/stores'; import { page } from '$app/stores';
import { del, get, post } from '$lib/api'; import { del, get, post } from '$lib/api';
import { t } from '$lib/translations'; import { t } from '$lib/translations';
@ -415,7 +415,7 @@
> >
{#if !$page.url.pathname.startsWith(`/services/${id}/configuration/`)} {#if !$page.url.pathname.startsWith(`/services/${id}/configuration/`)}
<nav class="header flex flex-col lg:pt-0 "> <nav class="header flex flex-col lg:pt-0 ">
<Menu {service} /> <Menu {service} {template} />
</nav> </nav>
{/if} {/if}
<div class="pt-0 col-span-0 lg:col-span-3 pb-24 px-4 lg:px-0"> <div class="pt-0 col-span-0 lg:col-span-3 pb-24 px-4 lg:px-0">