mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 04:13:51 +00:00
fixes
This commit is contained in:
1 parent
923241ce1e
commit
2e713b459e
11 files changed
+243
-93
No files matched your search
+134
-25
@@ -1,3 +1,59 @@
|
||||
- templateVersion: 1.0.0
|
||||
defaultVersion: 0.56.2
|
||||
type: trilium
|
||||
name: Trilium Notes
|
||||
services:
|
||||
$$id:
|
||||
image: zadam/trilium:$$core_version
|
||||
environment: []
|
||||
volumes:
|
||||
- $$id-trilium:/home/node/trilium-data
|
||||
ports:
|
||||
- '8080'
|
||||
variables: []
|
||||
documentation: https://hub.docker.com/r/zadam/trilium
|
||||
- templateVersion: 1.0.0
|
||||
defaultVersion: 1.9.2
|
||||
type: uptimekuma
|
||||
name: UptimeKuma
|
||||
services:
|
||||
$$id:
|
||||
image: louislam/uptime-kuma:$$core_version
|
||||
environment: []
|
||||
volumes:
|
||||
- $$id-uptimekuma:/app/data
|
||||
ports:
|
||||
- '3001'
|
||||
variables: []
|
||||
documentation: https://hub.docker.com/r/louislam/uptime-kuma
|
||||
- templateVersion: 1.0.0
|
||||
defaultVersion: 5.8
|
||||
type: languagetool
|
||||
name: LanguageTool
|
||||
services:
|
||||
$$id:
|
||||
image: silviof/docker-languagetool:$$core_version
|
||||
environment: []
|
||||
volumes:
|
||||
- $$id-ngrams:/ngrams
|
||||
ports:
|
||||
- '8010'
|
||||
variables: []
|
||||
documentation: https://hub.docker.com/r/silviof/docker-languagetool
|
||||
- templateVersion: 1.0.0
|
||||
defaultVersion: 1.26.0
|
||||
type: vaultwarden
|
||||
name: VaultWarden
|
||||
services:
|
||||
$$id:
|
||||
image: vaultwarden/server:$$core_version
|
||||
environment: []
|
||||
volumes:
|
||||
- $$id-data:/data
|
||||
ports:
|
||||
- '80'
|
||||
variables: []
|
||||
documentation: https://hub.docker.com/r/vaultwarden/server
|
||||
- templateVersion: 1.0.0
|
||||
defaultVersion: 9.2.3
|
||||
type: grafana
|
||||
@@ -39,8 +95,8 @@
|
||||
- _APP_OPTIONS_ABUSE=$$config__app_options_abuse
|
||||
- _APP_OPTIONS_FORCE_HTTPS=$$config__app_options_force_https
|
||||
- _APP_OPENSSL_KEY_V1=$$secret__app_openssl_key_v1
|
||||
- _APP_DOMAIN=$$generate_fqdn
|
||||
- _APP_DOMAIN_TARGET=$$generate_fqdn
|
||||
- _APP_DOMAIN=$$config__app_domain
|
||||
- _APP_DOMAIN_TARGET=$$config__app_domain_target
|
||||
- _APP_REDIS_HOST=$$config__app_redis_host
|
||||
- _APP_REDIS_PORT=$$config__app_redis_port
|
||||
- _APP_REDIS_USER=$$config__app_redis_user
|
||||
@@ -170,8 +226,8 @@
|
||||
environment:
|
||||
- _APP_ENV=$$config__app_env
|
||||
- _APP_OPENSSL_KEY_V1=$$secret__app_openssl_key_v1
|
||||
- _APP_DOMAIN=$$generate_fqdn
|
||||
- _APP_DOMAIN_TARGET=$$generate_fqdn
|
||||
- _APP_DOMAIN=$$config__app_domain
|
||||
- _APP_DOMAIN_TARGET=$$config__app_domain_target
|
||||
- _APP_REDIS_HOST=$$config__app_redis_host
|
||||
- _APP_REDIS_PORT=$$config__app_redis_port
|
||||
- _APP_REDIS_USER=$$config__app_redis_user
|
||||
@@ -272,7 +328,7 @@
|
||||
- OPEN_RUNTIMES_NETWORK=$$config_open_runtimes_network
|
||||
volumes: []
|
||||
entrypoint: usage --type database
|
||||
"$$id-usage-timeseries":
|
||||
"$$id-usage":
|
||||
image: appwrite/appwrite:$$core_version
|
||||
environment:
|
||||
- _APP_ENV=$$config__app_env
|
||||
@@ -340,8 +396,8 @@
|
||||
environment:
|
||||
- _APP_ENV=$$config__app_env
|
||||
- _APP_OPENSSL_KEY_V1=$$secret__app_openssl_key_v1
|
||||
- _APP_DOMAIN=$$generate_fqdn
|
||||
- _APP_DOMAIN_TARGET=$$generate_fqdn
|
||||
- _APP_DOMAIN=$$config__app_domain
|
||||
- _APP_DOMAIN_TARGET=$$config__app_domain_target
|
||||
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS=$$config__app_system_security_email_address
|
||||
- _APP_REDIS_HOST=$$config__app_redis_host
|
||||
- _APP_REDIS_PORT=$$config__app_redis_port
|
||||
@@ -503,7 +559,7 @@
|
||||
- id: "$$secret__app_db_root_pass"
|
||||
name: MARIADB_ROOT_PASSWORD
|
||||
label: MariaDB | _APP_DB_ROOT_PASS
|
||||
defaultValue: "$$generate_hex(16)"
|
||||
defaultValue: $$generate_hex(16)
|
||||
description: MariaDB server root password.
|
||||
- id: "$$config__app_db_schema"
|
||||
name: MARIADB_DATABASE
|
||||
@@ -518,7 +574,7 @@
|
||||
- id: "$$secret__app_db_pass"
|
||||
name: MARIADB_PASSWORD
|
||||
label: MariaDB | _APP_DB_PASS
|
||||
defaultValue: "$$generate_hex(16)"
|
||||
defaultValue: $$generate_hex(16)
|
||||
description: MariaDB server user password.
|
||||
- id: "$$config__app_influxdb_host"
|
||||
name: _APP_INFLUXDB_HOST
|
||||
@@ -622,18 +678,18 @@
|
||||
sensitive data on your server. Appwrite server encrypts all secret data on your
|
||||
server like webhooks, HTTP passwords, user sessions, and storage files. Keep
|
||||
it a secret and have a backup for it.
|
||||
- id: "$$generate_fqdn"
|
||||
- id: "$$config__app_domain"
|
||||
name: _APP_DOMAIN
|
||||
label: General | _APP_DOMAIN
|
||||
defaultValue: localhost
|
||||
defaultValue: $$generate_domain
|
||||
description: Your Appwrite domain address. When setting a public suffix domain,
|
||||
Appwrite will attempt to issue a valid SSL certificate automatically. When used
|
||||
with a dev domain, Appwrite will assign a self-signed SSL certificate. The default
|
||||
value is 'localhost'.
|
||||
- id: "$$generate_fqdn"
|
||||
- id: "$$config__app_domain_target"
|
||||
name: _APP_DOMAIN_TARGET
|
||||
label: General | _APP_DOMAIN_TARGET
|
||||
defaultValue: localhost
|
||||
defaultValue: $$generate_fqdn
|
||||
description: A DNS A record hostname to serve as a CNAME target for your Appwrite
|
||||
custom domains. You can use the same value as used for the Appwrite '_APP_DOMAIN'
|
||||
variable. The default value is 'localhost'.
|
||||
@@ -1214,12 +1270,12 @@
|
||||
image: 'glitchtip/glitchtip:$$core_version'
|
||||
volumes: []
|
||||
environment:
|
||||
- PORT=3000
|
||||
- GLITCHTIP_DOMAIN=$$config_glitchtip_domain
|
||||
- SECRET_KEY=$$secret_secret_key
|
||||
- DATABASE_URL=$$secret_database_url
|
||||
- REDIS_URL=$$secret_redis_url
|
||||
- DEFAULT_FROM_EMAIL=$$config_default_from_email
|
||||
- EMAIL_URL=$$secret_email_url
|
||||
- EMAIL_HOST=$$config_email_host
|
||||
- EMAIL_PORT=$$config_email_port
|
||||
- EMAIL_HOST_USER=$$config_email_host_user
|
||||
@@ -1233,8 +1289,41 @@
|
||||
- DJANGO_SUPERUSER_EMAIL=$$config_django_superuser_email
|
||||
- DJANGO_SUPERUSER_PASSWORD=$$secret_django_superuser_password
|
||||
- DJANGO_SUPERUSER_USERNAME=$$config_django_superuser_username
|
||||
- CELERY_WORKER_CONCURRENCY=$$config_celery_worker_concurrency
|
||||
ports:
|
||||
- '8000'
|
||||
- '8080'
|
||||
$$id-worker:
|
||||
name: Celery Worker
|
||||
command: ./bin/run-celery-with-beat.sh
|
||||
depends_on:
|
||||
- $$id-postgresql
|
||||
- $$id-redis
|
||||
image: 'glitchtip/glitchtip:$$core_version'
|
||||
environment:
|
||||
- GLITCHTIP_DOMAIN=$$config_glitchtip_domain
|
||||
- SECRET_KEY=$$secret_secret_key
|
||||
- DATABASE_URL=$$secret_database_url
|
||||
- REDIS_URL=$$secret_redis_url
|
||||
- DEFAULT_FROM_EMAIL=$$config_default_from_email
|
||||
- EMAIL_URL=$$secret_email_url
|
||||
- CELERY_WORKER_CONCURRENCY=$$config_celery_worker_concurrency
|
||||
ports: []
|
||||
$$id-migrate:
|
||||
exclude: true
|
||||
name: Migrate
|
||||
command: ./manage.py migrate
|
||||
depends_on:
|
||||
- $$id-postgresql
|
||||
- $$id-redis
|
||||
image: 'glitchtip/glitchtip:$$core_version'
|
||||
environment:
|
||||
- GLITCHTIP_DOMAIN=$$config_glitchtip_domain
|
||||
- SECRET_KEY=$$secret_secret_key
|
||||
- DATABASE_URL=$$secret_database_url
|
||||
- REDIS_URL=$$secret_redis_url
|
||||
- DEFAULT_FROM_EMAIL=$$config_default_from_email
|
||||
- EMAIL_URL=$$secret_email_url
|
||||
ports: []
|
||||
$$id-postgresql:
|
||||
name: PostgreSQL
|
||||
depends_on: []
|
||||
@@ -1255,11 +1344,23 @@
|
||||
environment: []
|
||||
ports: []
|
||||
variables:
|
||||
- id: $$config_celery_worker_concurrency
|
||||
main: $$id-worker
|
||||
name: CELERY_WORKER_CONCURRENCY
|
||||
label: Celery Worker Concurrency
|
||||
defaultValue: '2'
|
||||
description: ''
|
||||
- id: $$config_glitchtip_domain
|
||||
name: GLITCHTIP_DOMAIN
|
||||
label: GlitchTip Domain
|
||||
defaultValue: $$generate_fqdn
|
||||
description: ''
|
||||
- id: $$secret_email_url
|
||||
name: EMAIL_URL
|
||||
label: SMTP Email URL
|
||||
defaultValue: >-
|
||||
smtp://$$config_email_host_user:$$secret_email_host_password@$$config_email_host:$$config_email_port
|
||||
description: ''
|
||||
- id: $$secret_database_url
|
||||
name: DATABASE_URL
|
||||
label: Database URL for PostgreSQL
|
||||
@@ -1321,11 +1422,13 @@
|
||||
label: Mailgun API Key
|
||||
defaultValue: ''
|
||||
description: ''
|
||||
showOnConfiguration: true
|
||||
- id: $$secret_sendgrid_api_key
|
||||
name: SENDGRID_API_KEY
|
||||
label: Sendgrid API Key
|
||||
defaultValue: ''
|
||||
description: ''
|
||||
showOnConfiguration: true
|
||||
- id: $$config_enable_open_user_registration
|
||||
name: ENABLE_OPEN_USER_REGISTRATION
|
||||
label: Enable Open User Registration
|
||||
@@ -1334,12 +1437,12 @@
|
||||
- id: $$config_django_superuser_email
|
||||
name: DJANGO_SUPERUSER_EMAIL
|
||||
label: Django Superuser Email
|
||||
defaultValue: ''
|
||||
defaultValue: noreply@example.com
|
||||
description: ''
|
||||
- id: $$config_django_superuser_username
|
||||
name: DJANGO_SUPERUSER_USERNAME
|
||||
label: Django Superuser Username
|
||||
defaultValue: ''
|
||||
defaultValue: $$generate_username
|
||||
description: ''
|
||||
- id: $$secret_django_superuser_password
|
||||
name: DJANGO_SUPERUSER_PASSWORD
|
||||
@@ -1356,13 +1459,13 @@
|
||||
main: $$id-postgresql
|
||||
name: POSTGRES_PASSWORD
|
||||
label: PostgreSQL Password
|
||||
defaultValue: ''
|
||||
defaultValue: $$generate_password
|
||||
description: ''
|
||||
- id: $$config_postgres_db
|
||||
main: $$id-postgresql
|
||||
name: POSTGRES_DB
|
||||
label: PostgreSQL Database
|
||||
defaultValue: hasura
|
||||
defaultValue: glitchtip
|
||||
description: ''
|
||||
- templateVersion: 1.0.0
|
||||
defaultVersion: v2.13.0
|
||||
@@ -1429,8 +1532,8 @@
|
||||
description: ''
|
||||
- templateVersion: 1.0.0
|
||||
defaultVersion: postgresql-v1.38.0
|
||||
type: umami
|
||||
name: Umami
|
||||
type: umami-postgresql
|
||||
name: Umami (PostgreSQL)
|
||||
description: >-
|
||||
Umami is a simple, easy to use, self-hosted web analytics solution. The goal
|
||||
is to provide you with a friendly privacy-focused alternative to Google
|
||||
@@ -1446,7 +1549,7 @@
|
||||
environment:
|
||||
- ADMIN_PASSWORD=$$secret_admin_password
|
||||
- DATABASE_URL=$$secret_database_url
|
||||
- DATABASE_TYPE=postgresql
|
||||
- DATABASE_TYPE=$$config_database_type
|
||||
- HASH_SALT=$$secret_hash_salt
|
||||
ports:
|
||||
- '3000'
|
||||
@@ -1610,6 +1713,11 @@
|
||||
label: Hash Salt
|
||||
defaultValue: $$generate_hex(64)
|
||||
description: ''
|
||||
- id: $$config_database_type
|
||||
name: DATABASE_TYPE
|
||||
label: Database Type
|
||||
defaultValue: 'postgresql'
|
||||
description: ''
|
||||
- id: $$config_postgres_user
|
||||
name: POSTGRES_USER
|
||||
label: PostgreSQL User
|
||||
@@ -1711,7 +1819,7 @@
|
||||
- id: $$config_ghost_host
|
||||
name: GHOST_HOST
|
||||
label: Ghost Host
|
||||
defaultValue: ''
|
||||
defaultValue: $$generate_domain
|
||||
description: ''
|
||||
- id: $$config_ghost_enable_https
|
||||
name: GHOST_ENABLE_HTTPS
|
||||
@@ -1728,6 +1836,7 @@
|
||||
label: Ghost Default Password
|
||||
defaultValue: $$generate_password
|
||||
description: ''
|
||||
showOnConfiguration: true
|
||||
- id: $$config_ghost_database_host
|
||||
name: GHOST_DATABASE_HOST
|
||||
label: Ghost Database Host
|
||||
@@ -1879,7 +1988,7 @@
|
||||
- templateVersion: 1.0.0
|
||||
defaultVersion: php8.1
|
||||
type: wordpress-only
|
||||
name: WordPress (without MySQL)
|
||||
name: WordPress Only (No Database)
|
||||
description: WordPress is a content management system based on PHP without MySQL.
|
||||
services:
|
||||
$$id:
|
||||
@@ -2148,7 +2257,7 @@
|
||||
description: ''
|
||||
- templateVersion: 1.0.0
|
||||
defaultVersion: 0.198.1
|
||||
type: n8nio
|
||||
type: n8n
|
||||
name: n8n.io
|
||||
description: n8n is a free and open node based Workflow Automation Tool.
|
||||
services:
|
||||
|
||||
+31
-28
@@ -113,18 +113,20 @@ export async function migrateServicesToNewTemplate() {
|
||||
}
|
||||
}
|
||||
async function appwrite(service: any, template: any) {
|
||||
const { opensslKeyV1, executorSecret, mariadbUser, mariadbPassword, mariadbRootUserPassword, mariadbDatabase } = service.appwrite
|
||||
const { opensslKeyV1, executorSecret, mariadbHost, mariadbPort, mariadbUser, mariadbPassword, mariadbRootUserPassword, mariadbDatabase } = service.appwrite
|
||||
|
||||
const secrets = [
|
||||
`_APP_EXECUTOR_SECRET@@@${executorSecret}`,
|
||||
`_APP_OPENSSL_KEY_V1@@@${opensslKeyV1}`,
|
||||
`MARIADB_PASSWORD@@@${mariadbPassword}`,
|
||||
`MARIADB_ROOT_PASSWORD@@@${mariadbRootUserPassword}`,
|
||||
`_APP_DB_PASS@@@${mariadbPassword}`,
|
||||
`_APP_DB_ROOT_PASS@@@${mariadbRootUserPassword}`,
|
||||
]
|
||||
|
||||
const settings = [
|
||||
`MARIADB_USER@@@${mariadbUser}`,
|
||||
`MARIADB_DATABASE@@@${mariadbDatabase}`,
|
||||
`_APP_DB_HOST@@@${mariadbHost}`,
|
||||
`_APP_DB_PORT@@@${mariadbPort}`,
|
||||
`_APP_DB_USER@@@${mariadbUser}`,
|
||||
`_APP_DB_SCHEMA@@@${mariadbDatabase}`,
|
||||
]
|
||||
await migrateSecrets(secrets, service);
|
||||
await migrateSettings(settings, service, template);
|
||||
@@ -157,7 +159,6 @@ async function weblate(service: any, template: any) {
|
||||
}
|
||||
async function searxng(service: any, template: any) {
|
||||
const { secretKey, redisPassword } = service.searxng
|
||||
const { fqdn } = service
|
||||
|
||||
const secrets = [
|
||||
`SECRET_KEY@@@${secretKey}`,
|
||||
@@ -165,7 +166,7 @@ async function searxng(service: any, template: any) {
|
||||
]
|
||||
|
||||
const settings = [
|
||||
`SEARXNG_BASE_URL@@@${fqdn || '$$generate_fqdn'}`
|
||||
`SEARXNG_BASE_URL@@@$$generate_fqdn`
|
||||
]
|
||||
await migrateSettings(settings, service, template);
|
||||
await migrateSecrets(secrets, service);
|
||||
@@ -180,20 +181,17 @@ async function glitchtip(service: any, template: any) {
|
||||
const secrets = [
|
||||
`POSTGRES_PASSWORD@@@${postgresqlPassword}`,
|
||||
`SECRET_KEY@@@${secretKeyBase}`,
|
||||
`DATABASE_URL@@@${encrypt(`postgres://${postgresqlUser}:${decrypt(postgresqlPassword)}@${id}-postgresql:5432/${postgresqlDatabase}`)}`,
|
||||
`REDIS_URL@@@${encrypt(`redis://${id}-redis:6379`)}`,
|
||||
`EMAIL_HOST_PASSWORD@@@${emailSmtpPassword}`,
|
||||
`MAILGUN_API_KEY@@@${mailgunApiKey}`,
|
||||
`SENDGRID_API_KEY@@@${sendgridApiKey}`,
|
||||
`DJANGO_SUPERUSER_PASSWORD@@@${defaultPassword}`,
|
||||
`EMAIL_URL@@@${encrypt(`smtp://${emailSmtpUser}:${decrypt(emailSmtpPassword)}@${emailSmtpHost}:${emailSmtpPort}`)}`,
|
||||
`DATABASE_URL@@@${encrypt(`postgres://${postgresqlUser}:${decrypt(postgresqlPassword)}@${id}-postgresql:5432/${postgresqlDatabase}`)}`,
|
||||
`REDIS_URL@@@${encrypt(`redis://${id}-redis:6379`)}`
|
||||
]
|
||||
const settings = [
|
||||
`POSTGRES_USER@@@${postgresqlUser}`,
|
||||
`POSTGRES_DB@@@${postgresqlDatabase}`,
|
||||
`DEFAULT_FROM_EMAIL@@@${defaultEmailFrom}`,
|
||||
`EMAIL_HOST@@@${emailSmtpHost}`,
|
||||
`EMAIL_PORT@@@${emailSmtpPort}`,
|
||||
`EMAIL_HOST_USER@@@${emailSmtpUser}`,
|
||||
`EMAIL_USE_TLS@@@${emailSmtpUseTls}`,
|
||||
`EMAIL_USE_SSL@@@${emailSmtpUseSsl}`,
|
||||
`EMAIL_BACKEND@@@${emailBackend}`,
|
||||
@@ -205,7 +203,7 @@ async function glitchtip(service: any, template: any) {
|
||||
await migrateSecrets(secrets, service);
|
||||
|
||||
// Remove old service data
|
||||
// await prisma.service.update({ where: { id: service.id }, data: { wordpress: { delete: true } } })
|
||||
await prisma.service.update({ where: { id: service.id }, data: { type: 'glitchtip' } })
|
||||
}
|
||||
async function hasura(service: any, template: any) {
|
||||
const { postgresqlUser, postgresqlPassword, postgresqlDatabase, graphQLAdminPassword } = service.hasura
|
||||
@@ -237,6 +235,7 @@ async function umami(service: any, template: any) {
|
||||
`DATABASE_URL@@@${encrypt(`postgres://${postgresqlUser}:${decrypt(postgresqlPassword)}@${id}-postgresql:5432/${postgresqlDatabase}`)}`,
|
||||
]
|
||||
const settings = [
|
||||
`DATABASE_TYPE@@@postgresql`,
|
||||
`POSTGRES_USER@@@${postgresqlUser}`,
|
||||
`POSTGRES_DB@@@${postgresqlDatabase}`,
|
||||
]
|
||||
@@ -280,8 +279,8 @@ async function ghost(service: any, template: any) {
|
||||
`MARIADB_USER@@@${mariadbUser}`,
|
||||
`MARIADB_DATABASE@@@${mariadbDatabase}`,
|
||||
`MARIADB_ROOT_USER@@@${mariadbRootUser}`,
|
||||
`GHOST_HOST@@@${getDomain(fqdn) || '$$generate_fqdn'}`,
|
||||
`url@@@${fqdn || '$$generate_fqdn'}`,
|
||||
`GHOST_HOST@@@$$generate_domain`,
|
||||
`url@@@$$generate_fqdn`,
|
||||
`GHOST_ENABLE_HTTPS@@@${isHttps ? 'yes' : 'no'}`
|
||||
]
|
||||
await migrateSettings(settings, service, template);
|
||||
@@ -355,7 +354,6 @@ async function vscodeserver(service: any, template: any) {
|
||||
}
|
||||
async function minio(service: any, template: any) {
|
||||
const { rootUser, rootUserPassword, apiFqdn } = service.minio
|
||||
const { fqdn } = service
|
||||
|
||||
const secrets = [
|
||||
`MINIO_ROOT_PASSWORD@@@${rootUserPassword}`,
|
||||
@@ -363,8 +361,8 @@ async function minio(service: any, template: any) {
|
||||
const settings = [
|
||||
`MINIO_ROOT_USER@@@${rootUser}`,
|
||||
`MINIO_SERVER_URL@@@${apiFqdn}`,
|
||||
`MINIO_BROWSER_REDIRECT_URL@@@${fqdn || '$$generate_fqdn'}`,
|
||||
`MINIO_DOMAIN@@@${getDomain(fqdn) || '$$generate_fqdn'}`,
|
||||
`MINIO_BROWSER_REDIRECT_URL@@@$$generate_fqdn`,
|
||||
`MINIO_DOMAIN@@@$$generate_domain`,
|
||||
]
|
||||
await migrateSettings(settings, service, template);
|
||||
await migrateSecrets(secrets, service);
|
||||
@@ -374,15 +372,16 @@ async function minio(service: any, template: any) {
|
||||
}
|
||||
async function fider(service: any, template: any) {
|
||||
const { postgresqlUser, postgresqlPassword, postgresqlDatabase, jwtSecret, emailNoreply, emailMailgunApiKey, emailMailgunDomain, emailMailgunRegion, emailSmtpHost, emailSmtpPort, emailSmtpUser, emailSmtpPassword, emailSmtpEnableStartTls } = service.fider
|
||||
const { fqdn } = service
|
||||
const { id } = service
|
||||
const secrets = [
|
||||
`JWT_SECRET@@@${jwtSecret}`,
|
||||
emailMailgunApiKey && `EMAIL_MAILGUN_API_KEY@@@${emailMailgunApiKey}`,
|
||||
emailMailgunApiKey && `EMAIL_MAILGUN_API@@@${emailMailgunApiKey}`,
|
||||
emailSmtpPassword && `EMAIL_SMTP_PASSWORD@@@${emailSmtpPassword}`,
|
||||
`POSTGRES_PASSWORD@@@${postgresqlPassword}`,
|
||||
`DATABASE_URL@@@${encrypt(`postgresql://${postgresqlUser}:${decrypt(postgresqlPassword)}@${id}-postgresql:5432/${postgresqlDatabase}?sslmode=disable`)}`
|
||||
]
|
||||
const settings = [
|
||||
`BASE_URL@@@${fqdn || '$$generate_fqdn'}`,
|
||||
`BASE_URL@@@$$generate_fqdn`,
|
||||
`EMAIL_NOREPLY@@@${emailNoreply || 'noreply@example.com'}`,
|
||||
`EMAIL_MAILGUN_DOMAIN@@@${emailMailgunDomain || ''}`,
|
||||
`EMAIL_MAILGUN_REGION@@@${emailMailgunRegion || ''}`,
|
||||
@@ -403,22 +402,22 @@ async function fider(service: any, template: any) {
|
||||
}
|
||||
async function plausibleAnalytics(service: any, template: any) {
|
||||
const { email, username, password, postgresqlUser, postgresqlPassword, postgresqlDatabase, secretKeyBase, scriptName } = service.plausibleAnalytics;
|
||||
const { id, fqdn } = service
|
||||
const { id } = service
|
||||
|
||||
const settings = [
|
||||
`BASE_URL@@@${fqdn || '$$generate_fqdn'}`,
|
||||
`BASE_URL@@@$$generate_fqdn`,
|
||||
`ADMIN_USER_EMAIL@@@${email}`,
|
||||
`ADMIN_USER_NAME@@@${username}`,
|
||||
`DISABLE_AUTH@@@false`,
|
||||
`DISABLE_REGISTRATION@@@true`,
|
||||
`POSTGRESQL_USER@@@${postgresqlUser}`,
|
||||
`POSTGRESQL_USERNAME@@@${postgresqlUser}`,
|
||||
`POSTGRESQL_DATABASE@@@${postgresqlDatabase}`,
|
||||
`SCRIPT_NAME@@@${scriptName}`,
|
||||
]
|
||||
const secrets = [
|
||||
`ADMIN_USER_PWD@@@${password}`,
|
||||
`SECRET_KEY_BASE@@@${secretKeyBase}`,
|
||||
`POSTGRES_PASSWORD@@@${postgresqlPassword}`,
|
||||
`POSTGRESQL_PASSWORD@@@${postgresqlPassword}`,
|
||||
`DATABASE_URL@@@${encrypt(`postgres://${postgresqlUser}:${decrypt(postgresqlPassword)}@${id}-postgresql:5432/${postgresqlDatabase}`)}`,
|
||||
]
|
||||
await migrateSettings(settings, service, template);
|
||||
@@ -435,8 +434,12 @@ async function migrateSettings(settings: any[], service: any, template: any) {
|
||||
if (!value || value === 'null') {
|
||||
continue;
|
||||
}
|
||||
// console.log('Migrating setting', name, value, 'for service', service.id, ', service name:', service.name)
|
||||
const variableName = template.variables.find((v: any) => v.name === name)?.id
|
||||
let variableName = template.variables.find((v: any) => v.name === name)?.id
|
||||
if (!variableName) {
|
||||
variableName = `$$config_${name.toLowerCase()}`
|
||||
}
|
||||
// console.log('Migrating setting', name, value, 'for service', service.id, ', service name:', service.name, 'variableName: ', variableName)
|
||||
|
||||
await prisma.serviceSetting.findFirst({ where: { name, serviceId: service.id } }) || await prisma.serviceSetting.create({ data: { name, value, variableName, service: { connect: { id: service.id } } } })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,11 +80,28 @@ export async function getServiceStatus(request: FastifyRequest<OnlyId>) {
|
||||
});
|
||||
const containersArray = containers.trim().split('\n');
|
||||
if (containersArray.length > 0 && containersArray[0] !== '') {
|
||||
const templates = await getTemplates();
|
||||
let template = templates.find(t => t.type === service.type);
|
||||
template = JSON.parse(JSON.stringify(template).replaceAll('$$id', service.id));
|
||||
for (const container of containersArray) {
|
||||
let isRunning = false;
|
||||
let isExited = false;
|
||||
let isRestarting = false;
|
||||
let isExcluded = false;
|
||||
const containerObj = JSON.parse(container);
|
||||
const exclude = template.services[containerObj.Names]?.exclude;
|
||||
if (exclude) {
|
||||
payload[containerObj.Names] = {
|
||||
status: {
|
||||
isExcluded: true,
|
||||
isRunning: false,
|
||||
isExited: false,
|
||||
isRestarting: false,
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
const status = containerObj.State
|
||||
if (status === 'running') {
|
||||
isRunning = true;
|
||||
@@ -97,11 +114,11 @@ export async function getServiceStatus(request: FastifyRequest<OnlyId>) {
|
||||
}
|
||||
payload[containerObj.Names] = {
|
||||
status: {
|
||||
isExcluded,
|
||||
isRunning,
|
||||
isExited,
|
||||
isRestarting
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,8 +136,20 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
|
||||
if (!isDeploy) {
|
||||
for (const [key, value] of Object.entries(foundTemplate.services)) {
|
||||
const realKey = key.replace('$$id', service.id)
|
||||
let name = value.name
|
||||
if (!name) {
|
||||
if (Object.keys(foundTemplate.services).length === 1) {
|
||||
name = foundTemplate.name || service.name.toLowerCase()
|
||||
} else {
|
||||
if (key === '$$id') {
|
||||
name = foundTemplate.name || key.replaceAll('$$id-', '') || service.name.toLowerCase()
|
||||
} else {
|
||||
name = key.replaceAll('$$id-', '') || service.name.toLowerCase()
|
||||
}
|
||||
}
|
||||
}
|
||||
parsedTemplate[realKey] = {
|
||||
name: value.name,
|
||||
name,
|
||||
image: value.image,
|
||||
environment: [],
|
||||
fqdns: [],
|
||||
@@ -131,23 +160,26 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
|
||||
let [envKey, ...envValue] = env.split('=')
|
||||
envValue = envValue.join("=")
|
||||
const variable = foundTemplate.variables.find(v => v.name === envKey) || foundTemplate.variables.find(v => v.id === envValue)
|
||||
const id = variable.id.replaceAll('$$', '')
|
||||
const label = variable?.label
|
||||
const description = variable?.description
|
||||
const defaultValue = variable?.defaultValue
|
||||
const main = variable?.main || '$$id'
|
||||
const type = variable?.type || 'input'
|
||||
const placeholder = variable?.placeholder || ''
|
||||
const readonly = variable?.readonly || false
|
||||
const required = variable?.required || false
|
||||
if (envValue.startsWith('$$config') || variable?.showOnConfiguration) {
|
||||
if (envValue.startsWith('$$config_coolify')) {
|
||||
continue
|
||||
if (variable) {
|
||||
const id = variable.id.replaceAll('$$', '')
|
||||
const label = variable?.label
|
||||
const description = variable?.description
|
||||
const defaultValue = variable?.defaultValue
|
||||
const main = variable?.main || '$$id'
|
||||
const type = variable?.type || 'input'
|
||||
const placeholder = variable?.placeholder || ''
|
||||
const readonly = variable?.readonly || false
|
||||
const required = variable?.required || false
|
||||
if (envValue.startsWith('$$config') || variable?.showOnConfiguration) {
|
||||
if (envValue.startsWith('$$config_coolify')) {
|
||||
continue
|
||||
}
|
||||
parsedTemplate[realKey].environment.push(
|
||||
{ id, name: envKey, value: envValue, main, label, description, defaultValue, type, placeholder, required, readonly }
|
||||
)
|
||||
}
|
||||
parsedTemplate[realKey].environment.push(
|
||||
{ id, name: envKey, value: envValue, main, label, description, defaultValue, type, placeholder, required, readonly }
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (value?.proxy && value.proxy.length > 0) {
|
||||
@@ -170,6 +202,7 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
|
||||
} else {
|
||||
parsedTemplate = foundTemplate
|
||||
}
|
||||
|
||||
let strParsedTemplate = JSON.stringify(parsedTemplate)
|
||||
|
||||
// replace $$id and $$workdir
|
||||
@@ -185,17 +218,18 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
|
||||
if (service.serviceSetting.length > 0) {
|
||||
for (const setting of service.serviceSetting) {
|
||||
const { value, variableName } = setting
|
||||
const regex = new RegExp(`\\$\\$config_${variableName.replace('$$config_','')}\\"`, 'gi')
|
||||
if (variableName.startsWith('$$config_coolify')) {
|
||||
continue;
|
||||
}
|
||||
if (value === '$$generate_fqdn') {
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(variableName, service.fqdn || '')
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, service.fqdn || '' + "\"")
|
||||
} else if (value === '$$generate_domain') {
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(variableName, getDomain(service.fqdn))
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, getDomain(service.fqdn) + "\"")
|
||||
} else if (service.destinationDocker?.network && value === '$$generate_network') {
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(variableName, service.destinationDocker.network)
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, service.destinationDocker.network + "\"")
|
||||
} else {
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(variableName, value)
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, value + "\"")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,8 +241,8 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
|
||||
const regexHashed = new RegExp(`\\$\\$hashed\\$\\$secret_${name}\\"`, 'gi')
|
||||
const regex = new RegExp(`\\$\\$secret_${name}\\"`, 'gi')
|
||||
if (value) {
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(regexHashed, bcrypt.hashSync(value, 10) + "\"")
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, value + "\"")
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(regexHashed, bcrypt.hashSync(value.replaceAll("\"", "\\\""), 10) + "\"")
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, value.replaceAll("\"", "\\\"") + "\"")
|
||||
} else {
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(regexHashed, "\"")
|
||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, "\"")
|
||||
@@ -229,10 +263,11 @@ export async function getService(request: FastifyRequest<OnlyId>) {
|
||||
throw { status: 404, message: 'Service not found.' }
|
||||
}
|
||||
let template = {}
|
||||
let tags = []
|
||||
if (service.type) {
|
||||
template = await parseAndFindServiceTemplates(service)
|
||||
tags = await getTags(service.type)
|
||||
}
|
||||
const tags = await getTags(service.type)
|
||||
return {
|
||||
settings: await listSettings(),
|
||||
service,
|
||||
@@ -240,7 +275,6 @@ export async function getService(request: FastifyRequest<OnlyId>) {
|
||||
tags
|
||||
}
|
||||
} catch ({ status, message }) {
|
||||
console.log(status, message)
|
||||
return errorHandler({ status, message })
|
||||
}
|
||||
}
|
||||
@@ -291,7 +325,7 @@ export async function saveServiceType(request: FastifyRequest<SaveServiceType>,
|
||||
}
|
||||
|
||||
}
|
||||
if (variable.id.startsWith('$$config_')) {
|
||||
if (variable.id.startsWith('$$config_') || variable.id.startsWith('$$coolify_fqdn_')) {
|
||||
const found = await prisma.serviceSetting.findFirst({ where: { name: variable.name, serviceId: id } })
|
||||
if (!found) {
|
||||
await prisma.serviceSetting.create({
|
||||
@@ -513,7 +547,6 @@ export async function saveService(request: FastifyRequest<SaveService>, reply: F
|
||||
});
|
||||
return reply.code(201).send()
|
||||
} catch ({ status, message }) {
|
||||
console.log({ status, message })
|
||||
return errorHandler({ status, message })
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
[{"name":"grafana","image":"grafana/grafana","tags":["9.2.3","9.2.2","9.2.1","9.2.0","9.1.8","9.1.7","9.1.6","9.1.5","9.1.4","9.1.3","9.1.2","9.1.1","9.1.0","9.0.9","9.0.8","9.0.7","9.0.6","9.0.5","9.0.4","9.0.3","9.0.2","9.0.1","9.0.0","8.5.9","8.5.6","8.5.5","8.5.4","8.5.3","8.5.2","8.5.14","latest"]},{"name":"appwrite","image":"appwrite/appwrite","tags":["1.0.3","1.0.1","1.0.0","0.9.3","0.9.1","0.8.0","0.7.1","0.6.2","0.6.0","0.5.2","0.5.0","0.3.1","0.2.0","0.15.2","0.15.0","0.14.2","0.14.0","0.13.4","0.13.2","0.13.0","0.12.3","0.12.1","0.12.0","0.11.2","0.11.0","0.10.4","0.10.2","0.10.0","0.1.8","0.1.6","latest"]},{"name":"weblate","image":"weblate/weblate","tags":["latest","edge-2022-11-02-e4171e0c5657ca38341cce8ac31f5cbdf25389eb","edge-2022-11-02-6d886c40cd62eb23d21f7c0a1840b4a7a4c51ad0","edge-2022-11-01-608df4dd95a2d1f76c15cddd9e116bb4c3229168","edge-2022-11-01-54957be78eb76f602ceae50c0b01b64b20402b2a","edge-2022-10-31-c55c7302a6c82a160ee9d711893c12d67ecd3b27","edge-2022-10-26-c69cfdd83ed1fad4a4d57398552b8c70894a6586","edge-2022-10-26-410b3aff37de5bbfacbc47642ce28b2518bee506","edge-2022-10-25-e09e2c29ed3748eb0fa248453635dd27768e8dd9","edge-2022-10-25-a059748c178cce0bc30bdc915d4ff8f0d13ce25c","edge-2022-10-24-94ae069cdcf9a171e812da32d760a436fa9b37ad","edge-2022-10-24-71d2011a1f6d2b60bb65af9f775bf75d4beaf8fd","edge-2022-10-19-acb8e82a0ea2c86fb7ce8f5cb1a81e2bc634583a","edge-2022-10-18-f54b83a0898bef9d14b00d885f675c2e4ebb68ca","edge-2022-10-17-eb9dc248720581052b4be4e3f1f372bce37edd62","edge-2022-10-17-e5a5f6cfdf7e500b7b357566971172fad022c1dc","edge-2022-10-17-da6d01ea005c29453e0111a45956d16bf2262f54","edge-2022-10-17-7a28d7f727778dd05b163fa40ec7903e2e07b20c","edge-2022-10-13-899ea7d8aef900ef216e231433fe15e8dc9a2af8","edge-2022-10-13-385a55156bdc918b0e78ce337322b8996455027a","edge-2022-10-12-5356be32da4b8beb16ba3ec0aa8763f6e08294ab","edge-2022-10-10-d087b31ef728a3a9c3563de9aa4b2ea189755fdf","edge-2022-10-07-f6d43c61fee0e58eb18dd6f80404fba272280c3f","edge-2022-10-05-b86e34a866f40446dc8cb1b48f5d56e621904a0c","edge-2022-10-05-82096af0a688d0104c1c5b973dfc1c6eef6f9d85","edge-2022-10-05-495225a1fd551be41301b53dcd5b10d0c97927bb","edge-2022-10-05-0bb3091700132894e51d806a140145a03489fc09","edge-2022-10-03-9255921fca690c5350ba16960d856c68b910e586","edge-2022-10-03-4b9d377a8289ede1a16b05836eeed0c3b0570dd9","edge-2022-10-01-482ba9c3f7862bca8b1e70d3d0a02806e075d120"]},{"name":"searxng","image":"searxng/searxng","tags":["2022.10.29-fc9986de","2022.10.29-fa59ff9b","2022.10.29-d49ccb54","2022.10.29-a9deead1","2022.10.29-3f1d594c","2022.10.28-c26fa335","2022.10.28-5db4ed5d","2022.10.28-5a181ea1","2022.10.25-affd8f75","2022.10.25-4783d6c9","2022.10.21-710a3a00","2022.10.14-e2dd5a80","2022.10.14-72f6367e","2022.10.14-4d4dfc58","2022.10.14-2eb81701","2022.10.14-1a5b0965","2022.10.14-096d9def","2022.10.11-a7337612","2022.10.07-84f61af8","2022.10.07-666cd1f6","2022.10.01-e9af772b","2022.10.01-901143f0","2022.10.01-14d0fb2c","2022.09.30-f4281b16","2022.09.30-62324655","2022.09.29-f3d25f9c","2022.09.29-a7d69323","2022.09.29-5f340154","2022.09.29-520a873a","2022.09.29-50607324","latest"]},{"name":"glitchtip","image":"glitchtip/glitchtip","tags":["v2.0.7","v2.0.5","v2.0.2","v2.0.0","v1.9.2","v1.9.0","v1.8.4","v1.8.2","v1.8.0","v1.7.1","v1.6.4","v1.6.2","v1.6.0","v1.5.3","v1.5.1","v1.4.1","v1.3.3","v1.3.1","v1.2.6","v1.2.4","v1.2.2","v1.2.0","v1.12.4","v1.12.2","v1.12.0","v1.10.3","v1.10.1","v1.1.2","v1.1.0","v1.0.8","latest"]},{"name":"hasura","image":"hasura/graphql-engine","tags":["v2.9.0","v2.8.4","v2.8.3","v2.8.2","v2.8.1","v2.8.0","v2.7.0","v2.6.2","v2.6.1","v2.6.0","v2.5.2","v2.5.1","v2.5.0","v2.4.0","v2.3.1","v2.3.0","v2.2.2","v2.2.1","v2.2.0","v2.14.0","v2.13.1","v2.13.0","v2.12.0","v2.11.2","v2.11.1","v2.11.0","v2.10.1","v2.10.0","v2.1.1","v2.1.0","latest"]},{"name":"umami","image":"ghcr.io/umami-software/umami","tags":["postgresql-v1.39.4","postgresql-v1.39.3","postgresql-v1.39.2","postgresql-v1.39.1","postgresql-v1.39.0","postgresql-v1.38.0","postgresql-v1.37.0","postgresql-v1.36.1","postgresql-v1.36.0","postgresql-v1.35.0","postgresql-v1.34.0","postgresql-v1.33.3","postgresql-latest","mysql-v1.39.4","mysql-v1.39.3","mysql-v1.39.2","mysql-v1.39.1","mysql-v1.39.0","mysql-v1.38.0","mysql-v1.37.0","mysql-v1.36.1","mysql-v1.36.0","mysql-v1.35.0","mysql-v1.34.0","mysql-v1.33.3","mysql-latest","latest"]},{"name":"meilisearch","image":"getmeili/meilisearch","tags":["v0.9.0","v0.8.3","v0.8.1","v0.29.1","v0.29.0","v0.28.1","v0.28.0","v0.27.1","v0.27.0","v0.26.1","v0.26.0","v0.25.1","v0.25.0","v0.23.1","v0.23.0","v0.21.1","v0.21.0","v0.20.0","v0.19.0","v0.18.1","v0.18.0","v0.17.0","v0.16.0","v0.14.1","v0.14.0","v0.12.0","v0.11.0","v0.10.0","0.14.1","latest"]},{"name":"ghost","image":"bitnami/ghost","tags":["5.7.1","5.7.0","5.5.0","5.4.1","5.4.0","5.3.1","5.3.0","5.22.4","5.22.3","5.22.2","5.22.1","5.22.0","5.21.0","5.20.0","5.2.4","5.2.3","5.2.2","5.2.1","5.19.3","5.19.2","5.19.1","5.19.0","5.18.0","5.17.2","5.17.1","5.17.0","5.Line truncated
|
||||
[{"name":"trilium","image":"zadam/trilium","tags":["0.56.1","0.55.1","0.54.2","0.53.2","0.52.4","0.52.2","0.51.2","0.50.3","0.50.1","0.49.5","0.49.3","0.48.9","0.48.7","0.48.4","0.48.2","0.47.8","0.47.6","0.47.4","0.47.2","0.46.7","0.46.5","0.45.9","0.45.7","0.45.5","0.45.3","0.45.10","0.44.8","0.44.6","0.44.4","0.43.3","latest"]},{"name":"uptimekuma","image":"louislam/uptime-kuma","tags":["1.9.2","1.9.1","1.9.0","1.8.0","1.7.3","1.7.1","1.7.0","1.6.3","1.6.2","1.6.1","1.6.0","1.5.3","1.5.2","1.5.0","1.3.1","1.2.0","1.18.5","1.18.4","1.18.3","1.18.2","1.18.1","1.18.0","1.17.1","1.17.0","1.16.1","1.16.0","1.15.1","1.15.0","1.14.1","1.14.0","latest"]},{"name":"languagetool","image":"silviof/docker-languagetool","tags":["latest","5.8","5.7","5.6","5.5","5.4","5.3"]},{"name":"vaultwarden","image":"vaultwarden/server","tags":["1.26.0","1.25.2","1.25.1","1.25.0","1.24.0","1.23.1","1.23.0","1.22.2","1.22.1","1.22.0","1.21.0","latest"]},{"name":"grafana","image":"grafana/grafana","tags":["9.2.3","9.2.2","9.2.1","9.2.0","9.1.8","9.1.7","9.1.6","9.1.5","9.1.4","9.1.3","9.1.2","9.1.1","9.1.0","9.0.9","9.0.8","9.0.7","9.0.6","9.0.5","9.0.4","9.0.3","9.0.2","9.0.1","9.0.0","8.5.9","8.5.6","8.5.5","8.5.4","8.5.3","8.5.2","8.5.14","latest"]},{"name":"appwrite","image":"appwrite/appwrite","tags":["1.0.3","1.0.1","1.0.0","0.9.3","0.9.1","0.8.0","0.7.1","0.6.2","0.6.0","0.5.2","0.5.0","0.3.1","0.2.0","0.15.2","0.15.0","0.14.2","0.14.0","0.13.4","0.13.2","0.13.0","0.12.3","0.12.1","0.12.0","0.11.2","0.11.0","0.10.4","0.10.2","0.10.0","0.1.8","0.1.6","latest"]},{"name":"weblate","image":"weblate/weblate","tags":["latest","edge-2022-11-02-e4171e0c5657ca38341cce8ac31f5cbdf25389eb","edge-2022-11-02-6d886c40cd62eb23d21f7c0a1840b4a7a4c51ad0","edge-2022-11-01-608df4dd95a2d1f76c15cddd9e116bb4c3229168","edge-2022-11-01-54957be78eb76f602ceae50c0b01b64b20402b2a","edge-2022-10-31-c55c7302a6c82a160ee9d711893c12d67ecd3b27","edge-2022-10-26-c69cfdd83ed1fad4a4d57398552b8c70894a6586","edge-2022-10-26-410b3aff37de5bbfacbc47642ce28b2518bee506","edge-2022-10-25-e09e2c29ed3748eb0fa248453635dd27768e8dd9","edge-2022-10-25-a059748c178cce0bc30bdc915d4ff8f0d13ce25c","edge-2022-10-24-94ae069cdcf9a171e812da32d760a436fa9b37ad","edge-2022-10-24-71d2011a1f6d2b60bb65af9f775bf75d4beaf8fd","edge-2022-10-19-acb8e82a0ea2c86fb7ce8f5cb1a81e2bc634583a","edge-2022-10-18-f54b83a0898bef9d14b00d885f675c2e4ebb68ca","edge-2022-10-17-eb9dc248720581052b4be4e3f1f372bce37edd62","edge-2022-10-17-e5a5f6cfdf7e500b7b357566971172fad022c1dc","edge-2022-10-17-da6d01ea005c29453e0111a45956d16bf2262f54","edge-2022-10-17-7a28d7f727778dd05b163fa40ec7903e2e07b20c","edge-2022-10-13-899ea7d8aef900ef216e231433fe15e8dc9a2af8","edge-2022-10-13-385a55156bdc918b0e78ce337322b8996455027a","edge-2022-10-12-5356be32da4b8beb16ba3ec0aa8763f6e08294ab","edge-2022-10-10-d087b31ef728a3a9c3563de9aa4b2ea189755fdf","edge-2022-10-07-f6d43c61fee0e58eb18dd6f80404fba272280c3f","edge-2022-10-05-b86e34a866f40446dc8cb1b48f5d56e621904a0c","edge-2022-10-05-82096af0a688d0104c1c5b973dfc1c6eef6f9d85","edge-2022-10-05-495225a1fd551be41301b53dcd5b10d0c97927bb","edge-2022-10-05-0bb3091700132894e51d806a140145a03489fc09","edge-2022-10-03-9255921fca690c5350ba16960d856c68b910e586","edge-2022-10-03-4b9d377a8289ede1a16b05836eeed0c3b0570dd9","edge-2022-10-01-482ba9c3f7862bca8b1e70d3d0a02806e075d120"]},{"name":"searxng","image":"searxng/searxng","tags":["2022.10.29-fc9986de","2022.10.29-fa59ff9b","2022.10.29-d49ccb54","2022.10.29-a9deead1","2022.10.29-3f1d594c","2022.10.28-c26fa335","2022.10.28-5db4ed5d","2022.10.28-5a181ea1","2022.10.25-affd8f75","2022.10.25-4783d6c9","2022.10.21-710a3a00","2022.10.14-e2dd5a80","2022.10.14-72f6367e","2022.10.14-4d4dfc58","2022.10.14-2eb81701","2022.10.14-1a5b0965","2022.10.14-096d9def","2022.10.11-a7337612","2022.10.07-84f61af8","2022.10.07-666cd1f6","2022.10.01-e9af772b","2022.10.01-901143f0","2022.10.01-14d0fb2c","2022.09.30-f4281b16","2022.09.30-62324655","2022.09.29-f3d25f9c","2022.09.29-a7d69323","2022.09.29-5f340154","2022.09.29-520a873a","2022.09.29-50607324","latest"]},{"name":"glitchtip","image":"glitchtip/glitchtip","tags":["v2.0.7","v2.0.5","v2.0.2","v2.0.0","v1.9.2","v1.9.0","v1.8.4","v1.8.2","v1.8.0","v1.7.1","v1.6.4","v1.6.2","v1.6.0","v1.5.3","v1.5.1","v1.4.1","v1.3.3","v1.3.1","v1.2.6","v1.2.4","v1.2.2","v1.2.0","v1.12.4","v1.12.2","v1.12.0","v1.10.3","v1.10.1","v1.1.2","v1.1.0","v1.0.8","latest"]},{"name":"hasura","image":"hasura/graphql-engine","tags":["v2.9.0","v2.8.4","v2.8.3","v2.8.2","v2.8.1","v2.8.0","v2.7.0","v2.6.2","v2.6.1","v2.6.0","v2.5.2","v2.5.1","v2.5.0","v2.4.0","v2.3.1","v2.3.0","v2.2.2","v2.2.1","v2.2.0","v2.14.0","v2.13.1","v2.13.0","v2.12.0","v2.11.2","v2.11.1","v2.11.0","v2.10.1","v2.10.0","v2.1.1","v2.1.0","latest"]},{"name":"umami-postgresql","image":"ghcr.io/umami-software/umami","tags":["postgresql-v1.39.4","postgresql-v1.39.3","postgresql-v1.39.2","postgresql-v1.39.1","postgresql-v1.39.0","postgresql-v1.38.0","postgresql-v1.37.0","postgresql-v1.36.1","Line truncated
|
||||
@@ -1 +1 @@
|
||||
[{"templateVersion":"1.0.0","defaultVersion":"9.2.3","type":"grafana","name":"Grafana","description":"Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored.","services":{"$$id":{"image":"grafana/grafana:$$core_version","environment":[],"volumes":["$$id-config:/etc/grafana","$$id-grafana:/var/lib/grafana"],"ports":["3000"]}},"variables":[],"documentation":"https://hub.docker.com/r/grafana/grafana"},{"templateVersion":"1.0.0","defaultVersion":"1.0.3","type":"appwrite","name":"Appwrite","documentation":"https://appwrite.io/docs","description":"Secure Backend Server for Web, Mobile & Flutter Developers.","services":{"$$id":{"image":"appwrite/appwrite:$$core_version","environment":["_APP_ENV=$$config__app_env","_APP_WORKER_PER_CORE=$$config__app_worker_per_core","_APP_LOCALE=$$config__app_locale","_APP_CONSOLE_WHITELIST_ROOT=$$config__app_console_whitelist_root","_APP_CONSOLE_WHITELIST_EMAILS=$$config__app_console_whitelist_emails","_APP_CONSOLE_WHITELIST_IPS=$$config__app_console_whitelist_ips","_APP_SYSTEM_EMAIL_NAME=$$config__app_system_email_name","_APP_SYSTEM_EMAIL_ADDRESS=$$config__app_system_email_address","_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=$$config__app_system_security_email_address","_APP_SYSTEM_RESPONSE_FORMAT=$$config__app_system_response_format","_APP_OPTIONS_ABUSE=$$config__app_options_abuse","_APP_OPTIONS_FORCE_HTTPS=$$config__app_options_force_https","_APP_OPENSSL_KEY_V1=$$secret__app_openssl_key_v1","_APP_DOMAIN=$$generate_fqdn","_APP_DOMAIN_TARGET=$$generate_fqdn","_APP_REDIS_HOST=$$config__app_redis_host","_APP_REDIS_PORT=$$config__app_redis_port","_APP_REDIS_USER=$$config__app_redis_user","_APP_REDIS_PASS=$$secret__app_redis_pass","_APP_DB_HOST=$$config__app_db_host","_APP_DB_PORT=$$config__app_db_port","_APP_DB_SCHEMA=$$config__app_db_schema","_APP_DB_USER=$$config__app_db_user","_APP_DB_PASS=$$secret__app_db_pass","_APP_SMTP_HOST=$$config__app_smtp_host","_APP_SMTP_PORT=$$config__app_smtp_port","_APP_SMTP_SECURE=$$config__app_smtp_secure","_APP_SMTP_USERNAME=$$config__app_smtp_username","_APP_SMTP_PASSWORD=$$secret__app_smtp_password","_APP_USAGE_STATS=$$config__app_usage_stats","_APP_INFLUXDB_HOST=$$config__app_influxdb_host","_APP_INFLUXDB_PORT=$$config__app_influxdb_port","_APP_STORAGE_LIMIT=$$config__app_storage_limit","_APP_STORAGE_PREVIEW_LIMIT=$$config__app_storage_preview_limit","_APP_STORAGE_ANTIVIRUS=$$config__app_storage_antivirus_enabled","_APP_STORAGE_ANTIVIRUS_HOST=$$config__app_storage_antivirus_host","_APP_STORAGE_ANTIVIRUS_PORT=$$config__app_storage_antivirus_port","_APP_STORAGE_DEVICE=$$config__app_storage_device","_APP_STORAGE_S3_ACCESS_KEY=$$secret__app_storage_s3_access_key","_APP_STORAGE_S3_SECRET=$$secret__app_storage_s3_secret","_APP_STORAGE_S3_REGION=$$config__app_storage_s3_region","_APP_STORAGE_S3_BUCKET=$$config__app_storage_s3_bucket","_APP_STORAGE_DO_SPACES_ACCESS_KEY=$$secret__app_storage_do_spaces_access_key","_APP_STORAGE_DO_SPACES_SECRET=$$secret__app_storage_do_spaces_secret","_APP_STORAGE_DO_SPACES_REGION=$$config__app_storage_do_spaces_region","_APP_STORAGE_DO_SPACES_BUCKET=$$config__app_storage_do_spaces_bucket","_APP_STORAGE_BACKBLAZE_ACCESS_KEY=$$secret__app_storage_backblaze_access_key","_APP_STORAGE_BACKBLAZE_SECRET=$$secret__app_storage_backblaze_secret","_APP_STORAGE_BACKBLAZE_REGION=$$config__app_storage_backblaze_region","_APP_STORAGE_BACKBLAZE_BUCKET=$$config__app_storage_backblaze_bucket","_APP_STORAGE_LINODE_ACCESS_KEY=$$secret__app_storage_linode_access_key","_APP_STORAGE_LINODE_SECRET=$$secret__app_storage_linode_secret","_APP_STORAGE_LINODE_REGION=$$config__app_storage_linode_region","_APP_STORAGE_LINODE_BUCKET=$$config__app_storage_linode_bucket","_APP_STORAGE_WASABI_ACCESS_KEY=$$secret__app_storage_wasabi_access_key","_APP_STORAGE_WASABI_SECRET=$$secret__app_storage_wasabi_secret","_APP_STORAGE_WASABI_REGION=$$config__app_storage_wasabi_region","_APP_STORAGE_WASABI_BUCKET=$$config__app_storage_wasabi_bucket","_APP_FUNCTIONS_SIZE_LIMIT=$$config__app_functions_size_limit","_APP_FUNCTIONS_TIMEOUT=$$config__app_functions_timeout","_APP_FUNCTIONS_BUILD_TIMEOUT=$$config__app_functions_build_timeout","_APP_FUNCTIONS_CONTAINERS=$$config__app_functions_containers","_APP_FUNCTIONS_CPUS=$$config__app_functions_cpus","_APP_FUNCTIONS_MEMORY=$$config__app_functions_memory_allocated","_APP_FUNCTIONS_MEMORY_SWAP=$$config__app_functions_memory_swap","_APP_FUNCTIONS_RUNTIMES=$$config__app_functions_runtimes","_APP_EXECUTOR_SECRET=$$secret__app_executor_secret","_APP_EXECUTOR_HOST=$$config__app_executor_host","_APP_LOGGING_PROVIDER=$$config__app_logging_provider","_APP_LOGGING_CONFIG=$$config__app_logging_config","_APP_STATSD_HOST=$$config__app_statsd_host","_APP_STATSD_PORT=$$config__app_statsd_port","_APP_MAINTENANCE_INTERVAL=$$config__app_maintenance_interval","_APP_MAINTENANCE_RETENTION_EXECUTION=$$config__app_maintenance_retention_execution","_APP_MAINTENANCE_RETENTION_CACHE=$$config__app_maintenLine truncated
|
||||
[{"templateVersion":"1.0.0","defaultVersion":"0.56.2","type":"trilium","name":"Trilium Notes","services":{"$$id":{"image":"zadam/trilium:$$core_version","environment":[],"volumes":["$$id-trilium:/home/node/trilium-data"],"ports":["8080"]}},"variables":[],"documentation":"https://hub.docker.com/r/zadam/trilium"},{"templateVersion":"1.0.0","defaultVersion":"1.9.2","type":"uptimekuma","name":"UptimeKuma","services":{"$$id":{"image":"louislam/uptime-kuma:$$core_version","environment":[],"volumes":["$$id-uptimekuma:/app/data"],"ports":["3001"]}},"variables":[],"documentation":"https://hub.docker.com/r/louislam/uptime-kuma"},{"templateVersion":"1.0.0","defaultVersion":5.8,"type":"languagetool","name":"LanguageTool","services":{"$$id":{"image":"silviof/docker-languagetool:$$core_version","environment":[],"volumes":["$$id-ngrams:/ngrams"],"ports":["8010"]}},"variables":[],"documentation":"https://hub.docker.com/r/silviof/docker-languagetool"},{"templateVersion":"1.0.0","defaultVersion":"1.26.0","type":"vaultwarden","name":"VaultWarden","services":{"$$id":{"image":"vaultwarden/server:$$core_version","environment":[],"volumes":["$$id-data:/data"],"ports":["80"]}},"variables":[],"documentation":"https://hub.docker.com/r/vaultwarden/server"},{"templateVersion":"1.0.0","defaultVersion":"9.2.3","type":"grafana","name":"Grafana","description":"Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored.","services":{"$$id":{"image":"grafana/grafana:$$core_version","environment":[],"volumes":["$$id-config:/etc/grafana","$$id-grafana:/var/lib/grafana"],"ports":["3000"]}},"variables":[],"documentation":"https://hub.docker.com/r/grafana/grafana"},{"templateVersion":"1.0.0","defaultVersion":"1.0.3","type":"appwrite","name":"Appwrite","documentation":"https://appwrite.io/docs","description":"Secure Backend Server for Web, Mobile & Flutter Developers.","services":{"$$id":{"image":"appwrite/appwrite:$$core_version","environment":["_APP_ENV=$$config__app_env","_APP_WORKER_PER_CORE=$$config__app_worker_per_core","_APP_LOCALE=$$config__app_locale","_APP_CONSOLE_WHITELIST_ROOT=$$config__app_console_whitelist_root","_APP_CONSOLE_WHITELIST_EMAILS=$$config__app_console_whitelist_emails","_APP_CONSOLE_WHITELIST_IPS=$$config__app_console_whitelist_ips","_APP_SYSTEM_EMAIL_NAME=$$config__app_system_email_name","_APP_SYSTEM_EMAIL_ADDRESS=$$config__app_system_email_address","_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=$$config__app_system_security_email_address","_APP_SYSTEM_RESPONSE_FORMAT=$$config__app_system_response_format","_APP_OPTIONS_ABUSE=$$config__app_options_abuse","_APP_OPTIONS_FORCE_HTTPS=$$config__app_options_force_https","_APP_OPENSSL_KEY_V1=$$secret__app_openssl_key_v1","_APP_DOMAIN=$$config__app_domain","_APP_DOMAIN_TARGET=$$config__app_domain_target","_APP_REDIS_HOST=$$config__app_redis_host","_APP_REDIS_PORT=$$config__app_redis_port","_APP_REDIS_USER=$$config__app_redis_user","_APP_REDIS_PASS=$$secret__app_redis_pass","_APP_DB_HOST=$$config__app_db_host","_APP_DB_PORT=$$config__app_db_port","_APP_DB_SCHEMA=$$config__app_db_schema","_APP_DB_USER=$$config__app_db_user","_APP_DB_PASS=$$secret__app_db_pass","_APP_SMTP_HOST=$$config__app_smtp_host","_APP_SMTP_PORT=$$config__app_smtp_port","_APP_SMTP_SECURE=$$config__app_smtp_secure","_APP_SMTP_USERNAME=$$config__app_smtp_username","_APP_SMTP_PASSWORD=$$secret__app_smtp_password","_APP_USAGE_STATS=$$config__app_usage_stats","_APP_INFLUXDB_HOST=$$config__app_influxdb_host","_APP_INFLUXDB_PORT=$$config__app_influxdb_port","_APP_STORAGE_LIMIT=$$config__app_storage_limit","_APP_STORAGE_PREVIEW_LIMIT=$$config__app_storage_preview_limit","_APP_STORAGE_ANTIVIRUS=$$config__app_storage_antivirus_enabled","_APP_STORAGE_ANTIVIRUS_HOST=$$config__app_storage_antivirus_host","_APP_STORAGE_ANTIVIRUS_PORT=$$config__app_storage_antivirus_port","_APP_STORAGE_DEVICE=$$config__app_storage_device","_APP_STORAGE_S3_ACCESS_KEY=$$secret__app_storage_s3_access_key","_APP_STORAGE_S3_SECRET=$$secret__app_storage_s3_secret","_APP_STORAGE_S3_REGION=$$config__app_storage_s3_region","_APP_STORAGE_S3_BUCKET=$$config__app_storage_s3_bucket","_APP_STORAGE_DO_SPACES_ACCESS_KEY=$$secret__app_storage_do_spaces_access_key","_APP_STORAGE_DO_SPACES_SECRET=$$secret__app_storage_do_spaces_secret","_APP_STORAGE_DO_SPACES_REGION=$$config__app_storage_do_spaces_region","_APP_STORAGE_DO_SPACES_BUCKET=$$config__app_storage_do_spaces_bucket","_APP_STORAGE_BACKBLAZE_ACCESS_KEY=$$secret__app_storage_backblaze_access_key","_APP_STORAGE_BACKBLAZE_SECRET=$$secret__app_storage_backblaze_secret","_APP_STORAGE_BACKBLAZE_REGION=$$config__app_storage_backblaze_region","_APP_STORAGE_BACKBLAZE_BUCKET=$$config__app_storage_backblaze_bucket","_APP_STORAGE_LINODE_ACCESS_KEY=$$secret__app_storage_linode_access_key","_APP_STORAGE_LINODE_SECRET=$$secret__app_storage_linode_secret","_APP_STORAGE_LINODE_REGION=$$config__app_storage_linode_region","_APP_STORAGE_LINODE_BUCKET=$$config__app_storage_linode_bucLine truncated
|
||||
@@ -2,27 +2,33 @@
|
||||
export let id: any;
|
||||
import { status } from '$lib/store';
|
||||
let serviceStatus = {
|
||||
isExcluded: false,
|
||||
isExited: false,
|
||||
isRunning: false,
|
||||
isRestarting: false,
|
||||
isStopped: false
|
||||
};
|
||||
|
||||
$: if (Object.keys($status.service.statuses).length > 0) {
|
||||
let { isExited, isRunning, isRestarting } = $status.service.statuses[id].status;
|
||||
$: if (Object.keys($status.service.statuses).length > 0 && $status.service.statuses[id]?.status) {
|
||||
let { isExited, isRunning, isRestarting, isExcluded } = $status.service.statuses[id].status;
|
||||
|
||||
serviceStatus.isExited = isExited;
|
||||
serviceStatus.isRunning = isRunning;
|
||||
serviceStatus.isExcluded = isExcluded;
|
||||
serviceStatus.isRestarting = isRestarting;
|
||||
serviceStatus.isStopped = !isExited && !isRunning && !isRestarting;
|
||||
} else {
|
||||
serviceStatus.isExited = false;
|
||||
serviceStatus.isRunning = false;
|
||||
serviceStatus.isExcluded = false;
|
||||
serviceStatus.isRestarting = false;
|
||||
serviceStatus.isStopped = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if serviceStatus.isRunning}
|
||||
{#if serviceStatus.isExcluded}
|
||||
<span class="badge font-bold uppercase rounded text-orange-500 mt-2">Excluded</span>
|
||||
{:else if serviceStatus.isRunning}
|
||||
<span class="badge font-bold uppercase rounded text-green-500 mt-2">Running</span>
|
||||
{:else if serviceStatus.isStopped || serviceStatus.isExited}
|
||||
<span class="badge font-bold uppercase rounded text-red-500 mt-2">Stopped</span>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { Tooltip } from 'flowbite-svelte';
|
||||
export let placement = 'bottom';
|
||||
export let color = 'bg-coollabs font-thin text-left';
|
||||
export let color = 'bg-coollabs font-thin text-left border-none p-4';
|
||||
export let triggeredBy = '#tooltip-default';
|
||||
</script>
|
||||
|
||||
<Tooltip {triggeredBy} {placement} arrow={false} {color} style="custom"><slot /></Tooltip>
|
||||
<Tooltip {triggeredBy} {placement} arrow={false} defaultClass={color} style="custom"><slot /></Tooltip>
|
||||
@@ -81,12 +81,11 @@
|
||||
<span>Logs</span>
|
||||
</li>
|
||||
<li
|
||||
class:text-stone-600={$status.service.overallStatus === 'stopped'}
|
||||
class="rounded"
|
||||
class:bg-coollabs={$page.url.pathname === `/services/${$page.params.id}/logs`}
|
||||
>
|
||||
<a
|
||||
href={$status.service.overallStatus !== 'stopped' ? `/services/${$page.params.id}/logs` : ''}
|
||||
href={`/services/${$page.params.id}/logs`}
|
||||
class="no-underline w-full"
|
||||
><svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
await post(`/services/${id}/wordpress/ftp`, {
|
||||
ftpEnabled: false
|
||||
});
|
||||
service.wordpress?.ftpEnabled && window.location.reload()
|
||||
service.wordpress?.ftpEnabled && window.location.reload();
|
||||
}
|
||||
} catch (error) {
|
||||
return errorNotification(error);
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if (sure) {
|
||||
$status.service.initialLoading = true;
|
||||
try {
|
||||
if (service.type && $status.service.isRunning) {
|
||||
if (service.type && $status.service.overallStatus !== 'stopped') {
|
||||
await post(`/services/${service.id}/stop`, {});
|
||||
}
|
||||
await del(`/services/${service.id}`, { id: service.id });
|
||||
@@ -61,6 +61,6 @@
|
||||
class:hover:bg-red-500={$appSession.isAdmin}
|
||||
class="btn btn-lg btn-error text-sm"
|
||||
>
|
||||
Delete Application
|
||||
Delete Service
|
||||
</button>
|
||||
</div>
|
||||
@@ -420,7 +420,7 @@
|
||||
{#if template[oneService].environment.length > 0}
|
||||
{#each template[oneService].environment as variable}
|
||||
{#if variable.main === oneService}
|
||||
<div class="grid grid-cols-2 items-center gap-2" >
|
||||
<div class="grid grid-cols-2 items-center gap-2">
|
||||
<label class="h-10" for={variable.name}
|
||||
>{variable.label || variable.name}
|
||||
{#if variable.description}
|
||||
|
||||
Reference in new issue
Block a user