mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-27 12:33:54 +00:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
087e7b9311 | ||
|
|
39ba498293 | ||
|
|
fe7390bd4d | ||
|
|
75af551435 | ||
|
|
ae2d3ebb48 | ||
|
|
5ff6c53715 | ||
|
|
3c94723b23 | ||
|
|
c6a2e3e328 | ||
|
|
2dc5e10878 | ||
|
|
4086dfcf56 | ||
|
|
7937c2bab0 | ||
|
|
5ffa8e9936 | ||
|
|
c431cee517 | ||
|
|
375f17e728 | ||
|
|
d3f658c874 | ||
|
|
5e340a4cdd | ||
|
|
409a5b9f99 | ||
|
|
fba305020b | ||
|
|
bd4ce3ac45 | ||
|
|
c365a44e01 | ||
|
|
e94f450bf0 | ||
|
|
d5efc9ddde | ||
|
|
68895ba4a5 | ||
|
|
139aa7a0fc | ||
|
|
4955157e13 | ||
|
|
f2dd5cc75e | ||
|
|
2ad634dbc6 | ||
|
|
de13f65a24 |
@@ -93,15 +93,13 @@ Deploy your resource to:
|
|||||||
- [Fider](https://fider.io)
|
- [Fider](https://fider.io)
|
||||||
- [Hasura](https://hasura.io)
|
- [Hasura](https://hasura.io)
|
||||||
- [GlitchTip](https://glitchtip.com)
|
- [GlitchTip](https://glitchtip.com)
|
||||||
|
- And more...
|
||||||
## Migration from v1
|
|
||||||
|
|
||||||
A fresh installation is necessary. v2 and v3 are not compatible with v1.
|
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
- Twitter: [@andrasbacsai](https://twitter.com/andrasbacsai)
|
- Mastodon: [@andrasbacsai@fosstodon.org](https://fosstodon.org/@andrasbacsai)
|
||||||
- Telegram: [@andrasbacsai](https://t.me/andrasbacsai)
|
- Telegram: [@andrasbacsai](https://t.me/andrasbacsai)
|
||||||
|
- Twitter: [@andrasbacsai](https://twitter.com/andrasbacsai)
|
||||||
- Email: [andras@coollabs.io](mailto:andras@coollabs.io)
|
- Email: [andras@coollabs.io](mailto:andras@coollabs.io)
|
||||||
- Discord: [Invitation](https://coollabs.io/discord)
|
- Discord: [Invitation](https://coollabs.io/discord)
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,3 +1,65 @@
|
|||||||
|
- templateVersion: 1.0.0
|
||||||
|
defaultVersion: v3.6
|
||||||
|
documentation: https://github.com/freyacodes/Lavalink
|
||||||
|
description: Standalone audio sending node based on Lavaplayer.
|
||||||
|
type: lavalink
|
||||||
|
name: Lavalink
|
||||||
|
labels:
|
||||||
|
- discord
|
||||||
|
- discord bot
|
||||||
|
- audio
|
||||||
|
- lavalink
|
||||||
|
- jda
|
||||||
|
services:
|
||||||
|
$$id:
|
||||||
|
name: Lavalink
|
||||||
|
image: fredboat/lavalink:$$core_version
|
||||||
|
environment: []
|
||||||
|
volumes:
|
||||||
|
- $$id-lavalink:/lavalink
|
||||||
|
ports:
|
||||||
|
- "2333"
|
||||||
|
files:
|
||||||
|
- location: /opt/Lavalink/application.yml
|
||||||
|
content: >-
|
||||||
|
server:
|
||||||
|
port: $$config_port
|
||||||
|
address: 0.0.0.0
|
||||||
|
lavalink:
|
||||||
|
server:
|
||||||
|
password: "$$secret_password"
|
||||||
|
sources:
|
||||||
|
youtube: true
|
||||||
|
bandcamp: true
|
||||||
|
soundcloud: true
|
||||||
|
twitch: true
|
||||||
|
vimeo: true
|
||||||
|
http: true
|
||||||
|
local: false
|
||||||
|
|
||||||
|
logging:
|
||||||
|
file:
|
||||||
|
path: ./logs/
|
||||||
|
|
||||||
|
level:
|
||||||
|
root: INFO
|
||||||
|
lavalink: INFO
|
||||||
|
|
||||||
|
logback:
|
||||||
|
rollingpolicy:
|
||||||
|
max-file-size: 1GB
|
||||||
|
max-history: 30
|
||||||
|
variables:
|
||||||
|
- id: $$config_port
|
||||||
|
name: PORT
|
||||||
|
label: Port
|
||||||
|
defaultValue: '2333'
|
||||||
|
required: true
|
||||||
|
- id: $$secret_password
|
||||||
|
name: PASSWORD
|
||||||
|
label: Password
|
||||||
|
defaultValue: $$generate_password
|
||||||
|
required: true
|
||||||
- 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/
|
documentation: https://docs.appsmith.com/getting-started/setup/instance-configuration/
|
||||||
@@ -1664,7 +1726,6 @@
|
|||||||
services:
|
services:
|
||||||
$$id:
|
$$id:
|
||||||
name: Umami
|
name: Umami
|
||||||
documentation: "Official docs are [here](https://umami.is/docs/getting-started)"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- $$id-postgresql
|
- $$id-postgresql
|
||||||
image: "ghcr.io/umami-software/umami:$$core_version"
|
image: "ghcr.io/umami-software/umami:$$core_version"
|
||||||
@@ -1678,7 +1739,213 @@
|
|||||||
- "3000"
|
- "3000"
|
||||||
$$id-postgresql:
|
$$id-postgresql:
|
||||||
name: PostgreSQL
|
name: PostgreSQL
|
||||||
documentation: "Official docs are [here](https://umami.is/docs/getting-started)"
|
depends_on: []
|
||||||
|
image: "postgres:12-alpine"
|
||||||
|
volumes:
|
||||||
|
- "$$id-postgresql-data:/var/lib/postgresql/data"
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=$$config_postgres_user
|
||||||
|
- POSTGRES_PASSWORD=$$secret_postgres_password
|
||||||
|
- POSTGRES_DB=$$config_postgres_db
|
||||||
|
ports: []
|
||||||
|
files:
|
||||||
|
- location: /docker-entrypoint-initdb.d/schema.postgresql.sql
|
||||||
|
content: |2-
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE "account" (
|
||||||
|
"user_id" SERIAL NOT NULL,
|
||||||
|
"username" VARCHAR(255) NOT NULL,
|
||||||
|
"password" VARCHAR(60) NOT NULL,
|
||||||
|
"is_admin" BOOLEAN NOT NULL DEFAULT false,
|
||||||
|
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"updated_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
|
||||||
|
PRIMARY KEY ("user_id")
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE "event" (
|
||||||
|
"event_id" SERIAL NOT NULL,
|
||||||
|
"website_id" INTEGER NOT NULL,
|
||||||
|
"session_id" INTEGER NOT NULL,
|
||||||
|
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"url" VARCHAR(500) NOT NULL,
|
||||||
|
"event_type" VARCHAR(50) NOT NULL,
|
||||||
|
"event_value" VARCHAR(50) NOT NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY ("event_id")
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE "pageview" (
|
||||||
|
"view_id" SERIAL NOT NULL,
|
||||||
|
"website_id" INTEGER NOT NULL,
|
||||||
|
"session_id" INTEGER NOT NULL,
|
||||||
|
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"url" VARCHAR(500) NOT NULL,
|
||||||
|
"referrer" VARCHAR(500),
|
||||||
|
|
||||||
|
PRIMARY KEY ("view_id")
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE "session" (
|
||||||
|
"session_id" SERIAL NOT NULL,
|
||||||
|
"session_uuid" UUID NOT NULL,
|
||||||
|
"website_id" INTEGER NOT NULL,
|
||||||
|
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"hostname" VARCHAR(100),
|
||||||
|
"browser" VARCHAR(20),
|
||||||
|
"os" VARCHAR(20),
|
||||||
|
"device" VARCHAR(20),
|
||||||
|
"screen" VARCHAR(11),
|
||||||
|
"language" VARCHAR(35),
|
||||||
|
"country" CHAR(2),
|
||||||
|
|
||||||
|
PRIMARY KEY ("session_id")
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE "website" (
|
||||||
|
"website_id" SERIAL NOT NULL,
|
||||||
|
"website_uuid" UUID NOT NULL,
|
||||||
|
"user_id" INTEGER NOT NULL,
|
||||||
|
"name" VARCHAR(100) NOT NULL,
|
||||||
|
"domain" VARCHAR(500),
|
||||||
|
"share_id" VARCHAR(64),
|
||||||
|
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
|
||||||
|
PRIMARY KEY ("website_id")
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX "account.username_unique" ON "account"("username");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "event_created_at_idx" ON "event"("created_at");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "event_session_id_idx" ON "event"("session_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "event_website_id_idx" ON "event"("website_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "pageview_created_at_idx" ON "pageview"("created_at");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "pageview_session_id_idx" ON "pageview"("session_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "pageview_website_id_created_at_idx" ON "pageview"("website_id", "created_at");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "pageview_website_id_idx" ON "pageview"("website_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "pageview_website_id_session_id_created_at_idx" ON "pageview"("website_id", "session_id", "created_at");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX "session.session_uuid_unique" ON "session"("session_uuid");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "session_created_at_idx" ON "session"("created_at");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "session_website_id_idx" ON "session"("website_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX "website.website_uuid_unique" ON "website"("website_uuid");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX "website.share_id_unique" ON "website"("share_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "website_user_id_idx" ON "website"("user_id");
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "event" ADD FOREIGN KEY ("session_id") REFERENCES "session"("session_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "event" ADD FOREIGN KEY ("website_id") REFERENCES "website"("website_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "pageview" ADD FOREIGN KEY ("session_id") REFERENCES "session"("session_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "pageview" ADD FOREIGN KEY ("website_id") REFERENCES "website"("website_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "session" ADD FOREIGN KEY ("website_id") REFERENCES "website"("website_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "website" ADD FOREIGN KEY ("user_id") REFERENCES "account"("user_id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
insert into account (username, password, is_admin) values ('admin', '$$hashed$$secret_admin_password', true);
|
||||||
|
variables:
|
||||||
|
- id: $$secret_database_url
|
||||||
|
name: DATABASE_URL
|
||||||
|
label: Database URL for PostgreSQL
|
||||||
|
defaultValue: >-
|
||||||
|
postgresql://$$config_postgres_user:$$secret_postgres_password@$$id-postgresql:5432/$$config_postgres_db
|
||||||
|
description: ""
|
||||||
|
- id: $$secret_hash_salt
|
||||||
|
name: HASH_SALT
|
||||||
|
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
|
||||||
|
defaultValue: $$generate_username
|
||||||
|
description: ""
|
||||||
|
- id: $$secret_postgres_password
|
||||||
|
name: POSTGRES_PASSWORD
|
||||||
|
label: PostgreSQL Password
|
||||||
|
defaultValue: $$generate_password
|
||||||
|
description: ""
|
||||||
|
- id: $$config_postgres_db
|
||||||
|
name: POSTGRES_DB
|
||||||
|
label: PostgreSQL Database
|
||||||
|
defaultValue: umami
|
||||||
|
description: ""
|
||||||
|
- id: $$secret_admin_password
|
||||||
|
name: ADMIN_PASSWORD
|
||||||
|
label: Initial Admin Password
|
||||||
|
defaultValue: $$generate_password
|
||||||
|
description: ""
|
||||||
|
showOnConfiguration: true
|
||||||
|
- templateVersion: 1.0.0
|
||||||
|
ignore: true
|
||||||
|
defaultVersion: postgresql-v1.38.0
|
||||||
|
documentation: https://umami.is/docs/getting-started
|
||||||
|
type: umami
|
||||||
|
name: Umami
|
||||||
|
subname: (PostgreSQL)
|
||||||
|
description: >-
|
||||||
|
A simple, easy to use, self-hosted web analytics solution.
|
||||||
|
services:
|
||||||
|
$$id:
|
||||||
|
name: Umami
|
||||||
|
depends_on:
|
||||||
|
- $$id-postgresql
|
||||||
|
image: "ghcr.io/umami-software/umami:$$core_version"
|
||||||
|
volumes: []
|
||||||
|
environment:
|
||||||
|
- ADMIN_PASSWORD=$$secret_admin_password
|
||||||
|
- DATABASE_URL=$$secret_database_url
|
||||||
|
- DATABASE_TYPE=$$config_database_type
|
||||||
|
- HASH_SALT=$$secret_hash_salt
|
||||||
|
ports:
|
||||||
|
- "3000"
|
||||||
|
$$id-postgresql:
|
||||||
|
name: PostgreSQL
|
||||||
depends_on: []
|
depends_on: []
|
||||||
image: "postgres:12-alpine"
|
image: "postgres:12-alpine"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -1871,7 +2138,7 @@
|
|||||||
services:
|
services:
|
||||||
$$id:
|
$$id:
|
||||||
name: MeiliSearch
|
name: MeiliSearch
|
||||||
documentation: "https://docs.meilisearch.com/"
|
documentation: https://docs.meilisearch.com/
|
||||||
depends_on: []
|
depends_on: []
|
||||||
image: "getmeili/meilisearch:$$core_version"
|
image: "getmeili/meilisearch:$$core_version"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -1893,7 +2160,7 @@
|
|||||||
- templateVersion: 1.0.0
|
- templateVersion: 1.0.0
|
||||||
ignore: true
|
ignore: true
|
||||||
defaultVersion: latest
|
defaultVersion: latest
|
||||||
documentation: https://ghost.org/resources/
|
documentation: https://docs.ghost.org
|
||||||
type: ghost-mariadb
|
type: ghost-mariadb
|
||||||
name: Ghost
|
name: Ghost
|
||||||
subname: (MariaDB)
|
subname: (MariaDB)
|
||||||
@@ -1905,7 +2172,6 @@
|
|||||||
services:
|
services:
|
||||||
$$id:
|
$$id:
|
||||||
name: Ghost
|
name: Ghost
|
||||||
documentation: "Taken from https://docs.ghost.org/"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- $$id-mariadb
|
- $$id-mariadb
|
||||||
image: "bitnami/ghost:$$core_version"
|
image: "bitnami/ghost:$$core_version"
|
||||||
@@ -2011,7 +2277,7 @@
|
|||||||
description: ""
|
description: ""
|
||||||
- templateVersion: 1.0.0
|
- templateVersion: 1.0.0
|
||||||
defaultVersion: "5.22"
|
defaultVersion: "5.22"
|
||||||
documentation: https://ghost.org/resources/
|
documentation: https://docs.ghost.org
|
||||||
type: ghost-only
|
type: ghost-only
|
||||||
name: Ghost
|
name: Ghost
|
||||||
subname: (without Database)
|
subname: (without Database)
|
||||||
@@ -2020,7 +2286,6 @@
|
|||||||
services:
|
services:
|
||||||
$$id:
|
$$id:
|
||||||
name: Ghost
|
name: Ghost
|
||||||
documentation: "Taken from https://docs.ghost.org/"
|
|
||||||
image: "ghost:$$core_version"
|
image: "ghost:$$core_version"
|
||||||
volumes:
|
volumes:
|
||||||
- "$$id-ghost:/var/lib/ghost/content"
|
- "$$id-ghost:/var/lib/ghost/content"
|
||||||
@@ -2076,7 +2341,7 @@
|
|||||||
required: true
|
required: true
|
||||||
- templateVersion: 1.0.0
|
- templateVersion: 1.0.0
|
||||||
defaultVersion: "5.22"
|
defaultVersion: "5.22"
|
||||||
documentation: https://ghost.org/resources/
|
documentation: https://docs.ghost.org
|
||||||
type: ghost-mysql
|
type: ghost-mysql
|
||||||
name: Ghost
|
name: Ghost
|
||||||
subname: (MySQL)
|
subname: (MySQL)
|
||||||
@@ -2085,7 +2350,6 @@
|
|||||||
services:
|
services:
|
||||||
$$id:
|
$$id:
|
||||||
name: Ghost
|
name: Ghost
|
||||||
documentation: "Taken from https://docs.ghost.org/"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- $$id-mysql
|
- $$id-mysql
|
||||||
image: "ghost:$$core_version"
|
image: "ghost:$$core_version"
|
||||||
@@ -2166,7 +2430,6 @@
|
|||||||
services:
|
services:
|
||||||
$$id:
|
$$id:
|
||||||
name: WordPress
|
name: WordPress
|
||||||
documentation: " Taken from https://docs.docker.com/compose/wordpress/"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- $$id-mysql
|
- $$id-mysql
|
||||||
image: "wordpress:$$core_version"
|
image: "wordpress:$$core_version"
|
||||||
@@ -2184,7 +2447,7 @@
|
|||||||
name: MySQL
|
name: MySQL
|
||||||
depends_on: []
|
depends_on: []
|
||||||
image: "bitnami/mysql:5.7"
|
image: "bitnami/mysql:5.7"
|
||||||
imageArm: "mysql:5.7"
|
imageArm: "mysql:8.0"
|
||||||
volumes:
|
volumes:
|
||||||
- "$$id-mysql-data:/bitnami/mysql/data"
|
- "$$id-mysql-data:/bitnami/mysql/data"
|
||||||
volumesArm:
|
volumesArm:
|
||||||
@@ -2257,7 +2520,6 @@
|
|||||||
services:
|
services:
|
||||||
$$id:
|
$$id:
|
||||||
name: WordPress
|
name: WordPress
|
||||||
documentation: "Taken from https://docs.docker.com/compose/wordpress/"
|
|
||||||
image: "wordpress:$$core_version"
|
image: "wordpress:$$core_version"
|
||||||
volumes:
|
volumes:
|
||||||
- "$$id-wordpress-data:/var/www/html"
|
- "$$id-wordpress-data:/var/www/html"
|
||||||
@@ -2331,7 +2593,6 @@
|
|||||||
services:
|
services:
|
||||||
$$id:
|
$$id:
|
||||||
name: VSCode Server
|
name: VSCode Server
|
||||||
documentation: "Taken from https://github.com/coder/code-server/. "
|
|
||||||
depends_on: []
|
depends_on: []
|
||||||
image: "codercom/code-server:$$core_version"
|
image: "codercom/code-server:$$core_version"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -2363,7 +2624,6 @@
|
|||||||
$$id:
|
$$id:
|
||||||
name: MinIO
|
name: MinIO
|
||||||
command: "server /data --console-address :9001"
|
command: "server /data --console-address :9001"
|
||||||
documentation: "Taken from https://docs.min.io/docs/minio-docker-quickstart-guide.html"
|
|
||||||
depends_on: []
|
depends_on: []
|
||||||
image: "minio/minio:$$core_version"
|
image: "minio/minio:$$core_version"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -2423,7 +2683,6 @@
|
|||||||
$$id:
|
$$id:
|
||||||
name: Fider
|
name: Fider
|
||||||
image: "getfider/fider:$$core_version"
|
image: "getfider/fider:$$core_version"
|
||||||
documentation: "Taken from https://hub.docker.com/r/getfider/fider/"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- $$id-postgresql
|
- $$id-postgresql
|
||||||
environment:
|
environment:
|
||||||
@@ -2443,7 +2702,6 @@
|
|||||||
- "3000"
|
- "3000"
|
||||||
$$id-postgresql:
|
$$id-postgresql:
|
||||||
name: PostgreSQL
|
name: PostgreSQL
|
||||||
documentation: "Taken from https://hub.docker.com/r/getfider/fider/"
|
|
||||||
depends_on: []
|
depends_on: []
|
||||||
image: "postgres:12-alpine"
|
image: "postgres:12-alpine"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -2546,7 +2804,6 @@
|
|||||||
services:
|
services:
|
||||||
$$id:
|
$$id:
|
||||||
name: N8n
|
name: N8n
|
||||||
documentation: "Taken from https://hub.docker.com/r/n8nio/n8n"
|
|
||||||
depends_on: []
|
depends_on: []
|
||||||
image: "n8nio/n8n:$$core_version"
|
image: "n8nio/n8n:$$core_version"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -2579,7 +2836,6 @@
|
|||||||
services:
|
services:
|
||||||
$$id:
|
$$id:
|
||||||
name: Plausible Analytics
|
name: Plausible Analytics
|
||||||
documentation: "Taken from https://plausible.io/"
|
|
||||||
command: >-
|
command: >-
|
||||||
sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db
|
sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db
|
||||||
migrate && /entrypoint.sh db init-admin && /entrypoint.sh run"
|
migrate && /entrypoint.sh db init-admin && /entrypoint.sh run"
|
||||||
@@ -2601,7 +2857,6 @@
|
|||||||
- "8000"
|
- "8000"
|
||||||
$$id-postgresql:
|
$$id-postgresql:
|
||||||
name: PostgreSQL
|
name: PostgreSQL
|
||||||
documentation: "Taken from https://plausible.io/"
|
|
||||||
image: "bitnami/postgresql:13.2.0"
|
image: "bitnami/postgresql:13.2.0"
|
||||||
volumes:
|
volumes:
|
||||||
- "$$id-postgresql-data:/bitnami/postgresql"
|
- "$$id-postgresql-data:/bitnami/postgresql"
|
||||||
@@ -2611,7 +2866,6 @@
|
|||||||
- POSTGRESQL_DATABASE=$$config_postgresql_database
|
- POSTGRESQL_DATABASE=$$config_postgresql_database
|
||||||
$$id-clickhouse:
|
$$id-clickhouse:
|
||||||
name: Clickhouse
|
name: Clickhouse
|
||||||
documentation: "Taken from https://plausible.io/"
|
|
||||||
volumes:
|
volumes:
|
||||||
- "$$id-clickhouse-data:/var/lib/clickhouse"
|
- "$$id-clickhouse-data:/var/lib/clickhouse"
|
||||||
image: "yandex/clickhouse-server:21.3.2.5"
|
image: "yandex/clickhouse-server:21.3.2.5"
|
||||||
|
|||||||
@@ -238,7 +238,6 @@ async function hasura(service: any, template: any) {
|
|||||||
async function umami(service: any, template: any) {
|
async function umami(service: any, template: any) {
|
||||||
const { postgresqlUser, postgresqlPassword, postgresqlDatabase, umamiAdminPassword, hashSalt } = service.umami
|
const { postgresqlUser, postgresqlPassword, postgresqlDatabase, umamiAdminPassword, hashSalt } = service.umami
|
||||||
const { id } = service
|
const { id } = service
|
||||||
|
|
||||||
const secrets = [
|
const secrets = [
|
||||||
`HASH_SALT@@@${hashSalt}`,
|
`HASH_SALT@@@${hashSalt}`,
|
||||||
`POSTGRES_PASSWORD@@@${postgresqlPassword}`,
|
`POSTGRES_PASSWORD@@@${postgresqlPassword}`,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { day } from './dayjs';
|
|||||||
import { saveBuildLog } from './buildPacks/common';
|
import { saveBuildLog } from './buildPacks/common';
|
||||||
import { scheduler } from './scheduler';
|
import { scheduler } from './scheduler';
|
||||||
|
|
||||||
export const version = '3.11.2';
|
export const version = '3.11.6';
|
||||||
export const isDev = process.env.NODE_ENV === 'development';
|
export const isDev = process.env.NODE_ENV === 'development';
|
||||||
|
|
||||||
const algorithm = 'aes-256-ctr';
|
const algorithm = 'aes-256-ctr';
|
||||||
@@ -972,7 +972,7 @@ export function generateDatabaseConfiguration(database: any, arch: string): Data
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
export function isARM(arch: string) {
|
export function isARM(arch: string) {
|
||||||
if (arch === 'arm' || arch === 'arm64') {
|
if (arch === 'arm' || arch === 'arm64' || arch === 'aarch' || arch === 'aarch64') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1,145 +1,12 @@
|
|||||||
import { isDev } from "./common";
|
import { isDev } from "./common";
|
||||||
import fs from 'fs/promises';
|
import fs from 'fs/promises';
|
||||||
export async function getTemplates() {
|
export async function getTemplates() {
|
||||||
let templates: any = [];
|
const templatePath = isDev ? './templates.json' : '/app/templates.json';
|
||||||
if (isDev) {
|
const ts = await fs.readFile(templatePath, 'utf8')
|
||||||
templates = JSON.parse(await (await fs.readFile('./templates.json')).toString())
|
if (ts) {
|
||||||
} else {
|
return JSON.parse(ts);
|
||||||
templates = JSON.parse(await (await fs.readFile('/app/templates.json')).toString())
|
|
||||||
}
|
}
|
||||||
// if (!isDev) {
|
return [];
|
||||||
// templates.push({
|
|
||||||
// "templateVersion": "1.0.0",
|
|
||||||
// "defaultVersion": "latest",
|
|
||||||
// "name": "Test-Fake-Service",
|
|
||||||
// "description": "",
|
|
||||||
// "services": {
|
|
||||||
// "$$id": {
|
|
||||||
// "name": "Test-Fake-Service",
|
|
||||||
// "depends_on": [
|
|
||||||
// "$$id-postgresql",
|
|
||||||
// "$$id-redis"
|
|
||||||
// ],
|
|
||||||
// "image": "weblate/weblate:$$core_version",
|
|
||||||
// "volumes": [
|
|
||||||
// "$$id-data:/app/data",
|
|
||||||
// ],
|
|
||||||
// "environment": [
|
|
||||||
// `POSTGRES_SECRET=$$secret_postgres_secret`,
|
|
||||||
// `WEBLATE_SITE_DOMAIN=$$config_weblate_site_domain`,
|
|
||||||
// `WEBLATE_ADMIN_PASSWORD=$$secret_weblate_admin_password`,
|
|
||||||
// `POSTGRES_PASSWORD=$$secret_postgres_password`,
|
|
||||||
// `POSTGRES_USER=$$config_postgres_user`,
|
|
||||||
// `POSTGRES_DATABASE=$$config_postgres_db`,
|
|
||||||
// `POSTGRES_HOST=$$id-postgresql`,
|
|
||||||
// `POSTGRES_PORT=5432`,
|
|
||||||
// `REDIS_HOST=$$id-redis`,
|
|
||||||
// ],
|
|
||||||
// "ports": [
|
|
||||||
// "8080"
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// "$$id-postgresql": {
|
|
||||||
// "name": "PostgreSQL",
|
|
||||||
// "depends_on": [],
|
|
||||||
// "image": "postgres:14-alpine",
|
|
||||||
// "volumes": [
|
|
||||||
// "$$id-postgresql-data:/var/lib/postgresql/data",
|
|
||||||
// ],
|
|
||||||
// "environment": [
|
|
||||||
// "POSTGRES_USER=$$config_postgres_user",
|
|
||||||
// "POSTGRES_PASSWORD=$$secret_postgres_password",
|
|
||||||
// "POSTGRES_DB=$$config_postgres_db",
|
|
||||||
// ],
|
|
||||||
// "ports": []
|
|
||||||
// },
|
|
||||||
// "$$id-redis": {
|
|
||||||
// "name": "Redis",
|
|
||||||
// "depends_on": [],
|
|
||||||
// "image": "redis:7-alpine",
|
|
||||||
// "volumes": [
|
|
||||||
// "$$id-redis-data:/data",
|
|
||||||
// ],
|
|
||||||
// "environment": [],
|
|
||||||
// "ports": [],
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// "variables": [
|
|
||||||
// {
|
|
||||||
// "id": "$$config_weblate_site_domain",
|
|
||||||
// "main": "$$id",
|
|
||||||
// "name": "WEBLATE_SITE_DOMAIN",
|
|
||||||
// "label": "Weblate Domain",
|
|
||||||
// "defaultValue": "$$generate_domain",
|
|
||||||
// "description": "",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "id": "$$secret_weblate_admin_password",
|
|
||||||
// "main": "$$id",
|
|
||||||
// "name": "WEBLATE_ADMIN_PASSWORD",
|
|
||||||
// "label": "Weblate Admin Password",
|
|
||||||
// "defaultValue": "$$generate_password",
|
|
||||||
// "description": "",
|
|
||||||
// "extras": {
|
|
||||||
// "isVisibleOnUI": true,
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "id": "$$secret_weblate_admin_password2",
|
|
||||||
// "name": "WEBLATE_ADMIN_PASSWORD2",
|
|
||||||
// "label": "Weblate Admin Password2",
|
|
||||||
// "defaultValue": "$$generate_password",
|
|
||||||
// "description": "",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "id": "$$config_postgres_user",
|
|
||||||
// "main": "$$id-postgresql",
|
|
||||||
// "name": "POSTGRES_USER",
|
|
||||||
// "label": "PostgreSQL User",
|
|
||||||
// "defaultValue": "$$generate_username",
|
|
||||||
// "description": "",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "id": "$$secret_postgres_password",
|
|
||||||
// "main": "$$id-postgresql",
|
|
||||||
// "name": "POSTGRES_PASSWORD",
|
|
||||||
// "label": "PostgreSQL Password",
|
|
||||||
// "defaultValue": "$$generate_password(32)",
|
|
||||||
// "description": "",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "id": "$$secret_postgres_password_hex32",
|
|
||||||
// "name": "POSTGRES_PASSWORD_hex32",
|
|
||||||
// "label": "PostgreSQL Password hex32",
|
|
||||||
// "defaultValue": "$$generate_hex(32)",
|
|
||||||
// "description": "",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "id": "$$config_postgres_something_hex32",
|
|
||||||
// "name": "POSTGRES_SOMETHING_HEX32",
|
|
||||||
// "label": "PostgreSQL Something hex32",
|
|
||||||
// "defaultValue": "$$generate_hex(32)",
|
|
||||||
// "description": "",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "id": "$$config_postgres_db",
|
|
||||||
// "main": "$$id-postgresql",
|
|
||||||
// "name": "POSTGRES_DB",
|
|
||||||
// "label": "PostgreSQL Database",
|
|
||||||
// "defaultValue": "weblate",
|
|
||||||
// "description": "",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "id": "$$secret_postgres_secret",
|
|
||||||
// "name": "POSTGRES_SECRET",
|
|
||||||
// "label": "PostgreSQL Secret",
|
|
||||||
// "defaultValue": "",
|
|
||||||
// "description": "",
|
|
||||||
// },
|
|
||||||
// ]
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
return templates
|
|
||||||
}
|
}
|
||||||
const compareSemanticVersions = (a: string, b: string) => {
|
const compareSemanticVersions = (a: string, b: string) => {
|
||||||
const a1 = a.split('.');
|
const a1 = a.split('.');
|
||||||
@@ -155,16 +22,22 @@ const compareSemanticVersions = (a: string, b: string) => {
|
|||||||
return b1.length - a1.length;
|
return b1.length - a1.length;
|
||||||
};
|
};
|
||||||
export async function getTags(type: string) {
|
export async function getTags(type: string) {
|
||||||
if (type) {
|
|
||||||
let tags: any = [];
|
try {
|
||||||
if (isDev) {
|
if (type) {
|
||||||
tags = JSON.parse(await (await fs.readFile('./tags.json')).toString())
|
const tagsPath = isDev ? './tags.json' : '/app/tags.json';
|
||||||
} else {
|
const data = await fs.readFile(tagsPath, 'utf8')
|
||||||
tags = JSON.parse(await (await fs.readFile('/app/tags.json')).toString())
|
let tags = JSON.parse(data)
|
||||||
|
if (tags) {
|
||||||
|
tags = tags.find((tag: any) => tag.name.includes(type))
|
||||||
|
tags.tags = tags.tags.sort(compareSemanticVersions).reverse();
|
||||||
|
return tags
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tags = tags.find((tag: any) => tag.name.includes(type))
|
} catch (error) {
|
||||||
tags.tags = tags.tags.sort(compareSemanticVersions).reverse();
|
return []
|
||||||
return tags
|
|
||||||
}
|
}
|
||||||
return []
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ export async function startService(request: FastifyRequest<ServiceStartStop>, fa
|
|||||||
const { id } = request.params;
|
const { id } = request.params;
|
||||||
const teamId = request.user.teamId;
|
const teamId = request.user.teamId;
|
||||||
const service = await getServiceFromDB({ id, teamId });
|
const service = await getServiceFromDB({ id, teamId });
|
||||||
const arm = isARM(service.arch)
|
console.log({service})
|
||||||
|
const arm = isARM(service.arch);
|
||||||
const { type, destinationDockerId, destinationDocker, persistentStorage, exposePort } =
|
const { type, destinationDockerId, destinationDocker, persistentStorage, exposePort } =
|
||||||
service;
|
service;
|
||||||
|
|
||||||
@@ -103,15 +104,22 @@ export async function startService(request: FastifyRequest<ServiceStartStop>, fa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let port = null
|
||||||
|
if (template.services[s].ports?.length > 0) {
|
||||||
|
port = template.services[s].ports[0]
|
||||||
|
}
|
||||||
|
let image = template.services[s].image
|
||||||
|
if (arm && template.services[s].imageArm) {
|
||||||
|
image = template.services[s].imageArm
|
||||||
|
}
|
||||||
config[s] = {
|
config[s] = {
|
||||||
container_name: s,
|
container_name: s,
|
||||||
build: template.services[s].build || undefined,
|
build: template.services[s].build || undefined,
|
||||||
command: template.services[s].command,
|
command: template.services[s].command,
|
||||||
entrypoint: template.services[s]?.entrypoint,
|
entrypoint: template.services[s]?.entrypoint,
|
||||||
image: arm ? template.services[s].imageArm : template.services[s].image,
|
image,
|
||||||
expose: template.services[s].ports,
|
expose: template.services[s].ports,
|
||||||
...(exposePort ? { ports: [`${exposePort}:${exposePort}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
volumes: Array.from(volumes),
|
volumes: Array.from(volumes),
|
||||||
environment: newEnvironments,
|
environment: newEnvironments,
|
||||||
depends_on: template.services[s]?.depends_on,
|
depends_on: template.services[s]?.depends_on,
|
||||||
|
|||||||
@@ -149,9 +149,11 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
parsedTemplate[realKey] = {
|
parsedTemplate[realKey] = {
|
||||||
|
value,
|
||||||
name,
|
name,
|
||||||
documentation: value.documentation || foundTemplate.documentation || 'https://docs.coollabs.io',
|
documentation: value.documentation || foundTemplate.documentation || 'https://docs.coollabs.io',
|
||||||
image: value.image,
|
image: value.image,
|
||||||
|
files: value?.files,
|
||||||
environment: [],
|
environment: [],
|
||||||
fqdns: [],
|
fqdns: [],
|
||||||
proxy: {}
|
proxy: {}
|
||||||
@@ -189,7 +191,7 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
|
|||||||
const variable = foundTemplate.variables.find(v => v.id === proxyValue.domain)
|
const variable = foundTemplate.variables.find(v => v.id === proxyValue.domain)
|
||||||
if (variable) {
|
if (variable) {
|
||||||
const { id, name, label, description, defaultValue, required = false } = variable
|
const { id, name, label, description, defaultValue, required = false } = variable
|
||||||
const found = await prisma.serviceSetting.findFirst({ where: { serviceId: service.id , variableName: proxyValue.domain } })
|
const found = await prisma.serviceSetting.findFirst({ where: { serviceId: service.id, variableName: proxyValue.domain } })
|
||||||
parsedTemplate[realKey].fqdns.push(
|
parsedTemplate[realKey].fqdns.push(
|
||||||
{ id, name, value: found?.value || '', label, description, defaultValue, required }
|
{ id, name, value: found?.value || '', label, description, defaultValue, required }
|
||||||
)
|
)
|
||||||
@@ -208,7 +210,7 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
|
|||||||
strParsedTemplate = strParsedTemplate.replaceAll('$$id', service.id)
|
strParsedTemplate = strParsedTemplate.replaceAll('$$id', service.id)
|
||||||
strParsedTemplate = strParsedTemplate.replaceAll('$$core_version', service.version || foundTemplate.defaultVersion)
|
strParsedTemplate = strParsedTemplate.replaceAll('$$core_version', service.version || foundTemplate.defaultVersion)
|
||||||
|
|
||||||
// replace $$fqdn
|
// replace $$workdir
|
||||||
if (workdir) {
|
if (workdir) {
|
||||||
strParsedTemplate = strParsedTemplate.replaceAll('$$workdir', workdir)
|
strParsedTemplate = strParsedTemplate.replaceAll('$$workdir', workdir)
|
||||||
}
|
}
|
||||||
@@ -217,15 +219,15 @@ 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') {
|
||||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, service.destinationDocker.network + "\"")
|
strParsedTemplate = strParsedTemplate.replaceAll(regex, service.destinationDocker.network)
|
||||||
} else {
|
} else {
|
||||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, value + "\"")
|
strParsedTemplate = strParsedTemplate.replaceAll(regex, value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -233,15 +235,13 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
|
|||||||
// replace $$secret
|
// replace $$secret
|
||||||
if (service.serviceSecret.length > 0) {
|
if (service.serviceSecret.length > 0) {
|
||||||
for (const secret of service.serviceSecret) {
|
for (const secret of service.serviceSecret) {
|
||||||
const { name, value } = secret
|
let { name, value } = secret
|
||||||
const regexHashed = new RegExp(`\\$\\$hashed\\$\\$secret_${name}\\"`, 'gi')
|
name = name.toLowerCase()
|
||||||
const regex = new RegExp(`\\$\\$secret_${name}\\"`, 'gi')
|
const regexHashed = new RegExp(`\\$\\$hashed\\$\\$secret_${name}`, 'gi')
|
||||||
|
const regex = new RegExp(`\\$\\$secret_${name}`, 'gi')
|
||||||
if (value) {
|
if (value) {
|
||||||
strParsedTemplate = strParsedTemplate.replaceAll(regexHashed, bcrypt.hashSync(value.replaceAll("\"", "\\\""), 10) + "\"")
|
strParsedTemplate = strParsedTemplate.replaceAll(regexHashed, bcrypt.hashSync(value.replaceAll("\"", "\\\""), 10))
|
||||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, value.replaceAll("\"", "\\\"") + "\"")
|
strParsedTemplate = strParsedTemplate.replaceAll(regex, value.replaceAll("\"", "\\\""))
|
||||||
} else {
|
|
||||||
strParsedTemplate = strParsedTemplate.replaceAll(regexHashed, "\"")
|
|
||||||
strParsedTemplate = strParsedTemplate.replaceAll(regex, "\"")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -287,11 +287,10 @@ export async function proxyConfiguration(request: FastifyRequest<OnlyId>, remote
|
|||||||
if (
|
if (
|
||||||
!runningContainers[destinationDockerId] ||
|
!runningContainers[destinationDockerId] ||
|
||||||
runningContainers[destinationDockerId].length === 0 ||
|
runningContainers[destinationDockerId].length === 0 ||
|
||||||
!runningContainers[destinationDockerId].includes(id)
|
runningContainers[destinationDockerId].filter((container) => container.startsWith(id)).length === 0
|
||||||
) {
|
) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buildPack === 'compose') {
|
if (buildPack === 'compose') {
|
||||||
const services = Object.entries(JSON.parse(dockerComposeConfiguration))
|
const services = Object.entries(JSON.parse(dockerComposeConfiguration))
|
||||||
if (services.length > 0) {
|
if (services.length > 0) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,7 +1,14 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { dev } from '$app/env';
|
import { dev } from '$app/env';
|
||||||
import { get, post } from '$lib/api';
|
import { get, post } from '$lib/api';
|
||||||
import { addToast, appSession, features, updateLoading, isUpdateAvailable } from '$lib/store';
|
import {
|
||||||
|
addToast,
|
||||||
|
appSession,
|
||||||
|
features,
|
||||||
|
updateLoading,
|
||||||
|
isUpdateAvailable,
|
||||||
|
latestVersion
|
||||||
|
} from '$lib/store';
|
||||||
import { asyncSleep, errorNotification } from '$lib/common';
|
import { asyncSleep, errorNotification } from '$lib/common';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import Tooltip from './Tooltip.svelte';
|
import Tooltip from './Tooltip.svelte';
|
||||||
@@ -11,15 +18,17 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
success: null
|
success: null
|
||||||
};
|
};
|
||||||
let latestVersion = 'latest';
|
|
||||||
async function update() {
|
async function update() {
|
||||||
updateStatus.loading = true;
|
updateStatus.loading = true;
|
||||||
try {
|
try {
|
||||||
if (dev) {
|
if (dev) {
|
||||||
await asyncSleep(4000);
|
localStorage.setItem('lastVersion', $appSession.version);
|
||||||
|
await asyncSleep(1000);
|
||||||
|
updateStatus.loading = false;
|
||||||
return window.location.reload();
|
return window.location.reload();
|
||||||
} else {
|
} else {
|
||||||
await post(`/update`, { type: 'update', latestVersion });
|
localStorage.setItem('lastVersion', $appSession.version);
|
||||||
|
await post(`/update`, { type: 'update', latestVersion: $latestVersion });
|
||||||
addToast({
|
addToast({
|
||||||
message: 'Update completed.<br><br>Waiting for the new version to start...',
|
message: 'Update completed.<br><br>Waiting for the new version to start...',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
@@ -62,7 +71,7 @@
|
|||||||
$updateLoading = true;
|
$updateLoading = true;
|
||||||
const data = await get(`/update`);
|
const data = await get(`/update`);
|
||||||
if (overrideVersion || data?.isUpdateAvailable) {
|
if (overrideVersion || data?.isUpdateAvailable) {
|
||||||
latestVersion = overrideVersion || data.latestVersion;
|
$latestVersion = overrideVersion || data.latestVersion;
|
||||||
if (overrideVersion) {
|
if (overrideVersion) {
|
||||||
$isUpdateAvailable = true;
|
$isUpdateAvailable = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -91,7 +100,7 @@
|
|||||||
{#if updateStatus.loading}
|
{#if updateStatus.loading}
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
class="lds-heart h-8 w-8"
|
class="lds-heart h-8 w-8 mx-auto"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
stroke-width="1.5"
|
stroke-width="1.5"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export let type: string;
|
export let type: string;
|
||||||
export let isAbsolute = false;
|
export let isAbsolute = false;
|
||||||
|
|
||||||
let extension = 'png';
|
let extension = 'png';
|
||||||
let svgs = [
|
let svgs = [
|
||||||
'languagetool',
|
'languagetool',
|
||||||
@@ -31,8 +30,14 @@
|
|||||||
function generateClass() {
|
function generateClass() {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case 'n8n':
|
case 'n8n':
|
||||||
|
if (isAbsolute) {
|
||||||
|
return 'w-12 h-12 absolute -m-9 -mt-12';
|
||||||
|
}
|
||||||
return 'w-12 h-12 -mt-3';
|
return 'w-12 h-12 -mt-3';
|
||||||
case 'weblate':
|
case 'weblate':
|
||||||
|
if (isAbsolute) {
|
||||||
|
return 'w-12 h-12 absolute -m-9 -mt-12';
|
||||||
|
}
|
||||||
return 'w-12 h-12 -mt-3';
|
return 'w-12 h-12 -mt-3';
|
||||||
default:
|
default:
|
||||||
return isAbsolute ? 'w-10 h-10 absolute -m-4 -mt-9 left-0' : 'w-10 h-10';
|
return isAbsolute ? 'w-10 h-10 absolute -m-4 -mt-9 left-0' : 'w-10 h-10';
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ interface AddToast {
|
|||||||
}
|
}
|
||||||
export const updateLoading: Writable<boolean> = writable(false);
|
export const updateLoading: Writable<boolean> = writable(false);
|
||||||
export const isUpdateAvailable: Writable<boolean> = writable(false);
|
export const isUpdateAvailable: Writable<boolean> = writable(false);
|
||||||
|
export const latestVersion: Writable<string> = writable('latest');
|
||||||
export const search: any = writable('')
|
export const search: any = writable('')
|
||||||
export const loginEmail: Writable<string | undefined> = writable()
|
export const loginEmail: Writable<string | undefined> = writable()
|
||||||
export const appSession: Writable<AppSession> = writable({
|
export const appSession: Writable<AppSession> = writable({
|
||||||
|
|||||||
@@ -32,10 +32,10 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="w-full font-bold grid grid-cols-1 lg:grid-cols-4 gap-2 pb-2">
|
<div class="w-full grid grid-cols-1 lg:grid-cols-4 gap-2 pb-2">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
{#if index === 0 || length === 0}
|
{#if index === 0 || length === 0}
|
||||||
<label for="name" class="pb-2 uppercase">name</label>
|
<label for="name" class="pb-2 uppercase font-bold">name</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<input
|
<input
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
{#if index === 0 || length === 0}
|
{#if index === 0 || length === 0}
|
||||||
<label for="value" class="pb-2 uppercase">value</label>
|
<label for="value" class="pb-2 uppercase font-bold">value</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<CopyPasswordField
|
<CopyPasswordField
|
||||||
@@ -63,9 +63,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex lg:flex-col flex-row justify-start items-center pt-3 lg:pt-0">
|
<div class="flex lg:flex-col flex-row justify-start items-center pt-3 lg:pt-0">
|
||||||
{#if index === 0 || length === 0}
|
{#if index === 0 || length === 0}
|
||||||
<label for="name" class="pb-2 uppercase lg:block hidden">Need during buildtime?</label>
|
<label for="name" class="pb-2 uppercase lg:block hidden font-bold"
|
||||||
|
>Need during buildtime?</label
|
||||||
|
>
|
||||||
{/if}
|
{/if}
|
||||||
<label for="name" class="pb-2 uppercase lg:hidden block">Need during buildtime?</label>
|
<label for="name" class="pb-2 uppercase lg:hidden block font-bold">Need during buildtime?</label
|
||||||
|
>
|
||||||
|
|
||||||
<div class="flex justify-center h-full items-center pt-0 lg:pt-0 pl-4 lg:pl-0">
|
<div class="flex justify-center h-full items-center pt-0 lg:pt-0 pl-4 lg:pl-0">
|
||||||
<button
|
<button
|
||||||
@@ -114,7 +117,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row lg:flex-col lg:items-center items-start">
|
<div class="flex flex-row lg:flex-col lg:items-center items-start">
|
||||||
{#if index === 0 || length === 0}
|
{#if index === 0 || length === 0}
|
||||||
<label for="name" class="pb-2 uppercase lg:block hidden">Actions</label>
|
<label for="name" class="pb-5 uppercase lg:block hidden font-bold" />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="flex justify-center h-full items-center pt-3">
|
<div class="flex justify-center h-full items-center pt-3">
|
||||||
|
|||||||
@@ -79,10 +79,10 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="w-full font-bold grid grid-cols-1 lg:grid-cols-4 gap-2 pb-2">
|
<div class="w-full grid grid-cols-1 lg:grid-cols-4 gap-2 pb-2">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
{#if (index === 0 && !isNewSecret) || length === 0}
|
{#if (index === 0 && !isNewSecret) || length === 0}
|
||||||
<label for="name" class="pb-2 uppercase">name</label>
|
<label for="name" class="pb-2 uppercase font-bold">name</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<input
|
<input
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
{#if (index === 0 && !isNewSecret) || length === 0}
|
{#if (index === 0 && !isNewSecret) || length === 0}
|
||||||
<label for="value" class="pb-2 uppercase">value</label>
|
<label for="value" class="pb-2 uppercase font-bold">value</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<CopyPasswordField
|
<CopyPasswordField
|
||||||
@@ -114,9 +114,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex lg:flex-col flex-row justify-start items-center pt-3 lg:pt-0">
|
<div class="flex lg:flex-col flex-row justify-start items-center pt-3 lg:pt-0">
|
||||||
{#if (index === 0 && !isNewSecret) || length === 0}
|
{#if (index === 0 && !isNewSecret) || length === 0}
|
||||||
<label for="name" class="pb-2 uppercase lg:block hidden">Need during buildtime?</label>
|
<label for="name" class="pb-2 uppercase lg:block hidden font-bold"
|
||||||
|
>Need during buildtime?</label
|
||||||
|
>
|
||||||
{/if}
|
{/if}
|
||||||
<label for="name" class="pb-2 uppercase lg:hidden block">Need during buildtime?</label>
|
<label for="name" class="pb-2 uppercase lg:hidden block font-bold">Need during buildtime?</label
|
||||||
|
>
|
||||||
|
|
||||||
<div class="flex justify-center h-full items-center pt-0 lg:pt-0 pl-4 lg:pl-0">
|
<div class="flex justify-center h-full items-center pt-0 lg:pt-0 pl-4 lg:pl-0">
|
||||||
<button
|
<button
|
||||||
@@ -166,7 +169,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row lg:flex-col lg:items-center items-start">
|
<div class="flex flex-row lg:flex-col lg:items-center items-start">
|
||||||
{#if (index === 0 && !isNewSecret) || length === 0}
|
{#if (index === 0 && !isNewSecret) || length === 0}
|
||||||
<label for="name" class="pb-2 uppercase lg:block hidden">Action</label>
|
<label for="name" class="pb-5 uppercase lg:block hidden font-bold" />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="flex justify-center h-full items-center pt-3">
|
<div class="flex justify-center h-full items-center pt-3">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if linkToDocs}
|
{#if linkToDocs}
|
||||||
<DocLink url={template[service.id].documentation} text={`Documentation`} isExternal={true} />
|
<DocLink url={template[service.id]?.documentation || 'https://docs.coollabs.io'} text={`Documentation`} isExternal={true} />
|
||||||
{:else}
|
{:else}
|
||||||
<ServiceIcons type={service.type} />
|
<ServiceIcons type={service.type} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -276,20 +276,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-2 items-center">
|
<div class="grid grid-cols-2 items-center">
|
||||||
<label for="version">Version / Tag</label>
|
<label for="version">Version / Tag</label>
|
||||||
<div class="custom-select-wrapper w-full">
|
{#if tags.tags?.length > 0}
|
||||||
<Select
|
<div class="custom-select-wrapper w-full">
|
||||||
form="saveForm"
|
<Select
|
||||||
containerClasses={isDisabled && containerClass()}
|
form="saveForm"
|
||||||
{isDisabled}
|
containerClasses={isDisabled && containerClass()}
|
||||||
id="version"
|
{isDisabled}
|
||||||
showIndicator={!isDisabled}
|
id="version"
|
||||||
items={[...tags.tags]}
|
showIndicator={!isDisabled}
|
||||||
on:select={selectTag}
|
items={[...tags.tags]}
|
||||||
value={service.version}
|
on:select={selectTag}
|
||||||
isClearable={false}
|
value={service.version}
|
||||||
/>
|
isClearable={false}
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
|
{:else}
|
||||||
|
<input class="w-full border-red-500" disabled placeholder="Error getting tags...">
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-2 items-center">
|
<div class="grid grid-cols-2 items-center">
|
||||||
<label for="destination">{$t('application.destination')}</label>
|
<label for="destination">{$t('application.destination')}</label>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
import { addToast, appSession, features } from '$lib/store';
|
import { addToast, appSession, features } from '$lib/store';
|
||||||
import { asyncSleep, errorNotification, getDomain } from '$lib/common';
|
import { asyncSleep, errorNotification, getDomain } from '$lib/common';
|
||||||
import Explainer from '$lib/components/Explainer.svelte';
|
import Explainer from '$lib/components/Explainer.svelte';
|
||||||
|
import { dev } from '$app/env';
|
||||||
|
|
||||||
let isAPIDebuggingEnabled = settings.isAPIDebuggingEnabled;
|
let isAPIDebuggingEnabled = settings.isAPIDebuggingEnabled;
|
||||||
let isRegistrationEnabled = settings.isRegistrationEnabled;
|
let isRegistrationEnabled = settings.isRegistrationEnabled;
|
||||||
@@ -45,9 +46,61 @@
|
|||||||
save: false,
|
save: false,
|
||||||
remove: false,
|
remove: false,
|
||||||
proxyMigration: false,
|
proxyMigration: false,
|
||||||
restart: false
|
restart: false,
|
||||||
|
rollback: false
|
||||||
};
|
};
|
||||||
|
let rollbackVersion = localStorage.getItem('lastVersion');
|
||||||
|
|
||||||
|
async function rollback() {
|
||||||
|
if (rollbackVersion) {
|
||||||
|
const sure = confirm(`Are you sure you want rollback Coolify to ${rollbackVersion}?`);
|
||||||
|
if (sure) {
|
||||||
|
try {
|
||||||
|
loading.rollback = true;
|
||||||
|
console.log('loading.rollback', loading.rollback);
|
||||||
|
if (dev) {
|
||||||
|
console.log('rolling back to', rollbackVersion);
|
||||||
|
await asyncSleep(4000);
|
||||||
|
return window.location.reload();
|
||||||
|
} else {
|
||||||
|
addToast({
|
||||||
|
message: 'Rollback started...',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
await post(`/update`, { type: 'update', latestVersion: rollbackVersion });
|
||||||
|
addToast({
|
||||||
|
message: 'Rollback completed.<br><br>Waiting for the new version to start...',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
|
||||||
|
let reachable = false;
|
||||||
|
let tries = 0;
|
||||||
|
do {
|
||||||
|
await asyncSleep(4000);
|
||||||
|
try {
|
||||||
|
await get(`/undead`);
|
||||||
|
reachable = true;
|
||||||
|
} catch (error) {
|
||||||
|
reachable = false;
|
||||||
|
}
|
||||||
|
if (reachable) break;
|
||||||
|
tries++;
|
||||||
|
} while (!reachable || tries < 120);
|
||||||
|
addToast({
|
||||||
|
message: 'New version reachable. Reloading...',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
await asyncSleep(3000);
|
||||||
|
return window.location.reload();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
return errorNotification(error);
|
||||||
|
} finally {
|
||||||
|
loading.rollback = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
async function removeFqdn() {
|
async function removeFqdn() {
|
||||||
if (fqdn) {
|
if (fqdn) {
|
||||||
loading.remove = true;
|
loading.remove = true;
|
||||||
@@ -281,6 +334,17 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="grid grid-cols-2 items-center">
|
||||||
|
<Setting
|
||||||
|
id="dualCerts"
|
||||||
|
dataTooltip={$t('setting.must_remove_domain_before_changing')}
|
||||||
|
disabled={isFqdnSet}
|
||||||
|
bind:setting={dualCerts}
|
||||||
|
title={$t('application.ssl_www_and_non_www')}
|
||||||
|
description={$t('setting.generate_www_non_www_ssl')}
|
||||||
|
on:click={() => !isFqdnSet && changeSettings('dualCerts')}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div class="grid grid-cols-2 items-center">
|
<div class="grid grid-cols-2 items-center">
|
||||||
<div>
|
<div>
|
||||||
Default Redirect URL
|
Default Redirect URL
|
||||||
@@ -300,16 +364,29 @@
|
|||||||
placeholder="{$t('forms.eg')}: https://coolify.io"
|
placeholder="{$t('forms.eg')}: https://coolify.io"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-2 items-center">
|
|
||||||
<Setting
|
<div class="grid grid-cols-4 items-center">
|
||||||
id="dualCerts"
|
<div class="col-span-2">
|
||||||
dataTooltip={$t('setting.must_remove_domain_before_changing')}
|
Rollback to a specific version
|
||||||
disabled={isFqdnSet}
|
<Explainer
|
||||||
bind:setting={dualCerts}
|
position="dropdown-bottom"
|
||||||
title={$t('application.ssl_www_and_non_www')}
|
explanation="You can rollback to a specific version of Coolify. This will not affect your current running resources.<br><br><a href='https://github.com/coollabsio/coolify/releases' target='_blank'>See available versions</a>"
|
||||||
description={$t('setting.generate_www_non_www_ssl')}
|
/>
|
||||||
on:click={() => !isFqdnSet && changeSettings('dualCerts')}
|
</div>
|
||||||
|
<input
|
||||||
|
class="w-full"
|
||||||
|
bind:value={rollbackVersion}
|
||||||
|
readonly={!$appSession.isAdmin}
|
||||||
|
disabled={!$appSession.isAdmin}
|
||||||
|
name="rollbackVersion"
|
||||||
|
id="rollbackVersion"
|
||||||
/>
|
/>
|
||||||
|
<button
|
||||||
|
class:loading={loading.rollback}
|
||||||
|
class="btn btn-primary ml-2"
|
||||||
|
disabled={!rollbackVersion || loading.rollback}
|
||||||
|
on:click|preventDefault|stopPropagation={rollback}>Rollback</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-2 items-center">
|
<div class="grid grid-cols-2 items-center">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
BIN
apps/ui/static/icons/lavalink.png
Normal file
BIN
apps/ui/static/icons/lavalink.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "coolify",
|
"name": "coolify",
|
||||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||||
"version": "3.11.2",
|
"version": "3.11.6",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": "github:coollabsio/coolify",
|
"repository": "github:coollabsio/coolify",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user