mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-18 12:33:06 +00:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0097004882 | ||
|
|
1bc9e4c2d3 | ||
|
|
36c7e1a3c3 | ||
|
|
c6b4d04e26 | ||
|
|
fa6cf068c7 | ||
|
|
7c273a3a48 | ||
|
|
3de2ea1523 | ||
|
|
c5c9f84503 | ||
|
|
16ea9a3e07 | ||
|
|
48f952c798 | ||
|
|
f78ea5de07 | ||
|
|
5adbd5e784 | ||
|
|
5b2afa79d7 | ||
|
|
dc4e6d02b7 | ||
|
|
8ae61c8f78 | ||
|
|
684b8e0914 | ||
|
|
7c3314abae | ||
|
|
ab9f8ff356 | ||
|
|
892d8cd5c1 | ||
|
|
8b8b45778d | ||
|
|
6655fb182c | ||
|
|
0926d40247 | ||
|
|
ddc4d36688 | ||
|
|
53e1f22eb1 | ||
|
|
3d2a34737b | ||
|
|
ebde77008c | ||
|
|
3d27fd04ba | ||
|
|
d9fcaf3473 | ||
|
|
d266f761aa | ||
|
|
1d01405412 | ||
|
|
7c62eb5bd6 | ||
|
|
4dcc76d366 | ||
|
|
d2fad19a11 | ||
|
|
7c92c4c964 | ||
|
|
5a71d33236 | ||
|
|
1b4db4f793 | ||
|
|
c084b22815 | ||
|
|
acacef95cd | ||
|
|
5d722183d3 |
26
package.json
26
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "coolify",
|
||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||
"version": "2.0.24",
|
||||
"version": "2.0.29",
|
||||
"license": "AGPL-3.0",
|
||||
"scripts": {
|
||||
"dev": "docker-compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev --host 0.0.0.0",
|
||||
@@ -25,12 +25,12 @@
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-node": "1.0.0-next.69",
|
||||
"@sveltejs/adapter-node": "1.0.0-next.70",
|
||||
"@sveltejs/adapter-static": "1.0.0-next.28",
|
||||
"@sveltejs/kit": "1.0.0-next.283",
|
||||
"@sveltejs/kit": "1.0.0-next.288",
|
||||
"@types/bcrypt": "5.0.0",
|
||||
"@types/js-cookie": "3.0.1",
|
||||
"@types/node": "17.0.20",
|
||||
"@types/node": "17.0.21",
|
||||
"@types/node-forge": "1.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.31.1",
|
||||
"@typescript-eslint/parser": "4.31.1",
|
||||
@@ -39,37 +39,37 @@
|
||||
"cross-var": "1.1.0",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-prettier": "8.4.0",
|
||||
"eslint-plugin-svelte3": "3.4.0",
|
||||
"eslint-plugin-svelte3": "3.4.1",
|
||||
"husky": "7.0.4",
|
||||
"lint-staged": "12.3.4",
|
||||
"postcss": "8.4.6",
|
||||
"postcss": "8.4.7",
|
||||
"prettier": "2.5.1",
|
||||
"prettier-plugin-svelte": "2.6.0",
|
||||
"prettier-plugin-tailwindcss": "0.1.7",
|
||||
"prettier-plugin-tailwindcss": "0.1.8",
|
||||
"prisma": "3.10.0",
|
||||
"svelte": "3.46.4",
|
||||
"svelte-check": "2.4.5",
|
||||
"svelte-preprocess": "4.10.4",
|
||||
"tailwindcss": "3.0.23",
|
||||
"ts-node": "10.5.0",
|
||||
"ts-node": "10.6.0",
|
||||
"tslib": "2.3.1",
|
||||
"typescript": "4.5.5"
|
||||
"typescript": "4.6.2"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@iarna/toml": "2.2.5",
|
||||
"@prisma/client": "3.10.0",
|
||||
"@sentry/node": "6.17.9",
|
||||
"@sentry/node": "6.18.1",
|
||||
"bcrypt": "5.0.1",
|
||||
"bullmq": "1.74.2",
|
||||
"bullmq": "1.76.0",
|
||||
"compare-versions": "4.1.3",
|
||||
"cookie": "0.4.2",
|
||||
"cuid": "2.1.8",
|
||||
"dayjs": "1.10.7",
|
||||
"dayjs": "1.10.8",
|
||||
"dockerode": "3.3.1",
|
||||
"dotenv-extended": "2.9.0",
|
||||
"generate-password": "1.7.0",
|
||||
"get-port": "6.1.1",
|
||||
"get-port": "6.1.2",
|
||||
"got": "12.0.1",
|
||||
"js-cookie": "3.0.1",
|
||||
"js-yaml": "4.1.0",
|
||||
|
||||
264
pnpm-lock.yaml
generated
264
pnpm-lock.yaml
generated
@@ -3,32 +3,32 @@ lockfileVersion: 5.3
|
||||
specifiers:
|
||||
'@iarna/toml': 2.2.5
|
||||
'@prisma/client': 3.10.0
|
||||
'@sentry/node': 6.17.9
|
||||
'@sveltejs/adapter-node': 1.0.0-next.69
|
||||
'@sentry/node': 6.18.1
|
||||
'@sveltejs/adapter-node': 1.0.0-next.70
|
||||
'@sveltejs/adapter-static': 1.0.0-next.28
|
||||
'@sveltejs/kit': 1.0.0-next.283
|
||||
'@sveltejs/kit': 1.0.0-next.288
|
||||
'@types/bcrypt': 5.0.0
|
||||
'@types/js-cookie': 3.0.1
|
||||
'@types/node': 17.0.20
|
||||
'@types/node': 17.0.21
|
||||
'@types/node-forge': 1.0.0
|
||||
'@typescript-eslint/eslint-plugin': 4.31.1
|
||||
'@typescript-eslint/parser': 4.31.1
|
||||
'@zerodevx/svelte-toast': 0.7.0
|
||||
autoprefixer: 10.4.2
|
||||
bcrypt: 5.0.1
|
||||
bullmq: 1.74.2
|
||||
bullmq: 1.76.0
|
||||
compare-versions: 4.1.3
|
||||
cookie: 0.4.2
|
||||
cross-var: 1.1.0
|
||||
cuid: 2.1.8
|
||||
dayjs: 1.10.7
|
||||
dayjs: 1.10.8
|
||||
dockerode: 3.3.1
|
||||
dotenv-extended: 2.9.0
|
||||
eslint: 7.32.0
|
||||
eslint-config-prettier: 8.4.0
|
||||
eslint-plugin-svelte3: 3.4.0
|
||||
eslint-plugin-svelte3: 3.4.1
|
||||
generate-password: 1.7.0
|
||||
get-port: 6.1.1
|
||||
get-port: 6.1.2
|
||||
got: 12.0.1
|
||||
husky: 7.0.4
|
||||
js-cookie: 3.0.1
|
||||
@@ -37,10 +37,10 @@ specifiers:
|
||||
lint-staged: 12.3.4
|
||||
mustache: ^4.2.0
|
||||
node-forge: 1.2.1
|
||||
postcss: 8.4.6
|
||||
postcss: 8.4.7
|
||||
prettier: 2.5.1
|
||||
prettier-plugin-svelte: 2.6.0
|
||||
prettier-plugin-tailwindcss: 0.1.7
|
||||
prettier-plugin-tailwindcss: 0.1.8
|
||||
prisma: 3.10.0
|
||||
svelte: 3.46.4
|
||||
svelte-check: 2.4.5
|
||||
@@ -48,25 +48,25 @@ specifiers:
|
||||
svelte-preprocess: 4.10.4
|
||||
tailwindcss: 3.0.23
|
||||
tailwindcss-scrollbar: ^0.1.0
|
||||
ts-node: 10.5.0
|
||||
ts-node: 10.6.0
|
||||
tslib: 2.3.1
|
||||
typescript: 4.5.5
|
||||
typescript: 4.6.2
|
||||
unique-names-generator: 4.7.1
|
||||
|
||||
dependencies:
|
||||
'@iarna/toml': 2.2.5
|
||||
'@prisma/client': 3.10.0_prisma@3.10.0
|
||||
'@sentry/node': 6.17.9
|
||||
'@sentry/node': 6.18.1
|
||||
bcrypt: 5.0.1
|
||||
bullmq: 1.74.2
|
||||
bullmq: 1.76.0
|
||||
compare-versions: 4.1.3
|
||||
cookie: 0.4.2
|
||||
cuid: 2.1.8
|
||||
dayjs: 1.10.7
|
||||
dayjs: 1.10.8
|
||||
dockerode: 3.3.1
|
||||
dotenv-extended: 2.9.0
|
||||
generate-password: 1.7.0
|
||||
get-port: 6.1.1
|
||||
get-port: 6.1.2
|
||||
got: 12.0.1
|
||||
js-cookie: 3.0.1
|
||||
js-yaml: 4.1.0
|
||||
@@ -78,35 +78,35 @@ dependencies:
|
||||
unique-names-generator: 4.7.1
|
||||
|
||||
devDependencies:
|
||||
'@sveltejs/adapter-node': 1.0.0-next.69
|
||||
'@sveltejs/adapter-node': 1.0.0-next.70
|
||||
'@sveltejs/adapter-static': 1.0.0-next.28
|
||||
'@sveltejs/kit': 1.0.0-next.283_svelte@3.46.4
|
||||
'@sveltejs/kit': 1.0.0-next.288_svelte@3.46.4
|
||||
'@types/bcrypt': 5.0.0
|
||||
'@types/js-cookie': 3.0.1
|
||||
'@types/node': 17.0.20
|
||||
'@types/node': 17.0.21
|
||||
'@types/node-forge': 1.0.0
|
||||
'@typescript-eslint/eslint-plugin': 4.31.1_5d7752337e5ea49772097d8af1823bf9
|
||||
'@typescript-eslint/parser': 4.31.1_eslint@7.32.0+typescript@4.5.5
|
||||
'@typescript-eslint/eslint-plugin': 4.31.1_386b67ad67ef29c6a0ccaf3e9b60f945
|
||||
'@typescript-eslint/parser': 4.31.1_eslint@7.32.0+typescript@4.6.2
|
||||
'@zerodevx/svelte-toast': 0.7.0
|
||||
autoprefixer: 10.4.2_postcss@8.4.6
|
||||
autoprefixer: 10.4.2_postcss@8.4.7
|
||||
cross-var: 1.1.0
|
||||
eslint: 7.32.0
|
||||
eslint-config-prettier: 8.4.0_eslint@7.32.0
|
||||
eslint-plugin-svelte3: 3.4.0_eslint@7.32.0+svelte@3.46.4
|
||||
eslint-plugin-svelte3: 3.4.1_eslint@7.32.0+svelte@3.46.4
|
||||
husky: 7.0.4
|
||||
lint-staged: 12.3.4
|
||||
postcss: 8.4.6
|
||||
postcss: 8.4.7
|
||||
prettier: 2.5.1
|
||||
prettier-plugin-svelte: 2.6.0_prettier@2.5.1+svelte@3.46.4
|
||||
prettier-plugin-tailwindcss: 0.1.7_prettier@2.5.1
|
||||
prettier-plugin-tailwindcss: 0.1.8_prettier@2.5.1
|
||||
prisma: 3.10.0
|
||||
svelte: 3.46.4
|
||||
svelte-check: 2.4.5_postcss@8.4.6+svelte@3.46.4
|
||||
svelte-preprocess: 4.10.4_88b359da5cac6d8f6ee1bbb7080a3fa9
|
||||
tailwindcss: 3.0.23_c940fbabf228b85b1c73d314b43e31f1
|
||||
ts-node: 10.5.0_e04e69b201f218c8d0d59acefc9ea8a6
|
||||
svelte-check: 2.4.5_postcss@8.4.7+svelte@3.46.4
|
||||
svelte-preprocess: 4.10.4_e836cbb8ceb5bfaa7513362dd6308834
|
||||
tailwindcss: 3.0.23_4b9e11f8e85900587b5e2272c5d4c20c
|
||||
ts-node: 10.6.0_e79e62fe450383fd2d418267dc75e645
|
||||
tslib: 2.3.1
|
||||
typescript: 4.5.5
|
||||
typescript: 4.6.2
|
||||
|
||||
packages:
|
||||
/@babel/code-frame/7.12.11:
|
||||
@@ -297,56 +297,56 @@ packages:
|
||||
picomatch: 2.3.0
|
||||
dev: true
|
||||
|
||||
/@sentry/core/6.17.9:
|
||||
/@sentry/core/6.18.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-14KalmTholGUtgdh9TklO+jUpyQ/D3OGkhlH1rnGQGoJgFy2eYm+s+MnUEMxFdGIUCz5kOteuNqYZxaDmFagpQ==
|
||||
integrity: sha512-9V8Q+3Asi+3RL67CSIMMZ9mjMsu2/hrpQszYStX7hPPpAZIlAKk2MT5B+na/r80iWKhy+3Ts6aDFF218QtnsVw==
|
||||
}
|
||||
engines: { node: '>=6' }
|
||||
dependencies:
|
||||
'@sentry/hub': 6.17.9
|
||||
'@sentry/minimal': 6.17.9
|
||||
'@sentry/types': 6.17.9
|
||||
'@sentry/utils': 6.17.9
|
||||
'@sentry/hub': 6.18.1
|
||||
'@sentry/minimal': 6.18.1
|
||||
'@sentry/types': 6.18.1
|
||||
'@sentry/utils': 6.18.1
|
||||
tslib: 1.14.1
|
||||
dev: false
|
||||
|
||||
/@sentry/hub/6.17.9:
|
||||
/@sentry/hub/6.18.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-34EdrweWDbBV9EzEFIXcO+JeoyQmKzQVJxpTKZoJA6PUwf2NrndaUdjlkDEtBEzjuLUTxhLxtOzEsYs1O6RVcg==
|
||||
integrity: sha512-+zGzgc/xX3an/nKA3ELMn9YD9VmqbNaNwWZ5/SjNUvzsYHh2UNZ7YzT8WawQsRVOXLljyCKxkWpFB4EchiYGbw==
|
||||
}
|
||||
engines: { node: '>=6' }
|
||||
dependencies:
|
||||
'@sentry/types': 6.17.9
|
||||
'@sentry/utils': 6.17.9
|
||||
'@sentry/types': 6.18.1
|
||||
'@sentry/utils': 6.18.1
|
||||
tslib: 1.14.1
|
||||
dev: false
|
||||
|
||||
/@sentry/minimal/6.17.9:
|
||||
/@sentry/minimal/6.18.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-T3PMCHcKk6lkZq6zKgANrYJJxXBXKOe+ousV1Fas1rVBMv7dtKfsa4itqQHszcW9shusPDiaQKIJ4zRLE5LKmg==
|
||||
integrity: sha512-dm+0MuasWNi/LASvHX+09oCo8IBZY5WpMK8qXvQMnwQ9FVfklrjcfEI3666WORDCmeUhDCSeL2MbjPDm+AmPLg==
|
||||
}
|
||||
engines: { node: '>=6' }
|
||||
dependencies:
|
||||
'@sentry/hub': 6.17.9
|
||||
'@sentry/types': 6.17.9
|
||||
'@sentry/hub': 6.18.1
|
||||
'@sentry/types': 6.18.1
|
||||
tslib: 1.14.1
|
||||
dev: false
|
||||
|
||||
/@sentry/node/6.17.9:
|
||||
/@sentry/node/6.18.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-jbn+q7qPGOh6D7nYoYGaAlmuvMDpQmyMwBtUVYybuZp2AALe43O3Z4LtoJ+1+F31XowpsIPZx1mwNs4ZrILskA==
|
||||
integrity: sha512-aTb2gwfZUq0lGDRGH5zNOYDfFMOQZu6E0QcAsvH2ZBcEj3rUWZz3r25COFrHmfzHLUV1KcF2AmnWo1QU1jmm0g==
|
||||
}
|
||||
engines: { node: '>=6' }
|
||||
dependencies:
|
||||
'@sentry/core': 6.17.9
|
||||
'@sentry/hub': 6.17.9
|
||||
'@sentry/tracing': 6.17.9
|
||||
'@sentry/types': 6.17.9
|
||||
'@sentry/utils': 6.17.9
|
||||
'@sentry/core': 6.18.1
|
||||
'@sentry/hub': 6.18.1
|
||||
'@sentry/tracing': 6.18.1
|
||||
'@sentry/types': 6.18.1
|
||||
'@sentry/utils': 6.18.1
|
||||
cookie: 0.4.2
|
||||
https-proxy-agent: 5.0.0
|
||||
lru_map: 0.3.3
|
||||
@@ -355,36 +355,36 @@ packages:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@sentry/tracing/6.17.9:
|
||||
/@sentry/tracing/6.18.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-5Rb/OS4ryNJLvz2nv6wyjwhifjy6veqaF9ffLrwFYij/WDy7m62ASBblxgeiI3fbPLX0aBRFWIJAq1vko26+AQ==
|
||||
integrity: sha512-OxozmSfxGx246Ae1XhO01I7ZWxO3briwMBh55E5KyjQb8fuS9gVE7Uy8ZRs5hhNjDutFAU7nMtC0zipfVxP6fg==
|
||||
}
|
||||
engines: { node: '>=6' }
|
||||
dependencies:
|
||||
'@sentry/hub': 6.17.9
|
||||
'@sentry/minimal': 6.17.9
|
||||
'@sentry/types': 6.17.9
|
||||
'@sentry/utils': 6.17.9
|
||||
'@sentry/hub': 6.18.1
|
||||
'@sentry/minimal': 6.18.1
|
||||
'@sentry/types': 6.18.1
|
||||
'@sentry/utils': 6.18.1
|
||||
tslib: 1.14.1
|
||||
dev: false
|
||||
|
||||
/@sentry/types/6.17.9:
|
||||
/@sentry/types/6.18.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-xuulX6qUCL14ayEOh/h6FUIvZtsi1Bx34dSOaWDrjXUOJHJAM7214uiqW1GZxPJ13YuaUIubjTSfDmSQ9CBzTw==
|
||||
integrity: sha512-wp741NoBKnXE/4T9L723sWJ8EcNMxeTIT1smgNJOfbPwrsDICoYmGEt6JFa05XHpWBGI66WuNvnDjoHVeh6zhA==
|
||||
}
|
||||
engines: { node: '>=6' }
|
||||
dev: false
|
||||
|
||||
/@sentry/utils/6.17.9:
|
||||
/@sentry/utils/6.18.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-4eo9Z3JlJCGlGrQRbtZWL+L9NnlUXgTbfK3Lk7oO8D1ev8R5b5+iE6tZHTvU5rQRcq6zu+POT+tK5u9oxc/rnQ==
|
||||
integrity: sha512-IFZmuvA+c5lDGlZEri13JSyUP0BHelzY0S4dcKxAzskPW+BtBdQDgYGV90iED1y+IRMLawWb34GF7HyJSouN1Q==
|
||||
}
|
||||
engines: { node: '>=6' }
|
||||
dependencies:
|
||||
'@sentry/types': 6.17.9
|
||||
'@sentry/types': 6.18.1
|
||||
tslib: 1.14.1
|
||||
dev: false
|
||||
|
||||
@@ -396,10 +396,10 @@ packages:
|
||||
engines: { node: '>=10' }
|
||||
dev: false
|
||||
|
||||
/@sveltejs/adapter-node/1.0.0-next.69:
|
||||
/@sveltejs/adapter-node/1.0.0-next.70:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-tVKwJ8vYG4NGFJ5L+tRuyRglGPaJ1khNqTKq4bYIUahk/pjXIu9USbMmFtNHd6IyDdxjPtRoVwHubAYfTQLTpg==
|
||||
integrity: sha512-9EtqSTxVOipESyPQH8uVdkl+iSqsq3oRKS3RZoE2vAG9I849MuTTxr1g9L4kALbXaklsYRztwhmrLpTdcSM4vA==
|
||||
}
|
||||
dependencies:
|
||||
tiny-glob: 0.2.9
|
||||
@@ -414,10 +414,10 @@ packages:
|
||||
tiny-glob: 0.2.9
|
||||
dev: true
|
||||
|
||||
/@sveltejs/kit/1.0.0-next.283_svelte@3.46.4:
|
||||
/@sveltejs/kit/1.0.0-next.288_svelte@3.46.4:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-QFhL7cdBKXUKhJ3sHZnL7q07Eohc54N7OpX2ZsJuNTA43Z6vX/HF/Jh4TK62kqT+thDVlT5J1iEEMppxA2IxoQ==
|
||||
integrity: sha512-6ky4CUFNGKoU1QV+fY2LOIB7atHdUCIMRx3pX21B2g9yZzQzkot0zHBrMMBSKF0/4Wx19PLEWrlGxlhakYmi8Q==
|
||||
}
|
||||
engines: { node: '>=14.13' }
|
||||
hasBin: true
|
||||
@@ -506,7 +506,7 @@ packages:
|
||||
integrity: sha512-agtcFKaruL8TmcvqbndlqHPSJgsolhf/qPWchFlgnW1gECTN/nKbFcoFnvKAQRFfKbh+BO6A3SWdJu9t+xF3Lw==
|
||||
}
|
||||
dependencies:
|
||||
'@types/node': 17.0.20
|
||||
'@types/node': 17.0.21
|
||||
dev: true
|
||||
|
||||
/@types/cacheable-request/6.0.2:
|
||||
@@ -517,7 +517,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/http-cache-semantics': 4.0.1
|
||||
'@types/keyv': 3.1.3
|
||||
'@types/node': 17.0.20
|
||||
'@types/node': 17.0.21
|
||||
'@types/responselike': 1.0.0
|
||||
dev: false
|
||||
|
||||
@@ -548,7 +548,7 @@ packages:
|
||||
integrity: sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==
|
||||
}
|
||||
dependencies:
|
||||
'@types/node': 17.0.20
|
||||
'@types/node': 17.0.21
|
||||
dev: false
|
||||
|
||||
/@types/node-forge/1.0.0:
|
||||
@@ -557,13 +557,13 @@ packages:
|
||||
integrity: sha512-h0bgwPKq5u99T9Gor4qtV1lCZ41xNkai0pie1n/a2mh2/4+jENWOlo7AJ4YKxTZAnSZ8FRurUpdIN7ohaPPuHA==
|
||||
}
|
||||
dependencies:
|
||||
'@types/node': 17.0.20
|
||||
'@types/node': 17.0.21
|
||||
dev: true
|
||||
|
||||
/@types/node/17.0.20:
|
||||
/@types/node/17.0.21:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-Q15Clj3lZSLnhVA6yKw1G7SQz46DeL9gO1TEgfK1OQGvMdQ6TUWmCeWf1QBUNkw2BDfV52i2YuYd9OF3ZwGhjw==
|
||||
integrity: sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==
|
||||
}
|
||||
|
||||
/@types/parse-json/4.0.0:
|
||||
@@ -586,7 +586,7 @@ packages:
|
||||
integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==
|
||||
}
|
||||
dependencies:
|
||||
'@types/node': 17.0.20
|
||||
'@types/node': 17.0.21
|
||||
dev: false
|
||||
|
||||
/@types/sass/1.16.1:
|
||||
@@ -595,10 +595,10 @@ packages:
|
||||
integrity: sha512-iZUcRrGuz/Tbg3loODpW7vrQJkUtpY2fFSf4ELqqkApcS2TkZ1msk7ie8iZPB86lDOP8QOTTmuvWjc5S0R9OjQ==
|
||||
}
|
||||
dependencies:
|
||||
'@types/node': 17.0.20
|
||||
'@types/node': 17.0.21
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/eslint-plugin/4.31.1_5d7752337e5ea49772097d8af1823bf9:
|
||||
/@typescript-eslint/eslint-plugin/4.31.1_386b67ad67ef29c6a0ccaf3e9b60f945:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-UDqhWmd5i0TvPLmbK5xY3UZB0zEGseF+DHPghZ37Sb83Qd3p8ujhvAtkU4OF46Ka5Pm5kWvFIx0cCTBFKo0alA==
|
||||
@@ -612,21 +612,21 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/experimental-utils': 4.31.1_eslint@7.32.0+typescript@4.5.5
|
||||
'@typescript-eslint/parser': 4.31.1_eslint@7.32.0+typescript@4.5.5
|
||||
'@typescript-eslint/experimental-utils': 4.31.1_eslint@7.32.0+typescript@4.6.2
|
||||
'@typescript-eslint/parser': 4.31.1_eslint@7.32.0+typescript@4.6.2
|
||||
'@typescript-eslint/scope-manager': 4.31.1
|
||||
debug: 4.3.3
|
||||
eslint: 7.32.0
|
||||
functional-red-black-tree: 1.0.1
|
||||
regexpp: 3.2.0
|
||||
semver: 7.3.5
|
||||
tsutils: 3.21.0_typescript@4.5.5
|
||||
typescript: 4.5.5
|
||||
tsutils: 3.21.0_typescript@4.6.2
|
||||
typescript: 4.6.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/experimental-utils/4.31.1_eslint@7.32.0+typescript@4.5.5:
|
||||
/@typescript-eslint/experimental-utils/4.31.1_eslint@7.32.0+typescript@4.6.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-NtoPsqmcSsWty0mcL5nTZXMf7Ei0Xr2MT8jWjXMVgRK0/1qeQ2jZzLFUh4QtyJ4+/lPUyMw5cSfeeME+Zrtp9Q==
|
||||
@@ -638,7 +638,7 @@ packages:
|
||||
'@types/json-schema': 7.0.9
|
||||
'@typescript-eslint/scope-manager': 4.31.1
|
||||
'@typescript-eslint/types': 4.31.1
|
||||
'@typescript-eslint/typescript-estree': 4.31.1_typescript@4.5.5
|
||||
'@typescript-eslint/typescript-estree': 4.31.1_typescript@4.6.2
|
||||
eslint: 7.32.0
|
||||
eslint-scope: 5.1.1
|
||||
eslint-utils: 3.0.0_eslint@7.32.0
|
||||
@@ -647,7 +647,7 @@ packages:
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/parser/4.31.1_eslint@7.32.0+typescript@4.5.5:
|
||||
/@typescript-eslint/parser/4.31.1_eslint@7.32.0+typescript@4.6.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-dnVZDB6FhpIby6yVbHkwTKkn2ypjVIfAR9nh+kYsA/ZL0JlTsd22BiDjouotisY3Irmd3OW1qlk9EI5R8GrvRQ==
|
||||
@@ -662,10 +662,10 @@ packages:
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 4.31.1
|
||||
'@typescript-eslint/types': 4.31.1
|
||||
'@typescript-eslint/typescript-estree': 4.31.1_typescript@4.5.5
|
||||
'@typescript-eslint/typescript-estree': 4.31.1_typescript@4.6.2
|
||||
debug: 4.3.3
|
||||
eslint: 7.32.0
|
||||
typescript: 4.5.5
|
||||
typescript: 4.6.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@@ -689,7 +689,7 @@ packages:
|
||||
engines: { node: ^8.10.0 || ^10.13.0 || >=11.10.1 }
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/typescript-estree/4.31.1_typescript@4.5.5:
|
||||
/@typescript-eslint/typescript-estree/4.31.1_typescript@4.6.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-EGHkbsUvjFrvRnusk6yFGqrqMBTue5E5ROnS5puj3laGQPasVUgwhrxfcgkdHNFECHAewpvELE1Gjv0XO3mdWg==
|
||||
@@ -707,8 +707,8 @@ packages:
|
||||
globby: 11.0.4
|
||||
is-glob: 4.0.3
|
||||
semver: 7.3.5
|
||||
tsutils: 3.21.0_typescript@4.5.5
|
||||
typescript: 4.5.5
|
||||
tsutils: 3.21.0_typescript@4.6.2
|
||||
typescript: 4.6.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@@ -1010,7 +1010,7 @@ packages:
|
||||
typpy: 2.3.11
|
||||
dev: false
|
||||
|
||||
/autoprefixer/10.4.2_postcss@8.4.6:
|
||||
/autoprefixer/10.4.2_postcss@8.4.7:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-9fOPpHKuDW1w/0EKfRmVnxTDt8166MAnLI3mgZ1JCnhNtYWxcJ6Ud5CO/AVOZi/AvFa8DY9RTy3h3+tFBlrrdQ==
|
||||
@@ -1025,7 +1025,7 @@ packages:
|
||||
fraction.js: 4.1.2
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.0.0
|
||||
postcss: 8.4.6
|
||||
postcss: 8.4.7
|
||||
postcss-value-parser: 4.2.0
|
||||
dev: true
|
||||
|
||||
@@ -1750,10 +1750,10 @@ packages:
|
||||
ieee754: 1.2.1
|
||||
dev: false
|
||||
|
||||
/bullmq/1.74.2:
|
||||
/bullmq/1.76.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-qf0xjF3NDbZqi6ovxAA9QPrPdEgl3BrdYzQO5Pr+ECNIfscLpSXz87kVXI0oTPeDqxw5EJx4sh8EFf2RvVPYTg==
|
||||
integrity: sha512-e9No/JiE7B+wnLsoZnVBLTKTfc1An3bnuIaWewhjDImYNFq5aU/YmzoCdJRgUXrRWGc3EnATFSOLHiEY6Z2FpA==
|
||||
}
|
||||
dependencies:
|
||||
cron-parser: 2.18.0
|
||||
@@ -2138,10 +2138,10 @@ packages:
|
||||
}
|
||||
dev: false
|
||||
|
||||
/dayjs/1.10.7:
|
||||
/dayjs/1.10.8:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig==
|
||||
integrity: sha512-wbNwDfBHHur9UOzNUjeKUOJ0fCb0a52Wx0xInmQ7Y8FstyajiV1NmK1e00cxsr9YrE9r7yAChE0VvpuY5Rnlow==
|
||||
}
|
||||
dev: false
|
||||
|
||||
@@ -2720,10 +2720,10 @@ packages:
|
||||
eslint: 7.32.0
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-svelte3/3.4.0_eslint@7.32.0+svelte@3.46.4:
|
||||
/eslint-plugin-svelte3/3.4.1_eslint@7.32.0+svelte@3.46.4:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-MIQUTuRv3o7LyQ+360qOc9mLT35j1I5YzHr04g/UDcvJTpg0X/kHWELY99ve869Rp/9wjqD7I26Aq5H8OH5RIg==
|
||||
integrity: sha512-7p59WG8qV8L6wLdl4d/c3mdjkgVglQCdv5XOTk/iNPBKXuuV+Q0eFP5Wa6iJd/G2M1qR3BkLPEzaANOqKAZczw==
|
||||
}
|
||||
engines: { node: '>=10' }
|
||||
peerDependencies:
|
||||
@@ -3118,10 +3118,10 @@ packages:
|
||||
engines: { node: '>=8' }
|
||||
dev: false
|
||||
|
||||
/get-port/6.1.1:
|
||||
/get-port/6.1.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-RQOsDPSd2PcoLwakY1dwEtLiAbTR7IfmnxsKswfcHEfRKKbhWAG2R5Qo7C8ga6Ne4Mq4lFbogXfDGNfqFxwAaw==
|
||||
integrity: sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw==
|
||||
}
|
||||
engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 }
|
||||
dev: false
|
||||
@@ -4109,10 +4109,10 @@ packages:
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/nanoid/3.2.0:
|
||||
/nanoid/3.3.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==
|
||||
integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==
|
||||
}
|
||||
engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 }
|
||||
hasBin: true
|
||||
@@ -4382,7 +4382,7 @@ packages:
|
||||
engines: { node: '>=8.6' }
|
||||
dev: true
|
||||
|
||||
/postcss-js/4.0.0_postcss@8.4.6:
|
||||
/postcss-js/4.0.0_postcss@8.4.7:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==
|
||||
@@ -4392,10 +4392,10 @@ packages:
|
||||
postcss: ^8.3.3
|
||||
dependencies:
|
||||
camelcase-css: 2.0.1
|
||||
postcss: 8.4.6
|
||||
postcss: 8.4.7
|
||||
dev: true
|
||||
|
||||
/postcss-load-config/3.1.0_ts-node@10.5.0:
|
||||
/postcss-load-config/3.1.0_ts-node@10.6.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==
|
||||
@@ -4409,11 +4409,11 @@ packages:
|
||||
dependencies:
|
||||
import-cwd: 3.0.0
|
||||
lilconfig: 2.0.4
|
||||
ts-node: 10.5.0_e04e69b201f218c8d0d59acefc9ea8a6
|
||||
ts-node: 10.6.0_e79e62fe450383fd2d418267dc75e645
|
||||
yaml: 1.10.2
|
||||
dev: true
|
||||
|
||||
/postcss-nested/5.0.6_postcss@8.4.6:
|
||||
/postcss-nested/5.0.6_postcss@8.4.7:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==
|
||||
@@ -4422,7 +4422,7 @@ packages:
|
||||
peerDependencies:
|
||||
postcss: ^8.2.14
|
||||
dependencies:
|
||||
postcss: 8.4.6
|
||||
postcss: 8.4.7
|
||||
postcss-selector-parser: 6.0.9
|
||||
dev: true
|
||||
|
||||
@@ -4444,14 +4444,14 @@ packages:
|
||||
}
|
||||
dev: true
|
||||
|
||||
/postcss/8.4.6:
|
||||
/postcss/8.4.7:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA==
|
||||
integrity: sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A==
|
||||
}
|
||||
engines: { node: ^10 || ^12 || >=14 }
|
||||
dependencies:
|
||||
nanoid: 3.2.0
|
||||
nanoid: 3.3.1
|
||||
picocolors: 1.0.0
|
||||
source-map-js: 1.0.2
|
||||
dev: true
|
||||
@@ -4477,10 +4477,10 @@ packages:
|
||||
svelte: 3.46.4
|
||||
dev: true
|
||||
|
||||
/prettier-plugin-tailwindcss/0.1.7_prettier@2.5.1:
|
||||
/prettier-plugin-tailwindcss/0.1.8_prettier@2.5.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-tmBr45hCLuit2Cz9Pwow0/Jl1bGivYGsfcF29O+3sKcE++ybjz9dfie565S3ZsvAeV8uYer9SRMBWDsHPly2Lg==
|
||||
integrity: sha512-hwarSBCswAXa+kqYtaAkFr3Vop9o04WOyZs0qo3NyvW8L7f1rif61wRyq0+ArmVThOuRBcJF5hjGXYk86cwemg==
|
||||
}
|
||||
engines: { node: '>=12.17.0' }
|
||||
peerDependencies:
|
||||
@@ -5172,7 +5172,7 @@ packages:
|
||||
engines: { node: '>= 0.4' }
|
||||
dev: true
|
||||
|
||||
/svelte-check/2.4.5_postcss@8.4.6+svelte@3.46.4:
|
||||
/svelte-check/2.4.5_postcss@8.4.7+svelte@3.46.4:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-nRft8BbG2wcxyCdHDZ7X43xLcvDzua3xLwq6wzHGcAF3ka3Jyhv2rvgq0+SF9NwHLMefp9C2XkM6etzsxK/cMQ==
|
||||
@@ -5189,8 +5189,8 @@ packages:
|
||||
sade: 1.7.4
|
||||
source-map: 0.7.3
|
||||
svelte: 3.46.4
|
||||
svelte-preprocess: 4.10.4_88b359da5cac6d8f6ee1bbb7080a3fa9
|
||||
typescript: 4.5.5
|
||||
svelte-preprocess: 4.10.4_e836cbb8ceb5bfaa7513362dd6308834
|
||||
typescript: 4.6.2
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- coffeescript
|
||||
@@ -5222,7 +5222,7 @@ packages:
|
||||
}
|
||||
dev: false
|
||||
|
||||
/svelte-preprocess/4.10.4_88b359da5cac6d8f6ee1bbb7080a3fa9:
|
||||
/svelte-preprocess/4.10.4_e836cbb8ceb5bfaa7513362dd6308834:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-fuwol0N4UoHsNQolLFbMqWivqcJ9N0vfWO9IuPAiX/5okfoGXURyJ6nECbuEIv0nU3M8Xe2I1ONNje2buk7l6A==
|
||||
@@ -5270,11 +5270,11 @@ packages:
|
||||
'@types/sass': 1.16.1
|
||||
detect-indent: 6.1.0
|
||||
magic-string: 0.25.7
|
||||
postcss: 8.4.6
|
||||
postcss: 8.4.7
|
||||
sorcery: 0.10.0
|
||||
strip-indent: 3.0.0
|
||||
svelte: 3.46.4
|
||||
typescript: 4.5.5
|
||||
typescript: 4.6.2
|
||||
dev: true
|
||||
|
||||
/svelte/3.46.4:
|
||||
@@ -5308,10 +5308,10 @@ packages:
|
||||
peerDependencies:
|
||||
tailwindcss: '>= 2.x.x'
|
||||
dependencies:
|
||||
tailwindcss: 3.0.23_c940fbabf228b85b1c73d314b43e31f1
|
||||
tailwindcss: 3.0.23_4b9e11f8e85900587b5e2272c5d4c20c
|
||||
dev: false
|
||||
|
||||
/tailwindcss/3.0.23_c940fbabf228b85b1c73d314b43e31f1:
|
||||
/tailwindcss/3.0.23_4b9e11f8e85900587b5e2272c5d4c20c:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-+OZOV9ubyQ6oI2BXEhzw4HrqvgcARY38xv3zKcjnWtMIZstEsXdI9xftd1iB7+RbOnj2HOEzkA0OyB5BaSxPQA==
|
||||
@@ -5322,7 +5322,7 @@ packages:
|
||||
autoprefixer: ^10.0.2
|
||||
dependencies:
|
||||
arg: 5.0.1
|
||||
autoprefixer: 10.4.2_postcss@8.4.6
|
||||
autoprefixer: 10.4.2_postcss@8.4.7
|
||||
chalk: 4.1.2
|
||||
chokidar: 3.5.3
|
||||
color-name: 1.1.4
|
||||
@@ -5335,10 +5335,10 @@ packages:
|
||||
is-glob: 4.0.3
|
||||
normalize-path: 3.0.0
|
||||
object-hash: 2.2.0
|
||||
postcss: 8.4.6
|
||||
postcss-js: 4.0.0_postcss@8.4.6
|
||||
postcss-load-config: 3.1.0_ts-node@10.5.0
|
||||
postcss-nested: 5.0.6_postcss@8.4.6
|
||||
postcss: 8.4.7
|
||||
postcss-js: 4.0.0_postcss@8.4.7
|
||||
postcss-load-config: 3.1.0_ts-node@10.6.0
|
||||
postcss-nested: 5.0.6_postcss@8.4.7
|
||||
postcss-selector-parser: 6.0.9
|
||||
postcss-value-parser: 4.2.0
|
||||
quick-lru: 5.1.1
|
||||
@@ -5430,10 +5430,10 @@ packages:
|
||||
engines: { node: '>=0.10.0' }
|
||||
dev: true
|
||||
|
||||
/ts-node/10.5.0_e04e69b201f218c8d0d59acefc9ea8a6:
|
||||
/ts-node/10.6.0_e79e62fe450383fd2d418267dc75e645:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-6kEJKwVxAJ35W4akuiysfKwKmjkbYxwQMTBaAxo9KKAx/Yd26mPUyhGz3ji+EsJoAgrLqVsYHNuuYwQe22lbtw==
|
||||
integrity: sha512-CJen6+dfOXolxudBQXnVjRVvYTmTWbyz7cn+xq2XTsvnaXbHqr4gXSCNbS2Jj8yTZMuGwUoBESLaOkLascVVvg==
|
||||
}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -5452,14 +5452,14 @@ packages:
|
||||
'@tsconfig/node12': 1.0.9
|
||||
'@tsconfig/node14': 1.0.1
|
||||
'@tsconfig/node16': 1.0.2
|
||||
'@types/node': 17.0.20
|
||||
'@types/node': 17.0.21
|
||||
acorn: 8.5.0
|
||||
acorn-walk: 8.2.0
|
||||
arg: 4.1.3
|
||||
create-require: 1.1.1
|
||||
diff: 4.0.2
|
||||
make-error: 1.3.6
|
||||
typescript: 4.5.5
|
||||
typescript: 4.6.2
|
||||
v8-compile-cache-lib: 3.0.0
|
||||
yn: 3.1.1
|
||||
dev: true
|
||||
@@ -5477,7 +5477,7 @@ packages:
|
||||
}
|
||||
dev: true
|
||||
|
||||
/tsutils/3.21.0_typescript@4.5.5:
|
||||
/tsutils/3.21.0_typescript@4.6.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
|
||||
@@ -5487,7 +5487,7 @@ packages:
|
||||
typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
|
||||
dependencies:
|
||||
tslib: 1.14.1
|
||||
typescript: 4.5.5
|
||||
typescript: 4.6.2
|
||||
dev: true
|
||||
|
||||
/tweetnacl/0.14.5:
|
||||
@@ -5520,10 +5520,10 @@ packages:
|
||||
engines: { node: '>=10' }
|
||||
dev: true
|
||||
|
||||
/typescript/4.5.5:
|
||||
/typescript/4.6.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==
|
||||
integrity: sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==
|
||||
}
|
||||
engines: { node: '>=4.2.0' }
|
||||
hasBin: true
|
||||
@@ -5600,7 +5600,7 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
esbuild: 0.14.21
|
||||
postcss: 8.4.6
|
||||
postcss: 8.4.7
|
||||
resolve: 1.22.0
|
||||
rollup: 2.61.1
|
||||
optionalDependencies:
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "ServiceSecret" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"name" TEXT NOT NULL,
|
||||
"value" TEXT NOT NULL,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL,
|
||||
"serviceId" TEXT NOT NULL,
|
||||
CONSTRAINT "ServiceSecret_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "ServiceSecret_name_serviceId_key" ON "ServiceSecret"("name", "serviceId");
|
||||
19
prisma/migrations/20220311213422_autodeploy/migration.sql
Normal file
19
prisma/migrations/20220311213422_autodeploy/migration.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- RedefineTables
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_ApplicationSettings" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"applicationId" TEXT NOT NULL,
|
||||
"dualCerts" BOOLEAN NOT NULL DEFAULT false,
|
||||
"debug" BOOLEAN NOT NULL DEFAULT false,
|
||||
"previews" BOOLEAN NOT NULL DEFAULT false,
|
||||
"autodeploy" BOOLEAN NOT NULL DEFAULT true,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL,
|
||||
CONSTRAINT "ApplicationSettings_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "Application" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_ApplicationSettings" ("applicationId", "createdAt", "debug", "dualCerts", "id", "previews", "updatedAt") SELECT "applicationId", "createdAt", "debug", "dualCerts", "id", "previews", "updatedAt" FROM "ApplicationSettings";
|
||||
DROP TABLE "ApplicationSettings";
|
||||
ALTER TABLE "new_ApplicationSettings" RENAME TO "ApplicationSettings";
|
||||
CREATE UNIQUE INDEX "ApplicationSettings_applicationId_key" ON "ApplicationSettings"("applicationId");
|
||||
PRAGMA foreign_key_check;
|
||||
PRAGMA foreign_keys=ON;
|
||||
@@ -104,6 +104,7 @@ model ApplicationSettings {
|
||||
dualCerts Boolean @default(false)
|
||||
debug Boolean @default(false)
|
||||
previews Boolean @default(false)
|
||||
autodeploy Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
@@ -122,6 +123,18 @@ model Secret {
|
||||
@@unique([name, applicationId, isPRMRSecret])
|
||||
}
|
||||
|
||||
model ServiceSecret {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
value String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
service Service @relation(fields: [serviceId], references: [id])
|
||||
serviceId String
|
||||
|
||||
@@unique([name, serviceId])
|
||||
}
|
||||
|
||||
model BuildLog {
|
||||
id String @id @default(cuid())
|
||||
applicationId String?
|
||||
@@ -252,6 +265,7 @@ model Service {
|
||||
minio Minio?
|
||||
vscodeserver Vscodeserver?
|
||||
wordpress Wordpress?
|
||||
serviceSecret ServiceSecret[]
|
||||
}
|
||||
|
||||
model PlausibleAnalytics {
|
||||
|
||||
@@ -4,13 +4,19 @@ import { promises as fs } from 'fs';
|
||||
const createDockerfile = async (data, image): Promise<void> => {
|
||||
const { applicationId, tag, port, startCommand, workdir, baseDirectory } = data;
|
||||
const Dockerfile: Array<string> = [];
|
||||
const isPnpm = startCommand.includes('pnpm');
|
||||
|
||||
Dockerfile.push(`FROM ${image}`);
|
||||
Dockerfile.push('WORKDIR /usr/src/app');
|
||||
Dockerfile.push(`LABEL coolify.image=true`);
|
||||
if (isPnpm) {
|
||||
Dockerfile.push('RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm');
|
||||
Dockerfile.push('RUN pnpm add -g pnpm');
|
||||
}
|
||||
Dockerfile.push(
|
||||
`COPY --from=${applicationId}:${tag}-cache /usr/src/app/${baseDirectory || ''} ./`
|
||||
);
|
||||
|
||||
Dockerfile.push(`EXPOSE ${port}`);
|
||||
Dockerfile.push(`CMD ${startCommand}`);
|
||||
await fs.writeFile(`${workdir}/Dockerfile`, Dockerfile.join('\n'));
|
||||
|
||||
@@ -13,7 +13,10 @@ const createDockerfile = async (data, image): Promise<void> => {
|
||||
pullmergeRequestId
|
||||
} = data;
|
||||
const Dockerfile: Array<string> = [];
|
||||
|
||||
const isPnpm =
|
||||
installCommand.includes('pnpm') ||
|
||||
buildCommand.includes('pnpm') ||
|
||||
startCommand.includes('pnpm');
|
||||
Dockerfile.push(`FROM ${image}`);
|
||||
Dockerfile.push('WORKDIR /usr/src/app');
|
||||
Dockerfile.push(`LABEL coolify.image=true`);
|
||||
@@ -32,6 +35,10 @@ const createDockerfile = async (data, image): Promise<void> => {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (isPnpm) {
|
||||
Dockerfile.push('RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm');
|
||||
Dockerfile.push('RUN pnpm add -g pnpm');
|
||||
}
|
||||
Dockerfile.push(`COPY ./${baseDirectory || ''}package*.json ./`);
|
||||
try {
|
||||
await fs.stat(`${workdir}/yarn.lock`);
|
||||
|
||||
@@ -13,7 +13,10 @@ const createDockerfile = async (data, image): Promise<void> => {
|
||||
pullmergeRequestId
|
||||
} = data;
|
||||
const Dockerfile: Array<string> = [];
|
||||
|
||||
const isPnpm =
|
||||
installCommand.includes('pnpm') ||
|
||||
buildCommand.includes('pnpm') ||
|
||||
startCommand.includes('pnpm');
|
||||
Dockerfile.push(`FROM ${image}`);
|
||||
Dockerfile.push('WORKDIR /usr/src/app');
|
||||
Dockerfile.push(`LABEL coolify.image=true`);
|
||||
@@ -32,6 +35,10 @@ const createDockerfile = async (data, image): Promise<void> => {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (isPnpm) {
|
||||
Dockerfile.push('RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm');
|
||||
Dockerfile.push('RUN pnpm add -g pnpm');
|
||||
}
|
||||
Dockerfile.push(`COPY ./${baseDirectory || ''}package*.json ./`);
|
||||
try {
|
||||
await fs.stat(`${workdir}/yarn.lock`);
|
||||
|
||||
@@ -13,7 +13,10 @@ const createDockerfile = async (data, image): Promise<void> => {
|
||||
pullmergeRequestId
|
||||
} = data;
|
||||
const Dockerfile: Array<string> = [];
|
||||
|
||||
const isPnpm =
|
||||
installCommand.includes('pnpm') ||
|
||||
buildCommand.includes('pnpm') ||
|
||||
startCommand.includes('pnpm');
|
||||
Dockerfile.push(`FROM ${image}`);
|
||||
Dockerfile.push('WORKDIR /usr/src/app');
|
||||
Dockerfile.push(`LABEL coolify.image=true`);
|
||||
@@ -32,6 +35,10 @@ const createDockerfile = async (data, image): Promise<void> => {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (isPnpm) {
|
||||
Dockerfile.push('RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm');
|
||||
Dockerfile.push('RUN pnpm add -g pnpm');
|
||||
}
|
||||
Dockerfile.push(`COPY ./${baseDirectory || ''}package*.json ./`);
|
||||
try {
|
||||
await fs.stat(`${workdir}/yarn.lock`);
|
||||
|
||||
@@ -11,6 +11,7 @@ import { version as currentVersion } from '../../package.json';
|
||||
import dayjs from 'dayjs';
|
||||
import Cookie from 'cookie';
|
||||
import os from 'os';
|
||||
import cuid from 'cuid';
|
||||
|
||||
try {
|
||||
if (!dev) {
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<div class="absolute top-0 right-0 m-3 cursor-pointer text-warmGray-600 hover:text-white">
|
||||
<div class="absolute top-0 right-0 m-3 cursor-pointer text-stone-600 hover:text-white">
|
||||
<div class="flex space-x-2">
|
||||
{#if isPasswordField}
|
||||
<div on:click={() => (showPassword = !showPassword)}>
|
||||
|
||||
27
src/lib/components/svg/services/LanguageTool.svelte
Normal file
27
src/lib/components/svg/services/LanguageTool.svelte
Normal file
@@ -0,0 +1,27 @@
|
||||
<script lang="ts">
|
||||
export let isAbsolute = false;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class={isAbsolute ? 'w-10 h-10 absolute top-0 left-0 -m-5' : 'w-8 mx-auto'}
|
||||
fill="none"
|
||||
viewBox="0 0 140 140"
|
||||
data-lt-extension-installed="true"
|
||||
><g clip-path="url(#clip0)"
|
||||
><path
|
||||
fill="#fff"
|
||||
fill-rule="evenodd"
|
||||
d="M140 43.602c0-1.662.001-3.324-.01-4.987-.008-1.4-.024-2.8-.062-4.2-.082-3.05-.262-6.126-.805-9.142-.55-3.06-1.448-5.907-2.864-8.688A29.227 29.227 0 0 0 123.476 3.81c-2.783-1.416-5.634-2.314-8.697-2.864-3.016-.542-6.094-.722-9.144-.804-1.4-.038-2.801-.054-4.202-.063C99.77.068 98.107.07 96.444.07L77.135 0H62.694L43.726.07c-1.666 0-3.332-.002-4.998.008-1.404.01-2.807.025-4.21.063-3.058.082-6.142.262-9.166.805-3.067.55-5.922 1.447-8.709 2.862a29.293 29.293 0 0 0-7.419 5.377 29.223 29.223 0 0 0-5.389 7.4c-1.42 2.78-2.32 5.63-2.871 8.691-.543 3.016-.723 6.091-.806 9.14-.038 1.4-.054 2.8-.062 4.2C.086 40.277 0 42.342 0 44.004v33.3l.086 19.102c0 1.665 0 3.33.01 4.994a200.6 200.6 0 0 0 .062 4.205c.083 3.054.263 6.135.807 9.155.551 3.064 1.451 5.916 2.87 8.7a29.294 29.294 0 0 0 12.807 12.794c2.788 1.418 5.645 2.317 8.714 2.868 3.022.542 6.105.722 9.162.804 1.403.038 2.806.054 4.21.063 1.666.01 3.332.009 4.998.009l19.14.001h14.477l19.101-.001c1.663 0 3.326.001 4.989-.009a202.92 202.92 0 0 0 4.202-.063c3.052-.082 6.13-.262 9.148-.805 3.061-.551 5.911-1.45 8.692-2.867a29.215 29.215 0 0 0 7.405-5.384 29.22 29.22 0 0 0 5.378-7.409c1.417-2.785 2.315-5.639 2.866-8.704.542-3.02.722-6.099.804-9.152.038-1.402.054-2.804.062-4.205.011-1.665.01-3.33.01-4.993l-.001-19.103V62.694L140 43.602"
|
||||
clip-rule="evenodd"
|
||||
/><path
|
||||
fill="#000"
|
||||
fill-rule="evenodd"
|
||||
d="M39.375 40.188h8.313a6.25 6.25 0 0 1 6.25 6.25v24.25h16.25v8.75h-18.75a6.25 6.25 0 0 1-6.25-6.25v-24.25h-5.813v-8.75zm63.563 6.25v6.5h-8.75v-4h-6.876v30.5h-8.75v-30.5h-6.874v4h-8.75v-6.5a6.25 6.25 0 0 1 6.25-6.25h27.5a6.25 6.25 0 0 1 6.25 6.25z"
|
||||
clip-rule="evenodd"
|
||||
/><path
|
||||
fill="#239AFF"
|
||||
d="M35.319 102.906l-8.138-5.812c2.39-3.347 4.857-5.936 7.452-7.753 2.884-2.018 5.948-3.091 9.117-3.091 2.942 0 5.491.714 7.768 2.08a17.622 17.622 0 0 1 2.615 1.94c.589.518 1.009.926 1.903 1.82 1.355 1.354 1.917 1.851 2.591 2.255.731.439 1.503.655 2.623.655 1.121 0 1.896-.217 2.631-.657.677-.405 1.245-.905 2.6-2.257l.012-.012c.89-.888 1.314-1.299 1.902-1.817a17.643 17.643 0 0 1 2.61-1.933c2.273-1.362 4.814-2.074 7.745-2.074s5.472.712 7.745 2.074c.916.55 1.758 1.183 2.61 1.933.589.518 1.013.929 1.902 1.817l.013.012c1.354 1.352 1.922 1.852 2.599 2.257.735.44 1.51.657 2.631.657.998 0 2.1-.386 3.383-1.284 1.572-1.1 3.272-2.886 5.048-5.372l8.138 5.812c-2.391 3.347-4.857 5.936-7.452 7.753-2.884 2.018-5.948 3.091-9.117 3.091-2.941 0-5.49-.713-7.769-2.078a17.627 17.627 0 0 1-2.619-1.938c-.59-.519-1.015-.93-1.906-1.82l-.013-.013c-1.351-1.348-1.917-1.846-2.59-2.25-.728-.436-1.494-.651-2.603-.651-1.109 0-1.875.215-2.603.651-.673.404-1.239.902-2.59 2.25l-.012.013c-.892.89-1.317 1.301-1.907 1.82-.855.752-1.7 1.388-2.62 1.938C66.74 104.287 64.192 105 61.25 105c-2.942 0-5.49-.714-7.768-2.08a17.654 17.654 0 0 1-2.615-1.939c-.588-.519-1.009-.927-1.902-1.82-1.355-1.355-1.918-1.852-2.592-2.256-.731-.439-1.503-.655-2.623-.655-.998 0-2.1.386-3.383 1.284-1.572 1.1-3.272 2.886-5.048 5.372z"
|
||||
/></g
|
||||
><defs><clipPath id="clip0"><path fill="#fff" d="M0 0h140v140H0z" /></clipPath></defs></svg
|
||||
>
|
||||
@@ -13,7 +13,7 @@ export function findBuildPack(pack, packageManager = 'npm') {
|
||||
if (pack === 'node') {
|
||||
return {
|
||||
...metaData,
|
||||
installCommand: null,
|
||||
...defaultBuildAndDeploy(packageManager),
|
||||
buildCommand: null,
|
||||
startCommand: null,
|
||||
publishDirectory: null,
|
||||
|
||||
@@ -58,15 +58,6 @@ export async function removeApplication({ id, teamId }) {
|
||||
const id = containerObj.ID;
|
||||
const preview = containerObj.Image.split('-')[1];
|
||||
await removeDestinationDocker({ id, engine: destinationDocker.engine });
|
||||
try {
|
||||
if (preview) {
|
||||
await removeProxyConfiguration({ domain: `${preview}.${domain}` });
|
||||
} else {
|
||||
await removeProxyConfiguration({ domain });
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,8 +70,8 @@ export async function removeApplication({ id, teamId }) {
|
||||
|
||||
export async function getApplicationWebhook({ projectId, branch }) {
|
||||
try {
|
||||
let body = await prisma.application.findFirst({
|
||||
where: { projectId, branch },
|
||||
let application = await prisma.application.findFirst({
|
||||
where: { projectId, branch, settings: { autodeploy: true } },
|
||||
include: {
|
||||
destinationDocker: true,
|
||||
settings: true,
|
||||
@@ -88,30 +79,38 @@ export async function getApplicationWebhook({ projectId, branch }) {
|
||||
secrets: true
|
||||
}
|
||||
});
|
||||
|
||||
if (body.gitSource?.githubApp?.clientSecret) {
|
||||
body.gitSource.githubApp.clientSecret = decrypt(body.gitSource.githubApp.clientSecret);
|
||||
if (application.gitSource?.githubApp?.clientSecret) {
|
||||
application.gitSource.githubApp.clientSecret = decrypt(
|
||||
application.gitSource.githubApp.clientSecret
|
||||
);
|
||||
}
|
||||
if (body.gitSource?.githubApp?.webhookSecret) {
|
||||
body.gitSource.githubApp.webhookSecret = decrypt(body.gitSource.githubApp.webhookSecret);
|
||||
if (application.gitSource?.githubApp?.webhookSecret) {
|
||||
application.gitSource.githubApp.webhookSecret = decrypt(
|
||||
application.gitSource.githubApp.webhookSecret
|
||||
);
|
||||
}
|
||||
if (body.gitSource?.githubApp?.privateKey) {
|
||||
body.gitSource.githubApp.privateKey = decrypt(body.gitSource.githubApp.privateKey);
|
||||
if (application.gitSource?.githubApp?.privateKey) {
|
||||
application.gitSource.githubApp.privateKey = decrypt(
|
||||
application.gitSource.githubApp.privateKey
|
||||
);
|
||||
}
|
||||
if (body?.gitSource?.gitlabApp?.appSecret) {
|
||||
body.gitSource.gitlabApp.appSecret = decrypt(body.gitSource.gitlabApp.appSecret);
|
||||
if (application?.gitSource?.gitlabApp?.appSecret) {
|
||||
application.gitSource.gitlabApp.appSecret = decrypt(
|
||||
application.gitSource.gitlabApp.appSecret
|
||||
);
|
||||
}
|
||||
if (body?.gitSource?.gitlabApp?.webhookToken) {
|
||||
body.gitSource.gitlabApp.webhookToken = decrypt(body.gitSource.gitlabApp.webhookToken);
|
||||
if (application?.gitSource?.gitlabApp?.webhookToken) {
|
||||
application.gitSource.gitlabApp.webhookToken = decrypt(
|
||||
application.gitSource.gitlabApp.webhookToken
|
||||
);
|
||||
}
|
||||
if (body?.secrets.length > 0) {
|
||||
body.secrets = body.secrets.map((s) => {
|
||||
if (application?.secrets.length > 0) {
|
||||
application.secrets = application.secrets.map((s) => {
|
||||
s.value = decrypt(s.value);
|
||||
return s;
|
||||
});
|
||||
}
|
||||
|
||||
return { ...body };
|
||||
return { ...application };
|
||||
} catch (e) {
|
||||
throw { status: 404, body: { message: e.message } };
|
||||
}
|
||||
@@ -157,24 +156,41 @@ export async function getApplication({ id, teamId }) {
|
||||
return { ...body };
|
||||
}
|
||||
|
||||
export async function configureGitRepository({ id, repository, branch, projectId, webhookToken }) {
|
||||
export async function configureGitRepository({
|
||||
id,
|
||||
repository,
|
||||
branch,
|
||||
projectId,
|
||||
webhookToken,
|
||||
autodeploy
|
||||
}) {
|
||||
if (webhookToken) {
|
||||
const encryptedWebhookToken = encrypt(webhookToken);
|
||||
return await prisma.application.update({
|
||||
await prisma.application.update({
|
||||
where: { id },
|
||||
data: {
|
||||
repository,
|
||||
branch,
|
||||
projectId,
|
||||
gitSource: { update: { gitlabApp: { update: { webhookToken: encryptedWebhookToken } } } }
|
||||
gitSource: { update: { gitlabApp: { update: { webhookToken: encryptedWebhookToken } } } },
|
||||
settings: { update: { autodeploy } }
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return await prisma.application.update({
|
||||
await prisma.application.update({
|
||||
where: { id },
|
||||
data: { repository, branch, projectId }
|
||||
data: { repository, branch, projectId, settings: { update: { autodeploy } } }
|
||||
});
|
||||
}
|
||||
if (!autodeploy) {
|
||||
const applications = await prisma.application.findMany({ where: { branch, projectId } });
|
||||
for (const application of applications) {
|
||||
await prisma.applicationSettings.updateMany({
|
||||
where: { applicationId: application.id },
|
||||
data: { autodeploy: false }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function configureBuildPack({ id, buildPack }) {
|
||||
@@ -209,10 +225,14 @@ export async function configureApplication({
|
||||
});
|
||||
}
|
||||
|
||||
export async function setApplicationSettings({ id, debug, previews, dualCerts }) {
|
||||
export async function checkDoubleBranch(branch, projectId) {
|
||||
const applications = await prisma.application.findMany({ where: { branch, projectId } });
|
||||
return applications.length > 1;
|
||||
}
|
||||
export async function setApplicationSettings({ id, debug, previews, dualCerts, autodeploy }) {
|
||||
return await prisma.application.update({
|
||||
where: { id },
|
||||
data: { settings: { update: { debug, previews, dualCerts } } },
|
||||
data: { settings: { update: { debug, previews, dualCerts, autodeploy } } },
|
||||
include: { destinationDocker: true }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@ export async function isDockerNetworkExists({ network }) {
|
||||
return await prisma.destinationDocker.findFirst({ where: { network } });
|
||||
}
|
||||
|
||||
export async function isServiceSecretExists({ id, name }) {
|
||||
return await prisma.serviceSecret.findFirst({ where: { name, serviceId: id } });
|
||||
}
|
||||
export async function isSecretExists({ id, name, isPRMRSecret }) {
|
||||
return await prisma.secret.findFirst({ where: { name, applicationId: id, isPRMRSecret } });
|
||||
}
|
||||
|
||||
@@ -156,6 +156,15 @@ export const supportedServiceTypesAndVersions = [
|
||||
ports: {
|
||||
main: 80
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'languagetool',
|
||||
fancyName: 'LanguageTool',
|
||||
baseImage: 'silviof/docker-languagetool',
|
||||
versions: ['latest'],
|
||||
ports: {
|
||||
main: 8010
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
import { encrypt, decrypt } from '$lib/crypto';
|
||||
import { prisma } from './common';
|
||||
|
||||
export async function listServiceSecrets(serviceId: string) {
|
||||
let secrets = await prisma.serviceSecret.findMany({
|
||||
where: { serviceId },
|
||||
orderBy: { createdAt: 'desc' }
|
||||
});
|
||||
secrets = secrets.map((secret) => {
|
||||
secret.value = decrypt(secret.value);
|
||||
return secret;
|
||||
});
|
||||
|
||||
return secrets;
|
||||
}
|
||||
|
||||
export async function listSecrets(applicationId: string) {
|
||||
let secrets = await prisma.secret.findMany({
|
||||
where: { applicationId },
|
||||
@@ -14,6 +27,12 @@ export async function listSecrets(applicationId: string) {
|
||||
return secrets;
|
||||
}
|
||||
|
||||
export async function createServiceSecret({ id, name, value }) {
|
||||
value = encrypt(value);
|
||||
return await prisma.serviceSecret.create({
|
||||
data: { name, value, service: { connect: { id } } }
|
||||
});
|
||||
}
|
||||
export async function createSecret({ id, name, value, isBuildSecret, isPRMRSecret }) {
|
||||
value = encrypt(value);
|
||||
return await prisma.secret.create({
|
||||
@@ -21,10 +40,24 @@ export async function createSecret({ id, name, value, isBuildSecret, isPRMRSecre
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateServiceSecret({ id, name, value }) {
|
||||
value = encrypt(value);
|
||||
const found = await prisma.serviceSecret.findFirst({ where: { serviceId: id, name } });
|
||||
|
||||
if (found) {
|
||||
return await prisma.serviceSecret.updateMany({
|
||||
where: { serviceId: id, name },
|
||||
data: { value }
|
||||
});
|
||||
} else {
|
||||
return await prisma.serviceSecret.create({
|
||||
data: { name, value, service: { connect: { id } } }
|
||||
});
|
||||
}
|
||||
}
|
||||
export async function updateSecret({ id, name, value, isBuildSecret, isPRMRSecret }) {
|
||||
value = encrypt(value);
|
||||
const found = await prisma.secret.findFirst({ where: { applicationId: id, name, isPRMRSecret } });
|
||||
console.log(found);
|
||||
|
||||
if (found) {
|
||||
return await prisma.secret.updateMany({
|
||||
@@ -38,6 +71,10 @@ export async function updateSecret({ id, name, value, isBuildSecret, isPRMRSecre
|
||||
}
|
||||
}
|
||||
|
||||
export async function removeServiceSecret({ id, name }) {
|
||||
return await prisma.serviceSecret.deleteMany({ where: { serviceId: id, name } });
|
||||
}
|
||||
|
||||
export async function removeSecret({ id, name }) {
|
||||
return await prisma.secret.deleteMany({ where: { applicationId: id, name } });
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@ export async function getService({ id, teamId }) {
|
||||
plausibleAnalytics: true,
|
||||
minio: true,
|
||||
vscodeserver: true,
|
||||
wordpress: true
|
||||
wordpress: true,
|
||||
serviceSecret: true
|
||||
}
|
||||
});
|
||||
|
||||
@@ -42,6 +43,12 @@ export async function getService({ id, teamId }) {
|
||||
if (body.wordpress?.mysqlRootUserPassword)
|
||||
body.wordpress.mysqlRootUserPassword = decrypt(body.wordpress.mysqlRootUserPassword);
|
||||
|
||||
if (body?.serviceSecret.length > 0) {
|
||||
body.serviceSecret = body.serviceSecret.map((s) => {
|
||||
s.value = decrypt(s.value);
|
||||
return s;
|
||||
});
|
||||
}
|
||||
return { ...body };
|
||||
}
|
||||
|
||||
@@ -105,6 +112,13 @@ export async function configureServiceType({ id, type }) {
|
||||
type
|
||||
}
|
||||
});
|
||||
} else if (type === 'languagetool') {
|
||||
await prisma.service.update({
|
||||
where: { id },
|
||||
data: {
|
||||
type
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
export async function setServiceVersion({ id, version }) {
|
||||
@@ -128,6 +142,9 @@ export async function updatePlausibleAnalyticsService({ id, fqdn, email, usernam
|
||||
export async function updateNocoDbOrMinioService({ id, fqdn, name }) {
|
||||
return await prisma.service.update({ where: { id }, data: { fqdn, name } });
|
||||
}
|
||||
export async function updateLanguageToolService({ id, fqdn, name }) {
|
||||
return await prisma.service.update({ where: { id }, data: { fqdn, name } });
|
||||
}
|
||||
export async function updateVaultWardenService({ id, fqdn, name }) {
|
||||
return await prisma.service.update({ where: { id }, data: { fqdn, name } });
|
||||
}
|
||||
@@ -149,5 +166,7 @@ export async function removeService({ id }) {
|
||||
await prisma.minio.deleteMany({ where: { serviceId: id } });
|
||||
await prisma.vscodeserver.deleteMany({ where: { serviceId: id } });
|
||||
await prisma.wordpress.deleteMany({ where: { serviceId: id } });
|
||||
await prisma.serviceSecret.deleteMany({ where: { serviceId: id } });
|
||||
|
||||
await prisma.service.delete({ where: { id } });
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export async function buildCacheImageWithNode(data, imageForBuild) {
|
||||
secrets,
|
||||
pullmergeRequestId
|
||||
} = data;
|
||||
const isPnpm = installCommand.includes('pnpm') || buildCommand.includes('pnpm');
|
||||
const Dockerfile: Array<string> = [];
|
||||
Dockerfile.push(`FROM ${imageForBuild}`);
|
||||
Dockerfile.push('WORKDIR /usr/src/app');
|
||||
@@ -35,7 +36,10 @@ export async function buildCacheImageWithNode(data, imageForBuild) {
|
||||
}
|
||||
});
|
||||
}
|
||||
// TODO: If build command defined, install command should be the default yarn install
|
||||
if (isPnpm) {
|
||||
Dockerfile.push('RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm');
|
||||
Dockerfile.push('RUN pnpm add -g pnpm');
|
||||
}
|
||||
if (installCommand) {
|
||||
Dockerfile.push(`COPY ./${baseDirectory || ''}package*.json ./`);
|
||||
try {
|
||||
|
||||
@@ -112,9 +112,15 @@ export async function haproxyInstance() {
|
||||
}
|
||||
|
||||
export async function configureHAProxy() {
|
||||
const haproxy = await haproxyInstance();
|
||||
|
||||
try {
|
||||
const haproxy = await haproxyInstance();
|
||||
await checkHAProxy(haproxy);
|
||||
} catch (error) {
|
||||
return 'Error: HAProxy is not running';
|
||||
}
|
||||
|
||||
try {
|
||||
const data = {
|
||||
applications: [],
|
||||
services: [],
|
||||
|
||||
@@ -49,7 +49,12 @@ export async function completeTransaction(transactionId) {
|
||||
}
|
||||
export async function deleteProxy({ id }) {
|
||||
const haproxy = await haproxyInstance();
|
||||
await checkHAProxy(haproxy);
|
||||
try {
|
||||
await checkHAProxy(haproxy);
|
||||
} catch (error) {
|
||||
return 'Error: HAProxy is not running';
|
||||
}
|
||||
|
||||
let transactionId;
|
||||
try {
|
||||
await haproxy.get(`v2/services/haproxy/configuration/backends/${id}`).json();
|
||||
@@ -175,11 +180,9 @@ export async function checkContainer(engine, container) {
|
||||
const { stdout } = await asyncExecShell(
|
||||
`DOCKER_HOST="${host}" docker inspect --format '{{json .State}}' ${container}`
|
||||
);
|
||||
|
||||
const parsedStdout = JSON.parse(stdout);
|
||||
const status = parsedStdout.Status;
|
||||
const isRunning = parsedStdout.Running;
|
||||
|
||||
const isRunning = status === 'running' ? true : false;
|
||||
if (status === 'exited' || status === 'created') {
|
||||
await asyncExecShell(`DOCKER_HOST="${host}" docker rm ${container}`);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { asyncExecShell, getDomain, getEngine } from '$lib/common';
|
||||
import { checkContainer } from '$lib/haproxy';
|
||||
import { checkContainer, reloadHaproxy } from '$lib/haproxy';
|
||||
import * as db from '$lib/database';
|
||||
import { dev } from '$app/env';
|
||||
import cuid from 'cuid';
|
||||
@@ -48,6 +48,17 @@ export async function letsEncrypt(domain, id = null, isCoolify = false) {
|
||||
}
|
||||
}
|
||||
if (dualCerts) {
|
||||
let found = false;
|
||||
try {
|
||||
await asyncExecShell(
|
||||
`DOCKER_HOST=${host} docker run --rm -v "coolify-letsencrypt:/etc/letsencrypt" -v "coolify-ssl-certs:/app/ssl" alpine:latest sh -c "ls -1 /app/ssl/${wwwDomain}.pem"`
|
||||
);
|
||||
found = true;
|
||||
} catch (error) {
|
||||
//
|
||||
}
|
||||
if (found) return;
|
||||
|
||||
await asyncExecShell(
|
||||
`DOCKER_HOST=${host} docker run --rm --name certbot-${randomCuid} -p 9080:${randomPort} -v "coolify-letsencrypt:/etc/letsencrypt" certbot/certbot --logs-dir /etc/letsencrypt/logs certonly --standalone --preferred-challenges http --http-01-address 0.0.0.0 --http-01-port ${randomPort} -d ${nakedDomain} -d ${wwwDomain} --expand --agree-tos --non-interactive --register-unsafely-without-email ${
|
||||
dev ? '--test-cert' : ''
|
||||
@@ -56,7 +67,18 @@ export async function letsEncrypt(domain, id = null, isCoolify = false) {
|
||||
await asyncExecShell(
|
||||
`DOCKER_HOST=${host} docker run --rm -v "coolify-letsencrypt:/etc/letsencrypt" -v "coolify-ssl-certs:/app/ssl" alpine:latest sh -c "test -d /etc/letsencrypt/live/${nakedDomain}/ && cat /etc/letsencrypt/live/${nakedDomain}/fullchain.pem /etc/letsencrypt/live/${nakedDomain}/privkey.pem > /app/ssl/${nakedDomain}.pem || cat /etc/letsencrypt/live/${wwwDomain}/fullchain.pem /etc/letsencrypt/live/${wwwDomain}/privkey.pem > /app/ssl/${wwwDomain}.pem"`
|
||||
);
|
||||
await reloadHaproxy(host);
|
||||
} else {
|
||||
let found = false;
|
||||
try {
|
||||
await asyncExecShell(
|
||||
`DOCKER_HOST=${host} docker run --rm -v "coolify-letsencrypt:/etc/letsencrypt" -v "coolify-ssl-certs:/app/ssl" alpine:latest sh -c "ls -1 /app/ssl/${domain}.pem"`
|
||||
);
|
||||
found = true;
|
||||
} catch (error) {
|
||||
//
|
||||
}
|
||||
if (found) return;
|
||||
await asyncExecShell(
|
||||
`DOCKER_HOST=${host} docker run --rm --name certbot-${randomCuid} -p 9080:${randomPort} -v "coolify-letsencrypt:/etc/letsencrypt" certbot/certbot --logs-dir /etc/letsencrypt/logs certonly --standalone --preferred-challenges http --http-01-address 0.0.0.0 --http-01-port ${randomPort} -d ${domain} --expand --agree-tos --non-interactive --register-unsafely-without-email ${
|
||||
dev ? '--test-cert' : ''
|
||||
@@ -65,6 +87,7 @@ export async function letsEncrypt(domain, id = null, isCoolify = false) {
|
||||
await asyncExecShell(
|
||||
`DOCKER_HOST=${host} docker run --rm -v "coolify-letsencrypt:/etc/letsencrypt" -v "coolify-ssl-certs:/app/ssl" alpine:latest sh -c "cat /etc/letsencrypt/live/${domain}/fullchain.pem /etc/letsencrypt/live/${domain}/privkey.pem > /app/ssl/${domain}.pem"`
|
||||
);
|
||||
await reloadHaproxy(host);
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.code !== 0) {
|
||||
@@ -76,7 +99,8 @@ export async function letsEncrypt(domain, id = null, isCoolify = false) {
|
||||
export async function generateSSLCerts() {
|
||||
const ssls = [];
|
||||
const applications = await db.prisma.application.findMany({
|
||||
include: { destinationDocker: true, settings: true }
|
||||
include: { destinationDocker: true, settings: true },
|
||||
orderBy: { createdAt: 'desc' }
|
||||
});
|
||||
for (const application of applications) {
|
||||
const {
|
||||
@@ -116,7 +140,8 @@ export async function generateSSLCerts() {
|
||||
plausibleAnalytics: true,
|
||||
vscodeserver: true,
|
||||
wordpress: true
|
||||
}
|
||||
},
|
||||
orderBy: { createdAt: 'desc' }
|
||||
});
|
||||
|
||||
for (const service of services) {
|
||||
@@ -145,9 +170,10 @@ export async function generateSSLCerts() {
|
||||
if (ssls.length > 0) {
|
||||
for (const ssl of ssls) {
|
||||
if (!dev) {
|
||||
console.log('Checking SSL for', ssl.domain);
|
||||
await letsEncrypt(ssl.domain, ssl.id, ssl.isCoolify);
|
||||
} else {
|
||||
console.log('Generate ssl for', ssl.domain);
|
||||
console.log('Checking SSL for', ssl.domain);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,33 @@
|
||||
import { dev } from '$app/env';
|
||||
import { asyncExecShell, getEngine } from '$lib/common';
|
||||
import { asyncExecShell, getEngine, version } from '$lib/common';
|
||||
import { prisma } from '$lib/database';
|
||||
import { defaultProxyImageHttp, defaultProxyImageTcp } from '$lib/haproxy';
|
||||
|
||||
export default async function () {
|
||||
const destinationDockers = await prisma.destinationDocker.findMany();
|
||||
for (const destinationDocker of destinationDockers) {
|
||||
const host = getEngine(destinationDocker.engine);
|
||||
// Cleanup old coolify images
|
||||
try {
|
||||
let { stdout: images } = await asyncExecShell(
|
||||
`DOCKER_HOST=${host} docker images coollabsio/coolify --filter before="coollabsio/coolify:${version}" -q | xargs `
|
||||
);
|
||||
images = images.trim();
|
||||
if (images) {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker rmi -f ${images}`);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker container prune -f`);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker image prune -f`);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
// Tagging images with labels
|
||||
// try {
|
||||
// const images = [
|
||||
@@ -30,16 +51,6 @@ export default async function () {
|
||||
// }
|
||||
// }
|
||||
// } catch (error) {}
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker container prune -f`);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker image prune -f`);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
// if (!dev) {
|
||||
// // Cleanup images that are not managed by coolify
|
||||
// try {
|
||||
|
||||
@@ -86,8 +86,8 @@ const cron = async () => {
|
||||
);
|
||||
|
||||
await queue.proxy.add('proxy', {}, { repeat: { every: 10000 } });
|
||||
await queue.ssl.add('ssl', {}, { repeat: { every: 60000 } });
|
||||
await queue.cleanup.add('cleanup', {}, { repeat: { every: 600000 } });
|
||||
await queue.ssl.add('ssl', {}, { repeat: { every: dev ? 10000 : 60000 } });
|
||||
await queue.cleanup.add('cleanup', {}, { repeat: { every: dev ? 10000 : 300000 } });
|
||||
await queue.sslRenew.add('sslRenew', {}, { repeat: { every: 1800000 } });
|
||||
|
||||
const events = {
|
||||
@@ -120,7 +120,7 @@ buildWorker.on('completed', async (job: Bullmq.Job) => {
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
} finally {
|
||||
const workdir = `/tmp/build-sources/${job.data.repository}/`;
|
||||
const workdir = `/tmp/build-sources/${job.data.repository}/${job.data.build_id}`;
|
||||
await asyncExecShell(`rm -fr ${workdir}`);
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { dev } from '$app/env';
|
||||
import { ErrorHandler } from '$lib/database';
|
||||
import { configureHAProxy } from '$lib/haproxy/configuration';
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { asyncExecShell } from '$lib/common';
|
||||
import { reloadHaproxy } from '$lib/haproxy';
|
||||
|
||||
export default async function () {
|
||||
try {
|
||||
return await asyncExecShell(
|
||||
await asyncExecShell(
|
||||
`docker run --rm --name certbot-renewal -v "coolify-letsencrypt:/etc/letsencrypt" certbot/certbot --logs-dir /etc/letsencrypt/logs renew`
|
||||
);
|
||||
await reloadHaproxy('unix:///var/run/docker.sock');
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
@@ -63,13 +63,11 @@
|
||||
const data = await get(`/update.json`);
|
||||
if (overrideVersion || data?.isUpdateAvailable) {
|
||||
latestVersion = overrideVersion || data.latestVersion;
|
||||
console.log('checking update');
|
||||
const { exists } = await post(`/update.json`, {
|
||||
type: 'check',
|
||||
latestVersion,
|
||||
overrideVersion
|
||||
});
|
||||
isUpdateAvailable = exists;
|
||||
if (overrideVersion) {
|
||||
isUpdateAvailable = true;
|
||||
} else {
|
||||
isUpdateAvailable = data.isUpdateAvailable;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
} finally {
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
async function handleDeploySubmit() {
|
||||
try {
|
||||
const { buildId } = await post(`/applications/${id}/deploy.json`, { ...application });
|
||||
return window.location.assign(`/applications/${id}/logs/build?buildId=${buildId}`);
|
||||
return await goto(`/applications/${id}/logs/build?buildId=${buildId}`);
|
||||
} catch ({ error }) {
|
||||
return errorNotification(error);
|
||||
}
|
||||
@@ -111,8 +111,6 @@
|
||||
return window.location.reload();
|
||||
} catch ({ error }) {
|
||||
return errorNotification(error);
|
||||
} finally {
|
||||
loading = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -25,9 +25,11 @@
|
||||
let selected = {
|
||||
projectId: undefined,
|
||||
repository: undefined,
|
||||
branch: undefined
|
||||
branch: undefined,
|
||||
autodeploy: application.settings.autodeploy || true
|
||||
};
|
||||
let showSave = false;
|
||||
|
||||
async function loadRepositoriesByPage(page = 0) {
|
||||
return await get(`${apiUrl}/installation/repositories?per_page=100&page=${page}`, {
|
||||
Authorization: `token ${$gitTokens.githubToken}`
|
||||
@@ -69,7 +71,14 @@
|
||||
`/applications/${id}/configuration/repository.json?repository=${selected.repository}&branch=${selected.branch}`
|
||||
);
|
||||
if (data.used) {
|
||||
errorNotification('This branch is already used by another application.');
|
||||
const sure = confirm(
|
||||
`This branch is already used by another application. Webhooks won't work in this case for both applications. Are you sure you want to use it?`
|
||||
);
|
||||
if (sure) {
|
||||
selected.autodeploy = false;
|
||||
showSave = true;
|
||||
return true;
|
||||
}
|
||||
showSave = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
let projects = [];
|
||||
let branches = [];
|
||||
let showSave = false;
|
||||
let autodeploy = application.settings.autodeploy || true;
|
||||
|
||||
let selected = {
|
||||
group: undefined,
|
||||
@@ -138,7 +139,14 @@
|
||||
`/applications/${id}/configuration/repository.json?repository=${selected.project.path_with_namespace}&branch=${selected.branch.name}`
|
||||
);
|
||||
if (data.used) {
|
||||
errorNotification('This branch is already used by another application.');
|
||||
const sure = confirm(
|
||||
`This branch is already used by another application. Webhooks won't work in this case for both applications. Are you sure you want to use it?`
|
||||
);
|
||||
if (sure) {
|
||||
autodeploy = false;
|
||||
showSave = true;
|
||||
return true;
|
||||
}
|
||||
showSave = false;
|
||||
return true;
|
||||
}
|
||||
@@ -235,10 +243,14 @@
|
||||
|
||||
const url = `/applications/${id}/configuration/repository.json`;
|
||||
try {
|
||||
const repository = `${selected.group.full_path.replace('-personal', '')}/${
|
||||
selected.project.name
|
||||
}`;
|
||||
await post(url, {
|
||||
repository: `${selected.group.full_path}/${selected.project.name}`,
|
||||
repository,
|
||||
branch: selected.branch.name,
|
||||
projectId: selected.project.id,
|
||||
autodeploy,
|
||||
webhookToken
|
||||
});
|
||||
return await goto(from || `/applications/${id}/configuration/buildpack`);
|
||||
|
||||
@@ -30,14 +30,21 @@ export const post: RequestHandler = async (event) => {
|
||||
if (status === 401) return { status, body };
|
||||
|
||||
const { id } = event.params;
|
||||
let { repository, branch, projectId, webhookToken } = await event.request.json();
|
||||
let { repository, branch, projectId, webhookToken, autodeploy } = await event.request.json();
|
||||
|
||||
repository = repository.toLowerCase();
|
||||
branch = branch.toLowerCase();
|
||||
projectId = Number(projectId);
|
||||
|
||||
try {
|
||||
await db.configureGitRepository({ id, repository, branch, projectId, webhookToken });
|
||||
await db.configureGitRepository({
|
||||
id,
|
||||
repository,
|
||||
branch,
|
||||
projectId,
|
||||
webhookToken,
|
||||
autodeploy
|
||||
});
|
||||
return { status: 201 };
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
let debug = application.settings.debug;
|
||||
let previews = application.settings.previews;
|
||||
let dualCerts = application.settings.dualCerts;
|
||||
let autodeploy = application.settings.autodeploy;
|
||||
|
||||
if (browser && window.location.hostname === 'demo.coolify.io' && !application.fqdn) {
|
||||
application.fqdn = `http://${cuid()}.demo.coolify.io`;
|
||||
@@ -75,10 +76,32 @@
|
||||
if (name === 'dualCerts') {
|
||||
dualCerts = !dualCerts;
|
||||
}
|
||||
if (name === 'autodeploy') {
|
||||
autodeploy = !autodeploy;
|
||||
}
|
||||
try {
|
||||
await post(`/applications/${id}/settings.json`, { previews, debug, dualCerts });
|
||||
await post(`/applications/${id}/settings.json`, {
|
||||
previews,
|
||||
debug,
|
||||
dualCerts,
|
||||
autodeploy,
|
||||
branch: application.branch,
|
||||
projectId: application.projectId
|
||||
});
|
||||
return toast.push('Settings saved.');
|
||||
} catch ({ error }) {
|
||||
if (name === 'debug') {
|
||||
debug = !debug;
|
||||
}
|
||||
if (name === 'previews') {
|
||||
previews = !previews;
|
||||
}
|
||||
if (name === 'dualCerts') {
|
||||
dualCerts = !dualCerts;
|
||||
}
|
||||
if (name === 'autodeploy') {
|
||||
autodeploy = !autodeploy;
|
||||
}
|
||||
return errorNotification(error);
|
||||
}
|
||||
}
|
||||
@@ -383,22 +406,23 @@
|
||||
<div class="flex space-x-1 pb-5 font-bold">
|
||||
<div class="title">Features</div>
|
||||
</div>
|
||||
<!-- <ul class="mt-2 divide-y divide-stone-800">
|
||||
<Setting
|
||||
bind:setting={forceSSL}
|
||||
on:click={() => changeSettings('forceSSL')}
|
||||
title="Force https"
|
||||
description="Creates a https redirect for all requests from http and also generates a https certificate for the domain through Let's Encrypt."
|
||||
/>
|
||||
</ul> -->
|
||||
<div class="px-10 pb-10">
|
||||
<div class="grid grid-cols-2 items-center">
|
||||
<Setting
|
||||
isCenter={false}
|
||||
bind:setting={autodeploy}
|
||||
on:click={() => changeSettings('autodeploy')}
|
||||
title="Enable Automatic Deployment"
|
||||
description="Enable automatic deployment through webhooks."
|
||||
/>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 items-center">
|
||||
<Setting
|
||||
isCenter={false}
|
||||
bind:setting={previews}
|
||||
on:click={() => changeSettings('previews')}
|
||||
title="Enable MR/PR Previews"
|
||||
description="Creates previews from pull and merge requests."
|
||||
description="Enable preview deployments from pull or merge requests."
|
||||
/>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 items-center">
|
||||
|
||||
@@ -51,9 +51,10 @@
|
||||
build.took = data.builds[0].took;
|
||||
build.since = data.builds[0].since;
|
||||
}
|
||||
|
||||
return build;
|
||||
});
|
||||
return;
|
||||
return window.location.reload();
|
||||
} catch ({ error }) {
|
||||
return errorNotification(error);
|
||||
}
|
||||
|
||||
@@ -8,10 +8,17 @@ export const post: RequestHandler = async (event) => {
|
||||
if (status === 401) return { status, body };
|
||||
|
||||
const { id } = event.params;
|
||||
const { debug, previews, dualCerts } = await event.request.json();
|
||||
const { debug, previews, dualCerts, autodeploy, branch, projectId } = await event.request.json();
|
||||
|
||||
try {
|
||||
await db.setApplicationSettings({ id, debug, previews, dualCerts });
|
||||
const isDouble = await db.checkDoubleBranch(branch, projectId);
|
||||
if (isDouble && autodeploy) {
|
||||
throw {
|
||||
message:
|
||||
'Cannot activate automatic deployments until only one application is defined for this repository / branch.'
|
||||
};
|
||||
}
|
||||
await db.setApplicationSettings({ id, debug, previews, dualCerts, autodeploy });
|
||||
return { status: 201 };
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
define('WP_ALLOW_MULTISITE', true);
|
||||
define('MULTISITE', true);
|
||||
define('SUBDOMAIN_INSTALL', false);`
|
||||
: null}>{service.wordpress.extraConfig || 'N/A'}</textarea
|
||||
: 'N/A'}>{service.wordpress.extraConfig}</textarea
|
||||
>
|
||||
</div>
|
||||
<div class="flex space-x-1 py-5 font-bold">
|
||||
|
||||
@@ -57,13 +57,13 @@
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import { session } from '$app/stores';
|
||||
import { page, session } from '$app/stores';
|
||||
import { errorNotification } from '$lib/form';
|
||||
import DeleteIcon from '$lib/components/DeleteIcon.svelte';
|
||||
import Loading from '$lib/components/Loading.svelte';
|
||||
import { del, post } from '$lib/api';
|
||||
import { goto } from '$app/navigation';
|
||||
import { onMount } from 'svelte';
|
||||
const { id } = $page.params;
|
||||
|
||||
export let service;
|
||||
export let isRunning;
|
||||
@@ -110,23 +110,6 @@
|
||||
loading = false;
|
||||
}
|
||||
}
|
||||
// onMount(async () => {
|
||||
// if (
|
||||
// service.type &&
|
||||
// service.destinationDockerId &&
|
||||
// service.version &&
|
||||
// service.fqdn &&
|
||||
// !isRunning
|
||||
// ) {
|
||||
// try {
|
||||
// await post(`/services/${service.id}/${service.type}/stop.json`, {});
|
||||
// } catch ({ error }) {
|
||||
// return errorNotification(error);
|
||||
// } finally {
|
||||
// loading = false;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
</script>
|
||||
|
||||
<nav class="nav-side">
|
||||
@@ -185,6 +168,76 @@
|
||||
</svg>
|
||||
</button>
|
||||
{/if}
|
||||
<div class="border border-stone-700 h-8" />
|
||||
{/if}
|
||||
{#if service.type && service.destinationDockerId && service.version}
|
||||
<a
|
||||
href="/services/{id}"
|
||||
sveltekit:prefetch
|
||||
class="hover:text-yellow-500 rounded"
|
||||
class:text-yellow-500={$page.url.pathname === `/services/${id}`}
|
||||
class:bg-coolgray-500={$page.url.pathname === `/services/${id}`}
|
||||
>
|
||||
<button
|
||||
title="Configurations"
|
||||
class="icons bg-transparent tooltip-bottom text-sm disabled:text-red-500"
|
||||
data-tooltip="Configurations"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-6 w-6"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
fill="none"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<rect x="4" y="8" width="4" height="4" />
|
||||
<line x1="6" y1="4" x2="6" y2="8" />
|
||||
<line x1="6" y1="12" x2="6" y2="20" />
|
||||
<rect x="10" y="14" width="4" height="4" />
|
||||
<line x1="12" y1="4" x2="12" y2="14" />
|
||||
<line x1="12" y1="18" x2="12" y2="20" />
|
||||
<rect x="16" y="5" width="4" height="4" />
|
||||
<line x1="18" y1="4" x2="18" y2="5" />
|
||||
<line x1="18" y1="9" x2="18" y2="20" />
|
||||
</svg></button
|
||||
></a
|
||||
>
|
||||
<a
|
||||
href="/services/{id}/secrets"
|
||||
sveltekit:prefetch
|
||||
class="hover:text-pink-500 rounded"
|
||||
class:text-pink-500={$page.url.pathname === `/services/${id}/secrets`}
|
||||
class:bg-coolgray-500={$page.url.pathname === `/services/${id}/secrets`}
|
||||
>
|
||||
<button
|
||||
title="Secrets"
|
||||
class="icons bg-transparent tooltip-bottom text-sm disabled:text-red-500"
|
||||
data-tooltip="Secrets"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="w-6 h-6"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
fill="none"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3"
|
||||
/>
|
||||
<circle cx="12" cy="11" r="1" />
|
||||
<line x1="12" y1="12" x2="12" y2="14.5" />
|
||||
</svg></button
|
||||
></a
|
||||
>
|
||||
<div class="border border-stone-700 h-8" />
|
||||
{/if}
|
||||
<button
|
||||
on:click={deleteService}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { post } from '$lib/api';
|
||||
import VaultWarden from '$lib/components/svg/services/VaultWarden.svelte';
|
||||
import LanguageTool from '$lib/components/svg/services/LanguageTool.svelte';
|
||||
|
||||
const { id } = $page.params;
|
||||
const from = $page.url.searchParams.get('from');
|
||||
@@ -74,6 +75,8 @@
|
||||
<Wordpress isAbsolute />
|
||||
{:else if type.name === 'vaultwarden'}
|
||||
<VaultWarden isAbsolute />
|
||||
{:else if type.name === 'languagetool'}
|
||||
<LanguageTool isAbsolute />
|
||||
{/if}{type.fancyName}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
import VsCodeServer from '$lib/components/svg/services/VSCodeServer.svelte';
|
||||
import Wordpress from '$lib/components/svg/services/Wordpress.svelte';
|
||||
import Services from './_Services/_Services.svelte';
|
||||
import { getDomain } from '$lib/components/common';
|
||||
import VaultWarden from '$lib/components/svg/services/VaultWarden.svelte';
|
||||
import cuid from 'cuid';
|
||||
import { browser } from '$app/env';
|
||||
import LanguageTool from '$lib/components/svg/services/LanguageTool.svelte';
|
||||
|
||||
export let service;
|
||||
export let isRunning;
|
||||
@@ -105,6 +105,10 @@
|
||||
<a href="https://github.com/dani-garcia/vaultwarden" target="_blank">
|
||||
<VaultWarden />
|
||||
</a>
|
||||
{:else if service.type === 'languagetool'}
|
||||
<a href="https://languagetool.org/dev" target="_blank">
|
||||
<LanguageTool />
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
21
src/routes/services/[id]/languagetool/index.json.ts
Normal file
21
src/routes/services/[id]/languagetool/index.json.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { getUserDetails } from '$lib/common';
|
||||
import * as db from '$lib/database';
|
||||
import { ErrorHandler } from '$lib/database';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
const { status, body } = await getUserDetails(event);
|
||||
if (status === 401) return { status, body };
|
||||
|
||||
const { id } = event.params;
|
||||
|
||||
let { name, fqdn } = await event.request.json();
|
||||
if (fqdn) fqdn = fqdn.toLowerCase();
|
||||
|
||||
try {
|
||||
await db.updateLanguageToolService({ id, fqdn, name });
|
||||
return { status: 201 };
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
}
|
||||
};
|
||||
78
src/routes/services/[id]/languagetool/start.json.ts
Normal file
78
src/routes/services/[id]/languagetool/start.json.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
import { asyncExecShell, createDirectories, getEngine, getUserDetails } from '$lib/common';
|
||||
import * as db from '$lib/database';
|
||||
import { promises as fs } from 'fs';
|
||||
import yaml from 'js-yaml';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
import { ErrorHandler, getServiceImage } from '$lib/database';
|
||||
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
const { teamId, status, body } = await getUserDetails(event);
|
||||
if (status === 401) return { status, body };
|
||||
|
||||
const { id } = event.params;
|
||||
|
||||
try {
|
||||
const service = await db.getService({ id, teamId });
|
||||
const { type, version, destinationDockerId, destinationDocker, serviceSecret } = service;
|
||||
const network = destinationDockerId && destinationDocker.network;
|
||||
const host = getEngine(destinationDocker.engine);
|
||||
|
||||
const { workdir } = await createDirectories({ repository: type, buildId: id });
|
||||
const image = getServiceImage(type);
|
||||
|
||||
const config = {
|
||||
image: `${image}:${version}`,
|
||||
volume: `${id}-ngrams:/ngrams`,
|
||||
environmentVariables: {}
|
||||
};
|
||||
|
||||
if (serviceSecret.length > 0) {
|
||||
serviceSecret.forEach((secret) => {
|
||||
config.environmentVariables[secret.name] = secret.value;
|
||||
});
|
||||
}
|
||||
const composeFile = {
|
||||
version: '3.8',
|
||||
services: {
|
||||
[id]: {
|
||||
container_name: id,
|
||||
image: config.image,
|
||||
networks: [network],
|
||||
environment: config.environmentVariables,
|
||||
restart: 'always',
|
||||
volumes: [`${id}-ngrams:/ngrams`],
|
||||
labels: makeLabelForServices('languagetool')
|
||||
}
|
||||
},
|
||||
networks: {
|
||||
[network]: {
|
||||
external: true
|
||||
}
|
||||
},
|
||||
volumes: {
|
||||
[`${id}-ngrams`]: {
|
||||
external: true
|
||||
}
|
||||
}
|
||||
};
|
||||
const composeFileDestination = `${workdir}/docker-compose.yaml`;
|
||||
await fs.writeFile(composeFileDestination, yaml.dump(composeFile));
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker volume create ${id}-ngrams`);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
|
||||
return {
|
||||
status: 200
|
||||
};
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
}
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
}
|
||||
};
|
||||
35
src/routes/services/[id]/languagetool/stop.json.ts
Normal file
35
src/routes/services/[id]/languagetool/stop.json.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { getUserDetails, removeDestinationDocker } from '$lib/common';
|
||||
import * as db from '$lib/database';
|
||||
import { ErrorHandler } from '$lib/database';
|
||||
import { checkContainer } from '$lib/haproxy';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
const { teamId, status, body } = await getUserDetails(event);
|
||||
if (status === 401) return { status, body };
|
||||
|
||||
const { id } = event.params;
|
||||
|
||||
try {
|
||||
const service = await db.getService({ id, teamId });
|
||||
const { destinationDockerId, destinationDocker, fqdn } = service;
|
||||
if (destinationDockerId) {
|
||||
const engine = destinationDocker.engine;
|
||||
|
||||
try {
|
||||
const found = await checkContainer(engine, id);
|
||||
if (found) {
|
||||
await removeDestinationDocker({ id, engine });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
status: 200
|
||||
};
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
}
|
||||
};
|
||||
@@ -6,7 +6,7 @@ import type { RequestHandler } from '@sveltejs/kit';
|
||||
import { startHttpProxy } from '$lib/haproxy';
|
||||
import getPort, { portNumbers } from 'get-port';
|
||||
import { getDomain } from '$lib/components/common';
|
||||
import { ErrorHandler } from '$lib/database';
|
||||
import { ErrorHandler, getServiceImage } from '$lib/database';
|
||||
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
@@ -23,7 +23,8 @@ export const post: RequestHandler = async (event) => {
|
||||
fqdn,
|
||||
destinationDockerId,
|
||||
destinationDocker,
|
||||
minio: { rootUser, rootUserPassword }
|
||||
minio: { rootUser, rootUserPassword },
|
||||
serviceSecret
|
||||
} = service;
|
||||
|
||||
const data = await db.prisma.setting.findFirst();
|
||||
@@ -38,9 +39,10 @@ export const post: RequestHandler = async (event) => {
|
||||
const apiPort = 9000;
|
||||
|
||||
const { workdir } = await createDirectories({ repository: type, buildId: id });
|
||||
const image = getServiceImage(type);
|
||||
|
||||
const config = {
|
||||
image: `minio/minio:${version}`,
|
||||
image: `${image}:${version}`,
|
||||
volume: `${id}-minio-data:/data`,
|
||||
environmentVariables: {
|
||||
MINIO_ROOT_USER: rootUser,
|
||||
@@ -48,12 +50,17 @@ export const post: RequestHandler = async (event) => {
|
||||
MINIO_BROWSER_REDIRECT_URL: fqdn
|
||||
}
|
||||
};
|
||||
if (serviceSecret.length > 0) {
|
||||
serviceSecret.forEach((secret) => {
|
||||
config.environmentVariables[secret.name] = secret.value;
|
||||
});
|
||||
}
|
||||
const composeFile = {
|
||||
version: '3.8',
|
||||
services: {
|
||||
[id]: {
|
||||
container_name: id,
|
||||
image: `minio/minio:${version}`,
|
||||
image: config.image,
|
||||
command: `server /data --console-address ":${consolePort}"`,
|
||||
environment: config.environmentVariables,
|
||||
networks: [network],
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as db from '$lib/database';
|
||||
import { promises as fs } from 'fs';
|
||||
import yaml from 'js-yaml';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
import { ErrorHandler } from '$lib/database';
|
||||
import { ErrorHandler, getServiceImage } from '$lib/database';
|
||||
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
@@ -14,19 +14,30 @@ export const post: RequestHandler = async (event) => {
|
||||
|
||||
try {
|
||||
const service = await db.getService({ id, teamId });
|
||||
const { type, version, destinationDockerId, destinationDocker } = service;
|
||||
const { type, version, destinationDockerId, destinationDocker, serviceSecret } = service;
|
||||
const network = destinationDockerId && destinationDocker.network;
|
||||
const host = getEngine(destinationDocker.engine);
|
||||
|
||||
const { workdir } = await createDirectories({ repository: type, buildId: id });
|
||||
const image = getServiceImage(type);
|
||||
|
||||
const config = {
|
||||
image: `${image}:${version}`,
|
||||
environmentVariables: {}
|
||||
};
|
||||
if (serviceSecret.length > 0) {
|
||||
serviceSecret.forEach((secret) => {
|
||||
config.environmentVariables[secret.name] = secret.value;
|
||||
});
|
||||
}
|
||||
const composeFile = {
|
||||
version: '3.8',
|
||||
services: {
|
||||
[id]: {
|
||||
container_name: id,
|
||||
image: `nocodb/nocodb:${version}`,
|
||||
image: config.image,
|
||||
networks: [network],
|
||||
environment: config.environmentVariables,
|
||||
restart: 'always',
|
||||
labels: makeLabelForServices('nocodb')
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as db from '$lib/database';
|
||||
import { promises as fs } from 'fs';
|
||||
import yaml from 'js-yaml';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
import { ErrorHandler } from '$lib/database';
|
||||
import { ErrorHandler, getServiceImage } from '$lib/database';
|
||||
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
@@ -20,6 +20,7 @@ export const post: RequestHandler = async (event) => {
|
||||
fqdn,
|
||||
destinationDockerId,
|
||||
destinationDocker,
|
||||
serviceSecret,
|
||||
plausibleAnalytics: {
|
||||
id: plausibleDbId,
|
||||
username,
|
||||
@@ -31,10 +32,11 @@ export const post: RequestHandler = async (event) => {
|
||||
secretKeyBase
|
||||
}
|
||||
} = service;
|
||||
const image = getServiceImage(type);
|
||||
|
||||
const config = {
|
||||
plausibleAnalytics: {
|
||||
image: `plausible/analytics:${version}`,
|
||||
image: `${image}:${version}`,
|
||||
environmentVariables: {
|
||||
ADMIN_USER_EMAIL: email,
|
||||
ADMIN_USER_NAME: username,
|
||||
@@ -68,6 +70,11 @@ export const post: RequestHandler = async (event) => {
|
||||
}
|
||||
}
|
||||
};
|
||||
if (serviceSecret.length > 0) {
|
||||
serviceSecret.forEach((secret) => {
|
||||
config.plausibleAnalytics.environmentVariables[secret.name] = secret.value;
|
||||
});
|
||||
}
|
||||
const network = destinationDockerId && destinationDocker.network;
|
||||
const host = getEngine(destinationDocker.engine);
|
||||
|
||||
|
||||
87
src/routes/services/[id]/secrets/_Secret.svelte
Normal file
87
src/routes/services/[id]/secrets/_Secret.svelte
Normal file
@@ -0,0 +1,87 @@
|
||||
<script>
|
||||
export let name = '';
|
||||
export let value = '';
|
||||
export let isNewSecret = false;
|
||||
|
||||
import { page } from '$app/stores';
|
||||
import { del, post } from '$lib/api';
|
||||
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
|
||||
import { errorNotification } from '$lib/form';
|
||||
import { toast } from '@zerodevx/svelte-toast';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
const { id } = $page.params;
|
||||
async function removeSecret() {
|
||||
try {
|
||||
await del(`/services/${id}/secrets.json`, { name });
|
||||
dispatch('refresh');
|
||||
if (isNewSecret) {
|
||||
name = '';
|
||||
value = '';
|
||||
}
|
||||
} catch ({ error }) {
|
||||
return errorNotification(error);
|
||||
}
|
||||
}
|
||||
async function saveSecret(isNew = false) {
|
||||
if (!name) return errorNotification('Name is required.');
|
||||
if (!value) return errorNotification('Value is required.');
|
||||
try {
|
||||
await post(`/services/${id}/secrets.json`, {
|
||||
name,
|
||||
value,
|
||||
|
||||
isNew
|
||||
});
|
||||
dispatch('refresh');
|
||||
if (isNewSecret) {
|
||||
name = '';
|
||||
value = '';
|
||||
}
|
||||
toast.push('Secret saved.');
|
||||
} catch ({ error }) {
|
||||
return errorNotification(error);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<td>
|
||||
<input
|
||||
id={isNewSecret ? 'secretName' : 'secretNameNew'}
|
||||
bind:value={name}
|
||||
required
|
||||
placeholder="EXAMPLE_VARIABLE"
|
||||
class=" border border-dashed border-coolgray-300"
|
||||
readonly={!isNewSecret}
|
||||
class:bg-transparent={!isNewSecret}
|
||||
class:cursor-not-allowed={!isNewSecret}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<CopyPasswordField
|
||||
id={isNewSecret ? 'secretValue' : 'secretValueNew'}
|
||||
name={isNewSecret ? 'secretValue' : 'secretValueNew'}
|
||||
isPasswordField={true}
|
||||
bind:value
|
||||
required
|
||||
placeholder="J$#@UIO%HO#$U%H"
|
||||
/>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{#if isNewSecret}
|
||||
<div class="flex items-center justify-center">
|
||||
<button class="bg-green-600 hover:bg-green-500" on:click={() => saveSecret(true)}>Add</button>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="flex flex-row justify-center space-x-2">
|
||||
<div class="flex items-center justify-center">
|
||||
<button class="" on:click={() => saveSecret(false)}>Set</button>
|
||||
</div>
|
||||
<div class="flex justify-center items-end">
|
||||
<button class="bg-red-600 hover:bg-red-500" on:click={removeSecret}>Remove</button>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
70
src/routes/services/[id]/secrets/index.json.ts
Normal file
70
src/routes/services/[id]/secrets/index.json.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
import { getTeam, getUserDetails } from '$lib/common';
|
||||
import * as db from '$lib/database';
|
||||
import { ErrorHandler } from '$lib/database';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
|
||||
export const get: RequestHandler = async (event) => {
|
||||
const { teamId, status, body } = await getUserDetails(event);
|
||||
if (status === 401) return { status, body };
|
||||
|
||||
const { id } = event.params;
|
||||
try {
|
||||
const secrets = await db.listServiceSecrets(id);
|
||||
return {
|
||||
status: 200,
|
||||
body: {
|
||||
secrets: secrets.sort((a, b) => {
|
||||
return ('' + a.name).localeCompare(b.name);
|
||||
})
|
||||
}
|
||||
};
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
}
|
||||
};
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
const { teamId, status, body } = await getUserDetails(event);
|
||||
if (status === 401) return { status, body };
|
||||
|
||||
const { id } = event.params;
|
||||
const { name, value, isBuildSecret, isPRMRSecret, isNew } = await event.request.json();
|
||||
try {
|
||||
if (isNew) {
|
||||
const found = await db.isServiceSecretExists({ id, name });
|
||||
if (found) {
|
||||
throw {
|
||||
error: `Secret ${name} already exists.`
|
||||
};
|
||||
} else {
|
||||
await db.createServiceSecret({ id, name, value });
|
||||
return {
|
||||
status: 201
|
||||
};
|
||||
}
|
||||
} else {
|
||||
await db.updateServiceSecret({ id, name, value });
|
||||
return {
|
||||
status: 201
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
}
|
||||
};
|
||||
export const del: RequestHandler = async (event) => {
|
||||
const { teamId, status, body } = await getUserDetails(event);
|
||||
if (status === 401) return { status, body };
|
||||
|
||||
const { id } = event.params;
|
||||
const { name } = await event.request.json();
|
||||
|
||||
try {
|
||||
await db.removeServiceSecret({ id, name });
|
||||
return {
|
||||
status: 200
|
||||
};
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
}
|
||||
};
|
||||
67
src/routes/services/[id]/secrets/index.svelte
Normal file
67
src/routes/services/[id]/secrets/index.svelte
Normal file
@@ -0,0 +1,67 @@
|
||||
<script context="module" lang="ts">
|
||||
import type { Load } from '@sveltejs/kit';
|
||||
export const load: Load = async ({ fetch, params, stuff }) => {
|
||||
let endpoint = `/services/${params.id}/secrets.json`;
|
||||
const res = await fetch(endpoint);
|
||||
if (res.ok) {
|
||||
return {
|
||||
props: {
|
||||
service: stuff.service,
|
||||
...(await res.json())
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
status: res.status,
|
||||
error: new Error(`Could not load ${endpoint}`)
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export let secrets;
|
||||
export let service;
|
||||
import Secret from './_Secret.svelte';
|
||||
import { getDomain } from '$lib/components/common';
|
||||
import { page } from '$app/stores';
|
||||
import { get } from '$lib/api';
|
||||
|
||||
const { id } = $page.params;
|
||||
|
||||
async function refreshSecrets() {
|
||||
const data = await get(`/services/${id}/secrets.json`);
|
||||
secrets = [...data.secrets];
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex space-x-1 p-6 font-bold">
|
||||
<div class="mr-4 text-2xl tracking-tight">
|
||||
Secrets {#if service.fqdn}
|
||||
<a href={service.fqdn} target="_blank">{getDomain(service.fqdn)}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx-auto max-w-6xl rounded-xl px-6 pt-4">
|
||||
<table class="mx-auto border-separate text-left">
|
||||
<thead>
|
||||
<tr class="h-12">
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Value</th>
|
||||
<th scope="col" class="w-96 text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each secrets as secret}
|
||||
{#key secret.id}
|
||||
<tr>
|
||||
<Secret name={secret.name} value={secret.value} on:refresh={refreshSecrets} />
|
||||
</tr>
|
||||
{/key}
|
||||
{/each}
|
||||
<tr>
|
||||
<Secret isNewSecret on:refresh={refreshSecrets} />
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -14,25 +14,31 @@ export const post: RequestHandler = async (event) => {
|
||||
|
||||
try {
|
||||
const service = await db.getService({ id, teamId });
|
||||
const { type, version, destinationDockerId, destinationDocker } = service;
|
||||
const { type, version, destinationDockerId, destinationDocker, serviceSecret } = service;
|
||||
|
||||
const network = destinationDockerId && destinationDocker.network;
|
||||
const host = getEngine(destinationDocker.engine);
|
||||
|
||||
const { workdir } = await createDirectories({ repository: type, buildId: id });
|
||||
const baseImage = getServiceImage(type);
|
||||
const image = getServiceImage(type);
|
||||
|
||||
const config = {
|
||||
image: `${baseImage}:${version}`,
|
||||
volume: `${id}-vaultwarden-data:/data/`
|
||||
image: `${image}:${version}`,
|
||||
volume: `${id}-vaultwarden-data:/data/`,
|
||||
environmentVariables: {}
|
||||
};
|
||||
|
||||
if (serviceSecret.length > 0) {
|
||||
serviceSecret.forEach((secret) => {
|
||||
config.environmentVariables[secret.name] = secret.value;
|
||||
});
|
||||
}
|
||||
const composeFile = {
|
||||
version: '3.8',
|
||||
services: {
|
||||
[id]: {
|
||||
container_name: id,
|
||||
image: config.image,
|
||||
environment: config.environmentVariables,
|
||||
networks: [network],
|
||||
volumes: [config.volume],
|
||||
restart: 'always',
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as db from '$lib/database';
|
||||
import { promises as fs } from 'fs';
|
||||
import yaml from 'js-yaml';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
import { ErrorHandler } from '$lib/database';
|
||||
import { ErrorHandler, getServiceImage } from '$lib/database';
|
||||
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
@@ -19,6 +19,7 @@ export const post: RequestHandler = async (event) => {
|
||||
version,
|
||||
destinationDockerId,
|
||||
destinationDocker,
|
||||
serviceSecret,
|
||||
vscodeserver: { password }
|
||||
} = service;
|
||||
|
||||
@@ -26,13 +27,20 @@ export const post: RequestHandler = async (event) => {
|
||||
const host = getEngine(destinationDocker.engine);
|
||||
|
||||
const { workdir } = await createDirectories({ repository: type, buildId: id });
|
||||
const image = getServiceImage(type);
|
||||
|
||||
const config = {
|
||||
image: `codercom/code-server:${version}`,
|
||||
image: `${image}:${version}`,
|
||||
volume: `${id}-vscodeserver-data:/home/coder`,
|
||||
environmentVariables: {
|
||||
PASSWORD: password
|
||||
}
|
||||
};
|
||||
if (serviceSecret.length > 0) {
|
||||
serviceSecret.forEach((secret) => {
|
||||
config.environmentVariables[secret.name] = secret.value;
|
||||
});
|
||||
}
|
||||
const composeFile = {
|
||||
version: '3.8',
|
||||
services: {
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as db from '$lib/database';
|
||||
import { promises as fs } from 'fs';
|
||||
import yaml from 'js-yaml';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
import { ErrorHandler } from '$lib/database';
|
||||
import { ErrorHandler, getServiceImage } from '$lib/database';
|
||||
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
@@ -19,6 +19,7 @@ export const post: RequestHandler = async (event) => {
|
||||
version,
|
||||
fqdn,
|
||||
destinationDockerId,
|
||||
serviceSecret,
|
||||
destinationDocker,
|
||||
wordpress: {
|
||||
mysqlDatabase,
|
||||
@@ -32,11 +33,12 @@ export const post: RequestHandler = async (event) => {
|
||||
|
||||
const network = destinationDockerId && destinationDocker.network;
|
||||
const host = getEngine(destinationDocker.engine);
|
||||
const image = getServiceImage(type);
|
||||
|
||||
const { workdir } = await createDirectories({ repository: type, buildId: id });
|
||||
const config = {
|
||||
wordpress: {
|
||||
image: `wordpress:${version}`,
|
||||
image: `${image}:${version}`,
|
||||
volume: `${id}-wordpress-data:/var/www/html`,
|
||||
environmentVariables: {
|
||||
WORDPRESS_DB_HOST: `${id}-mysql`,
|
||||
@@ -58,6 +60,11 @@ export const post: RequestHandler = async (event) => {
|
||||
}
|
||||
}
|
||||
};
|
||||
if (serviceSecret.length > 0) {
|
||||
serviceSecret.forEach((secret) => {
|
||||
config.wordpress.environmentVariables[secret.name] = secret.value;
|
||||
});
|
||||
}
|
||||
const composeFile = {
|
||||
version: '3.8',
|
||||
services: {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
import VsCodeServer from '$lib/components/svg/services/VSCodeServer.svelte';
|
||||
import Wordpress from '$lib/components/svg/services/Wordpress.svelte';
|
||||
import VaultWarden from '$lib/components/svg/services/VaultWarden.svelte';
|
||||
import LanguageTool from '$lib/components/svg/services/LanguageTool.svelte';
|
||||
|
||||
export let services;
|
||||
</script>
|
||||
@@ -70,6 +71,8 @@
|
||||
<Wordpress isAbsolute />
|
||||
{:else if service.type === 'vaultwarden'}
|
||||
<VaultWarden isAbsolute />
|
||||
{:else if service.type === 'languagetool'}
|
||||
<LanguageTool isAbsolute />
|
||||
{/if}
|
||||
<div class="font-bold text-xl text-center truncate">
|
||||
{service.name}
|
||||
|
||||
@@ -189,8 +189,11 @@
|
||||
<Explainer
|
||||
text={`Credentials for <a class="text-white font-bold" href=${
|
||||
fqdn
|
||||
? 'http://' + getDomain(fqdn) + ':8404'
|
||||
: browser && 'http://' + window.location.hostname + ':8404'
|
||||
? `http://${settings.proxyUser}:${settings.proxyPassword}@` + getDomain(fqdn) + ':8404'
|
||||
: browser &&
|
||||
`http://${settings.proxyUser}:${settings.proxyPassword}@` +
|
||||
window.location.hostname +
|
||||
':8404'
|
||||
} target="_blank">stats</a> page.`}
|
||||
/>
|
||||
<div class="space-y-2 px-10 py-5">
|
||||
|
||||
@@ -6,13 +6,18 @@ import type { RequestHandler } from '@sveltejs/kit';
|
||||
import compare from 'compare-versions';
|
||||
import got from 'got';
|
||||
|
||||
export const get: RequestHandler = async () => {
|
||||
export const get: RequestHandler = async (request) => {
|
||||
try {
|
||||
const currentVersion = version;
|
||||
const versions = await got
|
||||
.get(`https://get.coollabs.io/versions.json?appId=${process.env['COOLIFY_APP_ID']}`)
|
||||
.get(
|
||||
`https://get.coollabs.io/versions.json?appId=${process.env['COOLIFY_APP_ID']}&version=${currentVersion}`
|
||||
)
|
||||
.json();
|
||||
const latestVersion = versions['coolify'].main.version;
|
||||
const latestVersion =
|
||||
request.url.hostname === 'staging.coolify.io'
|
||||
? versions['coolify'].next.version
|
||||
: versions['coolify'].main.version;
|
||||
const isUpdateAvailable = compare(latestVersion, currentVersion);
|
||||
return {
|
||||
body: {
|
||||
@@ -21,12 +26,13 @@ export const get: RequestHandler = async () => {
|
||||
}
|
||||
};
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return ErrorHandler(error);
|
||||
}
|
||||
};
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
const { type, latestVersion, overrideVersion } = await event.request.json();
|
||||
const { type, latestVersion } = await event.request.json();
|
||||
if (type === 'update') {
|
||||
try {
|
||||
if (!dev) {
|
||||
@@ -50,31 +56,6 @@ export const post: RequestHandler = async (event) => {
|
||||
} catch (error) {
|
||||
return ErrorHandler(error);
|
||||
}
|
||||
} else if (type === 'check') {
|
||||
try {
|
||||
if (overrideVersion) {
|
||||
return {
|
||||
status: 200,
|
||||
body: {
|
||||
exists: true
|
||||
}
|
||||
};
|
||||
}
|
||||
await asyncExecShell(`docker image inspect coollabsio/coolify:${latestVersion}`);
|
||||
return {
|
||||
status: 200,
|
||||
body: {
|
||||
exists: true
|
||||
}
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
status: 200,
|
||||
body: {
|
||||
exists: false
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
status: 500
|
||||
|
||||
@@ -9,7 +9,7 @@ import { dev } from '$app/env';
|
||||
|
||||
export const options: RequestHandler = async () => {
|
||||
return {
|
||||
status: 200,
|
||||
status: 204,
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
|
||||
|
||||
@@ -9,7 +9,7 @@ import { dev } from '$app/env';
|
||||
|
||||
export const options: RequestHandler = async () => {
|
||||
return {
|
||||
status: 200,
|
||||
status: 204,
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
|
||||
|
||||
@@ -7,7 +7,7 @@ import cookie from 'cookie';
|
||||
|
||||
export const options: RequestHandler = async () => {
|
||||
return {
|
||||
status: 200,
|
||||
status: 204,
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const defaultTheme = require('tailwindcss/defaultTheme');
|
||||
const colors = require('tailwindcss/colors');
|
||||
// const colors = require('tailwindcss/colors');
|
||||
module.exports = {
|
||||
content: ['./**/*.html', './src/**/*.{js,jsx,ts,tsx,svelte}'],
|
||||
important: true,
|
||||
@@ -18,7 +18,6 @@ module.exports = {
|
||||
sans: ['Poppins', ...defaultTheme.fontFamily.sans]
|
||||
},
|
||||
colors: {
|
||||
...colors,
|
||||
coollabs: '#6B16ED',
|
||||
'coollabs-100': '#7317FF',
|
||||
coolblack: '#161616',
|
||||
|
||||
Reference in New Issue
Block a user