Merge pull request #189 from coollabsio/next

v2.0.21
This commit is contained in:
Andras Bacsai 2022-02-24 10:17:38 +01:00 committed by GitHub
commit 0195213dfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 355 additions and 377 deletions

View File

@ -1,7 +1,7 @@
{
"name": "coolify",
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
"version": "2.0.20",
"version": "2.0.21",
"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,31 +25,31 @@
"prepare": "husky install"
},
"devDependencies": {
"@sveltejs/adapter-node": "1.0.0-next.68",
"@sveltejs/adapter-node": "1.0.0-next.69",
"@sveltejs/adapter-static": "1.0.0-next.28",
"@sveltejs/kit": "1.0.0-next.278",
"@sveltejs/kit": "1.0.0-next.283",
"@types/bcrypt": "5.0.0",
"@types/js-cookie": "3.0.1",
"@types/node": "17.0.18",
"@types/node": "17.0.20",
"@types/node-forge": "1.0.0",
"@typescript-eslint/eslint-plugin": "4.31.1",
"@typescript-eslint/parser": "4.31.1",
"@zerodevx/svelte-toast": "0.6.3",
"@zerodevx/svelte-toast": "0.7.0",
"autoprefixer": "10.4.2",
"cross-var": "1.1.0",
"eslint": "7.32.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-svelte3": "3.2.1",
"eslint-config-prettier": "8.4.0",
"eslint-plugin-svelte3": "3.4.0",
"husky": "7.0.4",
"lint-staged": "12.3.4",
"postcss": "8.4.6",
"prettier": "2.5.1",
"prettier-plugin-svelte": "2.6.0",
"prettier-plugin-tailwindcss": "0.1.7",
"prisma": "3.9.2",
"prisma": "3.10.0",
"svelte": "3.46.4",
"svelte-check": "2.4.3",
"svelte-preprocess": "4.10.3",
"svelte-check": "2.4.5",
"svelte-preprocess": "4.10.4",
"tailwindcss": "3.0.23",
"ts-node": "10.5.0",
"tslib": "2.3.1",
@ -58,10 +58,10 @@
"type": "module",
"dependencies": {
"@iarna/toml": "2.2.5",
"@prisma/client": "3.9.2",
"@prisma/client": "3.10.0",
"@sentry/node": "6.17.9",
"bcrypt": "5.0.1",
"bullmq": "1.73.0",
"bullmq": "1.74.2",
"compare-versions": "4.1.3",
"cookie": "0.4.2",
"cuid": "2.1.8",
@ -69,7 +69,7 @@
"dockerode": "3.3.1",
"dotenv-extended": "2.9.0",
"generate-password": "1.7.0",
"get-port": "6.1.0",
"get-port": "6.1.1",
"got": "12.0.1",
"js-cookie": "3.0.1",
"js-yaml": "4.1.0",

132
pnpm-lock.yaml generated
View File

@ -2,21 +2,21 @@ lockfileVersion: 5.3
specifiers:
'@iarna/toml': 2.2.5
'@prisma/client': 3.9.2
'@prisma/client': 3.10.0
'@sentry/node': 6.17.9
'@sveltejs/adapter-node': 1.0.0-next.68
'@sveltejs/adapter-node': 1.0.0-next.69
'@sveltejs/adapter-static': 1.0.0-next.28
'@sveltejs/kit': 1.0.0-next.278
'@sveltejs/kit': 1.0.0-next.283
'@types/bcrypt': 5.0.0
'@types/js-cookie': 3.0.1
'@types/node': 17.0.18
'@types/node': 17.0.20
'@types/node-forge': 1.0.0
'@typescript-eslint/eslint-plugin': 4.31.1
'@typescript-eslint/parser': 4.31.1
'@zerodevx/svelte-toast': 0.6.3
'@zerodevx/svelte-toast': 0.7.0
autoprefixer: 10.4.2
bcrypt: 5.0.1
bullmq: 1.73.0
bullmq: 1.74.2
compare-versions: 4.1.3
cookie: 0.4.2
cross-var: 1.1.0
@ -25,10 +25,10 @@ specifiers:
dockerode: 3.3.1
dotenv-extended: 2.9.0
eslint: 7.32.0
eslint-config-prettier: 8.3.0
eslint-plugin-svelte3: 3.2.1
eslint-config-prettier: 8.4.0
eslint-plugin-svelte3: 3.4.0
generate-password: 1.7.0
get-port: 6.1.0
get-port: 6.1.1
got: 12.0.1
husky: 7.0.4
js-cookie: 3.0.1
@ -40,11 +40,11 @@ specifiers:
prettier: 2.5.1
prettier-plugin-svelte: 2.6.0
prettier-plugin-tailwindcss: 0.1.7
prisma: 3.9.2
prisma: 3.10.0
svelte: 3.46.4
svelte-check: 2.4.3
svelte-check: 2.4.5
svelte-kit-cookie-session: 2.1.2
svelte-preprocess: 4.10.3
svelte-preprocess: 4.10.4
tailwindcss: 3.0.23
tailwindcss-scrollbar: ^0.1.0
ts-node: 10.5.0
@ -54,10 +54,10 @@ specifiers:
dependencies:
'@iarna/toml': 2.2.5
'@prisma/client': 3.9.2_prisma@3.9.2
'@prisma/client': 3.10.0_prisma@3.10.0
'@sentry/node': 6.17.9
bcrypt: 5.0.1
bullmq: 1.73.0
bullmq: 1.74.2
compare-versions: 4.1.3
cookie: 0.4.2
cuid: 2.1.8
@ -65,7 +65,7 @@ dependencies:
dockerode: 3.3.1
dotenv-extended: 2.9.0
generate-password: 1.7.0
get-port: 6.1.0
get-port: 6.1.1
got: 12.0.1
js-cookie: 3.0.1
js-yaml: 4.1.0
@ -76,33 +76,33 @@ dependencies:
unique-names-generator: 4.7.1
devDependencies:
'@sveltejs/adapter-node': 1.0.0-next.68
'@sveltejs/adapter-node': 1.0.0-next.69
'@sveltejs/adapter-static': 1.0.0-next.28
'@sveltejs/kit': 1.0.0-next.278_svelte@3.46.4
'@sveltejs/kit': 1.0.0-next.283_svelte@3.46.4
'@types/bcrypt': 5.0.0
'@types/js-cookie': 3.0.1
'@types/node': 17.0.18
'@types/node': 17.0.20
'@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
'@zerodevx/svelte-toast': 0.6.3
'@zerodevx/svelte-toast': 0.7.0
autoprefixer: 10.4.2_postcss@8.4.6
cross-var: 1.1.0
eslint: 7.32.0
eslint-config-prettier: 8.3.0_eslint@7.32.0
eslint-plugin-svelte3: 3.2.1_eslint@7.32.0+svelte@3.46.4
eslint-config-prettier: 8.4.0_eslint@7.32.0
eslint-plugin-svelte3: 3.4.0_eslint@7.32.0+svelte@3.46.4
husky: 7.0.4
lint-staged: 12.3.4
postcss: 8.4.6
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
prisma: 3.9.2
prisma: 3.10.0
svelte: 3.46.4
svelte-check: 2.4.3_postcss@8.4.6+svelte@3.46.4
svelte-preprocess: 4.10.3_88b359da5cac6d8f6ee1bbb7080a3fa9
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_f3bd4037939c2ed2942ba074291f8ef2
ts-node: 10.5.0_e04e69b201f218c8d0d59acefc9ea8a6
tslib: 2.3.1
typescript: 4.5.5
@ -252,10 +252,10 @@ packages:
fastq: 1.13.0
dev: true
/@prisma/client/3.9.2_prisma@3.9.2:
/@prisma/client/3.10.0_prisma@3.10.0:
resolution:
{
integrity: sha512-VlEIYVMyfFZHbVBOlunPl47gmP/Z0zzPjPj8I7uKEIaABqrUy50ru3XS0aZd8GFvevVwt7p91xxkUjNjrWhKAQ==
integrity: sha512-6P4sV7WFuODSfSoSEzCH1qfmWMrCUBk1LIIuTbQf6m1LI/IOpLN4lnqGDmgiBGprEzuWobnGLfe9YsXLn0inrg==
}
engines: { node: '>=12.6' }
requiresBuild: true
@ -265,21 +265,21 @@ packages:
prisma:
optional: true
dependencies:
'@prisma/engines-version': 3.9.0-58.bcc2ff906db47790ee902e7bbc76d7ffb1893009
prisma: 3.9.2
'@prisma/engines-version': 3.10.0-50.73e60b76d394f8d37d8ebd1f8918c79029f0db86
prisma: 3.10.0
dev: false
/@prisma/engines-version/3.9.0-58.bcc2ff906db47790ee902e7bbc76d7ffb1893009:
/@prisma/engines-version/3.10.0-50.73e60b76d394f8d37d8ebd1f8918c79029f0db86:
resolution:
{
integrity: sha512-5Dh+qTDhpPR66w6NNAnPs+/W/Qt4r1DSd+qhfPFcDThUK4uxoZKGlPb2IYQn5LL+18aIGnmteDf7BnVMmvBNSQ==
integrity: sha512-cVYs5gyQH/qyut24hUvDznCfPrWiNMKNfPb9WmEoiU6ihlkscIbCfkmuKTtspVLWRdl0LqjYEC7vfnPv17HWhw==
}
dev: false
/@prisma/engines/3.9.0-58.bcc2ff906db47790ee902e7bbc76d7ffb1893009:
/@prisma/engines/3.10.0-50.73e60b76d394f8d37d8ebd1f8918c79029f0db86:
resolution:
{
integrity: sha512-qM+uJbkelB21bnK44gYE049YTHIjHysOuj0mj5U2gDGyNLfmiazlggzFPCgEjgme4U5YB2tYs6Z5Hq08Kl8pjA==
integrity: sha512-LjRssaWu9w2SrXitofnutRIyURI7l0veQYIALz7uY4shygM9nMcK3omXcObRm7TAcw3Z+9ytfK1B+ySOsOesxQ==
}
requiresBuild: true
dev: true
@ -394,10 +394,10 @@ packages:
engines: { node: '>=10' }
dev: false
/@sveltejs/adapter-node/1.0.0-next.68:
/@sveltejs/adapter-node/1.0.0-next.69:
resolution:
{
integrity: sha512-MiEjtl15Aupm6bjirVlq0kkc9AL8qDXz/blsh4jYMsaiidmcEHeDgfZQFM5YiXy95DbxV30MAkhwCQiYK/J8Kw==
integrity: sha512-tVKwJ8vYG4NGFJ5L+tRuyRglGPaJ1khNqTKq4bYIUahk/pjXIu9USbMmFtNHd6IyDdxjPtRoVwHubAYfTQLTpg==
}
dependencies:
tiny-glob: 0.2.9
@ -412,10 +412,10 @@ packages:
tiny-glob: 0.2.9
dev: true
/@sveltejs/kit/1.0.0-next.278_svelte@3.46.4:
/@sveltejs/kit/1.0.0-next.283_svelte@3.46.4:
resolution:
{
integrity: sha512-WT93Wnu05X9WG9BMMk/dj0gy6R7iXm9aXRDVgmIl9z8jT2ukejgmkhi5IwBYrK0OMIUALRVfukn+iy+srPc91Q==
integrity: sha512-QFhL7cdBKXUKhJ3sHZnL7q07Eohc54N7OpX2ZsJuNTA43Z6vX/HF/Jh4TK62kqT+thDVlT5J1iEEMppxA2IxoQ==
}
engines: { node: '>=14.13' }
hasBin: true
@ -504,7 +504,7 @@ packages:
integrity: sha512-agtcFKaruL8TmcvqbndlqHPSJgsolhf/qPWchFlgnW1gECTN/nKbFcoFnvKAQRFfKbh+BO6A3SWdJu9t+xF3Lw==
}
dependencies:
'@types/node': 17.0.18
'@types/node': 17.0.20
dev: true
/@types/cacheable-request/6.0.2:
@ -515,7 +515,7 @@ packages:
dependencies:
'@types/http-cache-semantics': 4.0.1
'@types/keyv': 3.1.3
'@types/node': 17.0.18
'@types/node': 17.0.20
'@types/responselike': 1.0.0
dev: false
@ -546,7 +546,7 @@ packages:
integrity: sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==
}
dependencies:
'@types/node': 17.0.18
'@types/node': 17.0.20
dev: false
/@types/node-forge/1.0.0:
@ -555,13 +555,13 @@ packages:
integrity: sha512-h0bgwPKq5u99T9Gor4qtV1lCZ41xNkai0pie1n/a2mh2/4+jENWOlo7AJ4YKxTZAnSZ8FRurUpdIN7ohaPPuHA==
}
dependencies:
'@types/node': 17.0.18
'@types/node': 17.0.20
dev: true
/@types/node/17.0.18:
/@types/node/17.0.20:
resolution:
{
integrity: sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==
integrity: sha512-Q15Clj3lZSLnhVA6yKw1G7SQz46DeL9gO1TEgfK1OQGvMdQ6TUWmCeWf1QBUNkw2BDfV52i2YuYd9OF3ZwGhjw==
}
/@types/parse-json/4.0.0:
@ -584,7 +584,7 @@ packages:
integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==
}
dependencies:
'@types/node': 17.0.18
'@types/node': 17.0.20
dev: false
/@types/sass/1.16.1:
@ -593,7 +593,7 @@ packages:
integrity: sha512-iZUcRrGuz/Tbg3loODpW7vrQJkUtpY2fFSf4ELqqkApcS2TkZ1msk7ie8iZPB86lDOP8QOTTmuvWjc5S0R9OjQ==
}
dependencies:
'@types/node': 17.0.18
'@types/node': 17.0.20
dev: true
/@typescript-eslint/eslint-plugin/4.31.1_5d7752337e5ea49772097d8af1823bf9:
@ -722,10 +722,10 @@ packages:
eslint-visitor-keys: 2.1.0
dev: true
/@zerodevx/svelte-toast/0.6.3:
/@zerodevx/svelte-toast/0.7.0:
resolution:
{
integrity: sha512-k0W1JFoqHIcIQaP9ij99+Rv0ugaQSSNwOuNwwmTGRjWtIqrQr+ExLDE8LQGXLlJIprqDyMWB4lJkUql/r0RAtA==
integrity: sha512-Xvpy1dTE/bUcYJKrbBxc5KuXtbwhyUjEzmTNtg92bS558SvsH6FDu02pgFbBWNjK9g9f2eQCDBhBhJM4q6vhDw==
}
dev: true
@ -1748,10 +1748,10 @@ packages:
ieee754: 1.2.1
dev: false
/bullmq/1.73.0:
/bullmq/1.74.2:
resolution:
{
integrity: sha512-+BF7yeGagYD/iMkM3FA8Wvb3j3MyKE/OdXv404+nQjUsKXfL7PbqX5NSA9lBtFzOdyFx9ZWyKRnBwuGQsLfM0w==
integrity: sha512-qf0xjF3NDbZqi6ovxAA9QPrPdEgl3BrdYzQO5Pr+ECNIfscLpSXz87kVXI0oTPeDqxw5EJx4sh8EFf2RvVPYTg==
}
dependencies:
cron-parser: 2.18.0
@ -2706,10 +2706,10 @@ packages:
engines: { node: '>=10' }
dev: true
/eslint-config-prettier/8.3.0_eslint@7.32.0:
/eslint-config-prettier/8.4.0_eslint@7.32.0:
resolution:
{
integrity: sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==
integrity: sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==
}
hasBin: true
peerDependencies:
@ -2718,10 +2718,10 @@ packages:
eslint: 7.32.0
dev: true
/eslint-plugin-svelte3/3.2.1_eslint@7.32.0+svelte@3.46.4:
/eslint-plugin-svelte3/3.4.0_eslint@7.32.0+svelte@3.46.4:
resolution:
{
integrity: sha512-YoBR9mLoKCjGghJ/gvpnFZKaMEu/VRcuxpSRS8KuozuEo7CdBH7bmBHa6FmMm0i4kJnOyx+PVsaptz96K6H/4Q==
integrity: sha512-MIQUTuRv3o7LyQ+360qOc9mLT35j1I5YzHr04g/UDcvJTpg0X/kHWELY99ve869Rp/9wjqD7I26Aq5H8OH5RIg==
}
engines: { node: '>=10' }
peerDependencies:
@ -3116,10 +3116,10 @@ packages:
engines: { node: '>=8' }
dev: false
/get-port/6.1.0:
/get-port/6.1.1:
resolution:
{
integrity: sha512-JKnPFW/G2ZRirH/25sLK1aLBQktJfQLixzMMuMBP8A2G/ivSaIwdTnlJeO7PWeyhyIGVorezNf6+CXZU9i0cIQ==
integrity: sha512-RQOsDPSd2PcoLwakY1dwEtLiAbTR7IfmnxsKswfcHEfRKKbhWAG2R5Qo7C8ga6Ne4Mq4lFbogXfDGNfqFxwAaw==
}
engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 }
dev: false
@ -4399,7 +4399,7 @@ packages:
dependencies:
import-cwd: 3.0.0
lilconfig: 2.0.4
ts-node: 10.5.0_f3bd4037939c2ed2942ba074291f8ef2
ts-node: 10.5.0_e04e69b201f218c8d0d59acefc9ea8a6
yaml: 1.10.2
dev: true
@ -4488,16 +4488,16 @@ packages:
hasBin: true
dev: true
/prisma/3.9.2:
/prisma/3.10.0:
resolution:
{
integrity: sha512-i9eK6cexV74OgeWaH3+e6S07kvC9jEZTl6BqtBH398nlCU0tck7mE9dicY6YQd+euvMjjCtY89q4NgmaPnUsSg==
integrity: sha512-dAld12vtwdz9Rz01nOjmnXe+vHana5PSog8t0XGgLemKsUVsaupYpr74AHaS3s78SaTS5s2HOghnJF+jn91ZrA==
}
engines: { node: '>=12.6' }
hasBin: true
requiresBuild: true
dependencies:
'@prisma/engines': 3.9.0-58.bcc2ff906db47790ee902e7bbc76d7ffb1893009
'@prisma/engines': 3.10.0-50.73e60b76d394f8d37d8ebd1f8918c79029f0db86
dev: true
/private/0.1.8:
@ -5162,10 +5162,10 @@ packages:
engines: { node: '>= 0.4' }
dev: true
/svelte-check/2.4.3_postcss@8.4.6+svelte@3.46.4:
/svelte-check/2.4.5_postcss@8.4.6+svelte@3.46.4:
resolution:
{
integrity: sha512-0zJMMgqYHoP7QEG3tfc5DekpHAOqoy4QOL8scWMSdHIpVVDVC0MuYK57nFyj3XVTW8Zfm85FlgnAdQYsVmST2Q==
integrity: sha512-nRft8BbG2wcxyCdHDZ7X43xLcvDzua3xLwq6wzHGcAF3ka3Jyhv2rvgq0+SF9NwHLMefp9C2XkM6etzsxK/cMQ==
}
hasBin: true
peerDependencies:
@ -5179,7 +5179,7 @@ packages:
sade: 1.7.4
source-map: 0.7.3
svelte: 3.46.4
svelte-preprocess: 4.10.3_88b359da5cac6d8f6ee1bbb7080a3fa9
svelte-preprocess: 4.10.4_88b359da5cac6d8f6ee1bbb7080a3fa9
typescript: 4.5.5
transitivePeerDependencies:
- '@babel/core'
@ -5212,10 +5212,10 @@ packages:
}
dev: false
/svelte-preprocess/4.10.3_88b359da5cac6d8f6ee1bbb7080a3fa9:
/svelte-preprocess/4.10.4_88b359da5cac6d8f6ee1bbb7080a3fa9:
resolution:
{
integrity: sha512-ttw17lJfb/dx2ZJT9sesaXT5l7mPQ9Apx1H496Kli3Hkk7orIRGpOw6rCPkRNzr6ueVPqb4vzodS5x7sBFhKHw==
integrity: sha512-fuwol0N4UoHsNQolLFbMqWivqcJ9N0vfWO9IuPAiX/5okfoGXURyJ6nECbuEIv0nU3M8Xe2I1ONNje2buk7l6A==
}
engines: { node: '>= 9.11.2' }
requiresBuild: true
@ -5420,7 +5420,7 @@ packages:
engines: { node: '>=0.10.0' }
dev: true
/ts-node/10.5.0_f3bd4037939c2ed2942ba074291f8ef2:
/ts-node/10.5.0_e04e69b201f218c8d0d59acefc9ea8a6:
resolution:
{
integrity: sha512-6kEJKwVxAJ35W4akuiysfKwKmjkbYxwQMTBaAxo9KKAx/Yd26mPUyhGz3ji+EsJoAgrLqVsYHNuuYwQe22lbtw==
@ -5442,7 +5442,7 @@ packages:
'@tsconfig/node12': 1.0.9
'@tsconfig/node14': 1.0.1
'@tsconfig/node16': 1.0.2
'@types/node': 17.0.18
'@types/node': 17.0.20
acorn: 8.5.0
acorn-walk: 8.2.0
arg: 4.1.3

View File

@ -54,9 +54,9 @@ model Team {
permissions Permission[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
database Database[] @relation(fields: [databaseId], references: [id])
database Database[] @relation(references: [id])
databaseId String?
service Service[] @relation(fields: [serviceId], references: [id])
service Service[] @relation(references: [id])
serviceId String?
}

View File

@ -1,112 +0,0 @@
#!/usr/bin/env bash
clear
ARG1=$1
WHO=$(whoami)
APP_ID=$(cat /proc/sys/kernel/random/uuid)
RANDOM_SECRET=$(echo $(($(date +%s%N) / 1000000)) | sha256sum | base64 | head -c 32)
SENTRY_DSN="https://9e7a74326f29422584d2d0bebdc8b7d3@o1082494.ingest.sentry.io/6091062"
DOCKER_MAJOR=20
DOCKER_MINOR=10
DOCKER_VERSION_OK="nok"
set -eou pipefail
if [ $ARG1 ] && [ $ARG1 == "-d" ]; then
set -x
fi
function errorchecker() {
exitCode=$?
if [ $exitCode -ne "0" ]; then
echo "$0 exited unexpectedly with status: $exitCode"
exit $exitCode
fi
}
trap 'errorchecker' EXIT
echo -e "Welcome to Coolify installer! \n"
echo "This script will install all the required packages and services to run Coolify."
echo -e "If you want to install Coolify on a different OS, please open an issue on Github to get supported version.\n\n"
echo -e "To see what I'm doing, please check:"
echo -e "https://github.com/coollabsio/get.coollabs.io/blob/main/static/coolify/install_v2.sh\n\n"
if [ $WHO != 'root' ]; then
echo 'Run as root please: sudo sh -c "$(curl -fsSL https://get.coollabs.io/coolify/install.sh)"'
exit 1
fi
if [ ! -x "$(command -v docker)" ]; then
while true; do
read -p "Docker Engine not found, should I install it automatically? [Yy/Nn] " yn
case $yn in
[Yy]*)
sh -c "$(curl -fsSL https://get.docker.com)"
break
;;
[Nn]*)
echo "Please install docker manually and update it to the latest, but at least to $DOCKER_MAJOR.$DOCKER_MINOR"
exit 0
;;
*) echo "Please answer Y or N." ;;
esac
done
fi
SERVER_VERSION=$(docker version -f "{{.Server.Version}}")
SERVER_VERSION_MAJOR=$(echo "$SERVER_VERSION" | cut -d'.' -f 1)
SERVER_VERSION_MINOR=$(echo "$SERVER_VERSION" | cut -d'.' -f 2)
if [ "$SERVER_VERSION_MAJOR" -ge "$DOCKER_MAJOR" ] &&
[ "$SERVER_VERSION_MINOR" -ge "$DOCKER_MINOR" ]; then
DOCKER_VERSION_OK="ok"
fi
if [ $DOCKER_VERSION_OK == 'nok' ]; then
echo "Docker version less than $DOCKER_MAJOR.$DOCKER_MINOR, please update it to at least to $DOCKER_MAJOR.$DOCKER_MINOR"
exit 1
fi
# Adding docker daemon configuration
cat <<EOF >/etc/docker/daemon.json
{
"log-driver": "json-file",
"log-opts": {
"max-size": "100m",
"max-file": "5"
},
"features": {
"buildkit": true
},
"live-restore": true
}
EOF
# Restarting docker daemon
sh -c "systemctl daemon-reload && systemctl restart docker"
# Downloading docker compose cli plugin
mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
# Making base directory for coolify
if [ ! -d coolify ]; then
mkdir coolify
fi
if [ -f coolify/.env ]; then
echo -e "Coolify is already installed, using some of the existing settings."
else
echo "COOLIFY_APP_ID=$APP_ID
COOLIFY_SECRET_KEY=$RANDOM_SECRET
COOLIFY_DATABASE_URL=file:../db/prod.db
COOLIFY_SENTRY_DSN=$SENTRY_DSN
COOLIFY_HOSTED_ON=docker" > coolify/.env
fi
cd coolify && docker run -tid --env-file .env -v /var/run/docker.sock:/var/run/docker.sock -v coolify-db-sqlite coollabsio/coolify:latest /bin/sh -c "env | grep COOLIFY > .env && docker compose up -d --force-recreate"
echo -e "Congratulations! Your coolify is ready to use.\n"
echo "Please visit http://<Your Public IP Address>:3000/ to get started."
echo "It will take a few minutes to start up, don't worry."

View File

@ -1,114 +0,0 @@
#!/usr/bin/env bash
clear
ARG1=$1
WHO=$(whoami)
APP_ID=$(cat /proc/sys/kernel/random/uuid)
RANDOM_SECRET=$(echo $(($(date +%s%N) / 1000000)) | sha256sum | base64 | head -c 32)
SENTRY_DSN="https://9e7a74326f29422584d2d0bebdc8b7d3@o1082494.ingest.sentry.io/6091062"
UBUNTU_MAJOR_MIN=20
UBUNTU_MINOR_MIN=04
OS_OK="nok"
set -eou pipefail
if [ $ARG1 ] && [ $ARG1 == "-d" ]; then
set -x
fi
function errorchecker() {
exitCode=$?
if [ $exitCode -ne "0" ]; then
echo "$0 exited unexpectedly with status: $exitCode"
exit $exitCode
fi
}
trap 'errorchecker' EXIT
if [ $WHO != 'root' ]; then
echo 'Run as root please: sudo sh -c "$(curl -fsSL https://get.coollabs.io/coolify/install.sh)"'
exit 1
fi
. /etc/lsb-release
if [ $DISTRIB_ID != 'Ubuntu' ]; then
echo 'Not supported OS, please open an issue on Github to get supported version.'
exit 1
fi
DISTRIB_RELEASE_MAJOR=$(echo "$DISTRIB_RELEASE" | cut -d'.' -f 1)
DISTRIB_RELEASE_MINOR=$(echo "$DISTRIB_RELEASE" | cut -d'.' -f 2)
if [ "$DISTRIB_RELEASE_MAJOR" -ge "$UBUNTU_MAJOR_MIN" ] &&
[ "$DISTRIB_RELEASE_MINOR" -ge "$UBUNTU_MINOR_MIN" ]; then
OS_OK="ok"
fi
if [ $OS_OK == 'nok' ]; then
echo "Ubuntu version less than $UBUNTU_MAJOR_MIN.$UBUNTU_MINOR_MIN."
exit 1
fi
function installPodman() {
apt-get update -y
apt-get install curl wget gnupg2 -y
if [ "$DISTRIB_RELEASE_MAJOR" -eq "20" ] && [ "$DISTRIB_RELEASE_MINOR" -eq "04" ]; then
echo 'Installing on 20.04'
source /etc/os-release
sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | apt-key add -
apt-get update -y
apt-get -y install podman
return 0
elif [ "$DISTRIB_RELEASE_MAJOR" -eq "20" ] && [ "$DISTRIB_RELEASE_MINOR" -eq "10" ]; then
apt-get -y install podman
return 0
elif [ "$DISTRIB_RELEASE_MAJOR" -gt "20" ]; then
apt-get -y install podman
return 0
else
exit 1
fi
}
if [ ! -x "$(command -v podman)" ]; then
while true; do
read -p "Podman not found, should I install it automatically? [Yy/Nn] " yn
case $yn in
[Yy]*)
installPodman
break
;;
[Nn]*)
echo "Please install docker manually and update it to the latest, but at least to $DOCKER_MAJOR.$DOCKER_MINOR"
exit 0
;;
*) echo "Please answer Yy or Nn." ;;
esac
done
fi
# Making base directory for coolify
if [ ! -d coolify ]; then
mkdir coolify
fi
echo "COOLIFY_APP_ID=$APP_ID
COOLIFY_SECRET_KEY=$RANDOM_SECRET
COOLIFY_DATABASE_URL=file:../db/prod.db
COOLIFY_SENTRY_DSN=$SENTRY_DSN
COOLIFY_HOSTED_ON=docker" >coolify/.env
systemctl start podman.socket
systemctl enable podman.socket
podman volume create coolify-db
podman volume create coolify-ssl-certs
podman volume create coolify-letsencrypt
cd coolify && podman run --privileged -tid --env-file .env -v /var/run/podman/podman.sock:/var/run/podman/podman.sock -v coolify-db-sqlite:/app/db docker.io/coollabsio/coolify:latest /bin/sh -c "env | grep COOLIFY > .env && docker-compose up -d --force-recreate"
echo "Done"
exit 0

View File

@ -10,6 +10,8 @@ import nuxtjs from './nuxtjs';
import vuejs from './vuejs';
import php from './php';
import rust from './rust';
import astro from './static';
import eleventy from './static';
export {
node,
@ -23,5 +25,7 @@ export {
nuxtjs,
vuejs,
php,
rust
rust,
astro,
eleventy
};

View File

@ -31,6 +31,8 @@
<textarea
rows="5"
class={disabledClass}
class:pr-10={true}
class:pr-20={value && isHttps}
{placeholder}
type="text"
{id}
@ -44,6 +46,8 @@
<input
class={disabledClass}
type="text"
class:pr-10={true}
class:pr-20={value && isHttps}
{id}
{name}
{required}
@ -57,6 +61,8 @@
{:else}
<input
class={disabledClass}
class:pr-10={true}
class:pr-20={value && isHttps}
type="password"
{id}
{name}

View File

@ -126,6 +126,26 @@ export function findBuildPack(pack, packageManager = 'npm') {
port: 3000
};
}
if (pack === 'astro') {
return {
...metaData,
installCommand: `yarn install`,
buildCommand: `yarn build`,
startCommand: null,
publishDirectory: `dist`,
port: 80
};
}
if (pack === 'eleventy') {
return {
...metaData,
installCommand: `yarn install`,
buildCommand: `yarn build`,
startCommand: null,
publishDirectory: `_site`,
port: 80
};
}
return {
name: 'node',
fancyName: 'Node.js',
@ -145,7 +165,6 @@ export const buildPacks = [
hoverColor: 'hover:bg-green-700',
color: 'bg-green-700'
},
{
name: 'static',
fancyName: 'Static',
@ -158,36 +177,18 @@ export const buildPacks = [
hoverColor: 'hover:bg-sky-700',
color: 'bg-sky-700'
},
{
name: 'php',
fancyName: 'PHP',
hoverColor: 'hover:bg-indigo-700',
color: 'bg-indigo-700'
},
{
name: 'svelte',
fancyName: 'Svelte',
hoverColor: 'hover:bg-orange-700',
color: 'bg-orange-700'
},
{
name: 'nestjs',
fancyName: 'NestJS',
hoverColor: 'hover:bg-red-700',
color: 'bg-red-700'
},
{
name: 'react',
fancyName: 'React',
hoverColor: 'hover:bg-blue-700',
color: 'bg-blue-700'
},
{
name: 'nextjs',
fancyName: 'NextJS',
hoverColor: 'hover:bg-blue-700',
color: 'bg-blue-700'
},
{
name: 'gatsby',
fancyName: 'Gatsby',
hoverColor: 'hover:bg-blue-700',
color: 'bg-blue-700'
},
{
name: 'vuejs',
fancyName: 'VueJS',
@ -200,6 +201,31 @@ export const buildPacks = [
hoverColor: 'hover:bg-green-700',
color: 'bg-green-700'
},
{
name: 'gatsby',
fancyName: 'Gatsby',
hoverColor: 'hover:bg-blue-700',
color: 'bg-blue-700'
},
{
name: 'astro',
fancyName: 'Astro',
hoverColor: 'hover:bg-pink-700',
color: 'bg-pink-700'
},
{
name: 'eleventy',
fancyName: 'Eleventy',
hoverColor: 'hover:bg-red-700',
color: 'bg-red-700'
},
{
name: 'react',
fancyName: 'React',
hoverColor: 'hover:bg-blue-700',
color: 'bg-blue-700'
},
{
name: 'preact',
fancyName: 'Preact',
@ -207,10 +233,16 @@ export const buildPacks = [
color: 'bg-blue-700'
},
{
name: 'php',
fancyName: 'PHP',
hoverColor: 'hover:bg-indigo-700',
color: 'bg-indigo-700'
name: 'nextjs',
fancyName: 'NextJS',
hoverColor: 'hover:bg-blue-700',
color: 'bg-blue-700'
},
{
name: 'nestjs',
fancyName: 'NestJS',
hoverColor: 'hover:bg-red-700',
color: 'bg-red-700'
},
{
name: 'rust',
@ -220,6 +252,12 @@ export const buildPacks = [
}
];
export const scanningTemplates = {
astro: {
buildPack: 'astro'
},
'@11ty/eleventy': {
buildPack: 'eleventy'
},
svelte: {
buildPack: 'svelte'
},

View File

@ -10,13 +10,18 @@ export async function hashPassword(password: string) {
const saltRounds = 15;
return bcrypt.hash(password, saltRounds);
}
export async function login({ email, password }) {
export async function login({ email, password, isLogin }) {
const users = await prisma.user.count();
const userFound = await prisma.user.findUnique({
where: { email },
include: { teams: true, permission: true },
rejectOnNotFound: false
});
if (!userFound && isLogin) {
throw {
error: 'Wrong password or email address.'
};
}
// Registration disabled if database is not seeded properly
const { isRegistrationEnabled, id } = await db.listSettings();

View File

@ -4,35 +4,39 @@ import { prisma } from '$lib/database';
import { defaultProxyImageHttp, defaultProxyImageTcp } from '$lib/haproxy';
export default async function () {
if (!dev) {
const destinationDockers = await prisma.destinationDocker.findMany();
for (const destinationDocker of destinationDockers) {
const host = getEngine(destinationDocker.engine);
// Tagging images with labels
try {
const images = [
`coollabsio/${defaultProxyImageTcp}`,
`coollabsio/${defaultProxyImageHttp}`,
'certbot/certbot:latest',
'node:16.14.0-alpine',
'alpine:latest',
'nginx:stable-alpine',
'node:lts',
'php:apache',
'rust:latest'
];
for (const image of images) {
const destinationDockers = await prisma.destinationDocker.findMany();
for (const destinationDocker of destinationDockers) {
const host = getEngine(destinationDocker.engine);
// Tagging images with labels
try {
const images = [
`coollabsio/${defaultProxyImageTcp}`,
`coollabsio/${defaultProxyImageHttp}`,
'certbot/certbot:latest',
'node:16.14.0-alpine',
'alpine:latest',
'nginx:stable-alpine',
'node:lts',
'php:apache',
'rust:latest'
];
for (const image of images) {
try {
await asyncExecShell(`DOCKER_HOST=${host} docker image inspect ${image}`);
} catch (error) {
await asyncExecShell(
`DOCKER_HOST=${host} docker pull ${image} && echo "FROM ${image}" | docker build --label coolify.image="true" -t "${image}" -`
);
}
} catch (error) {}
try {
await asyncExecShell(`DOCKER_HOST=${host} docker container prune -f`);
} catch (error) {
console.log(error);
}
// Cleanup images that are not managed by coolify
} catch (error) {}
try {
await asyncExecShell(`DOCKER_HOST=${host} docker container prune -f`);
} catch (error) {
console.log(error);
}
if (!dev) {
//Cleanup images that are not managed by coolify
try {
await asyncExecShell(
`DOCKER_HOST=${host} docker image prune --filter 'label!=coolify.image=true' -a -f`
@ -40,12 +44,12 @@ export default async function () {
} catch (error) {
console.log(error);
}
// Cleanup dangling images
try {
await asyncExecShell(`DOCKER_HOST=${host} docker image prune -f`);
} catch (error) {
console.log(error);
}
}
// Cleanup dangling images
try {
await asyncExecShell(`DOCKER_HOST=${host} docker image prune -f`);
} catch (error) {
console.log(error);
}
}
}

View File

@ -87,7 +87,7 @@ const cron = async () => {
await queue.proxy.add('proxy', {}, { repeat: { every: 10000 } });
// await queue.ssl.add('ssl', {}, { repeat: { every: 10000 } });
if (!dev) await queue.cleanup.add('cleanup', {}, { repeat: { every: 600000 } });
await queue.cleanup.add('cleanup', {}, { repeat: { every: 600000 } });
await queue.sslRenew.add('sslRenew', {}, { repeat: { every: 1800000 } });
const events = {

View File

@ -1,5 +1,6 @@
export const publicPaths = [
'/login',
'/register',
'/reset',
'/reset/password',
'/webhooks/success',

View File

@ -35,6 +35,9 @@
import { get } from '$lib/api';
import { errorNotification } from '$lib/form';
import { gitTokens } from '$lib/store';
import { browser } from '$app/env';
const { id } = $page.params;
let scanning = true;
let foundConfig = null;
@ -83,7 +86,7 @@
if (pnpmLock) packageManager = 'pnpm';
if (dockerfile) {
foundConfig.buildPack = 'docker';
foundConfig = findBuildPack('docker', packageManager);
} else if (packageJson) {
const path = packageJson.path;
const data = await get(
@ -127,7 +130,7 @@
if (pnpmLock) packageManager = 'pnpm';
if (dockerfile) {
foundConfig.buildPack = 'docker';
foundConfig = findBuildPack('docker', packageManager);
} else if (packageJson) {
const data = await get(`${packageJson.git_url}`, {
Authorization: `Bearer ${$gitTokens.githubToken}`,
@ -175,6 +178,8 @@
}
}
if (error.message === 'Bad credentials') {
const { token } = await get(`/applications/${id}/configuration/githubToken.json`);
$gitTokens.githubToken = token;
browser && window.location.reload();
}
return errorNotification(error);

View File

@ -45,6 +45,8 @@
import { notNodeDeployments, staticDeployments } from '$lib/components/common';
import { toast } from '@zerodevx/svelte-toast';
import { post } from '$lib/api';
import cuid from 'cuid';
import { browser } from '$app/env';
const { id } = $page.params;
let domainEl: HTMLInputElement;
@ -55,6 +57,10 @@
let previews = application.settings.previews;
let dualCerts = application.settings.dualCerts;
if (browser && window.location.hostname === 'demo.coolify.io' && !application.fqdn) {
application.fqdn = `http://${cuid()}.demo.coolify.io`;
}
onMount(() => {
domainEl.focus();
});
@ -255,6 +261,11 @@
<div class="grid grid-cols-2">
<div class="flex-col">
<label for="fqdn" class="pt-2 text-base font-bold text-stone-100">Domain (FQDN)</label>
{#if browser && window.location.hostname === 'demo.coolify.io'}
<Explainer
text="<span class='text-white font-bold'>You can use the predefined random domain name or enter your own domain name.</span>"
/>
{/if}
<Explainer
text="If you specify <span class='text-green-500 font-bold'>https</span>, the application will be accessible only over https. SSL certificate will be generated for you.<br>If you specify <span class='text-green-500 font-bold'>www</span>, the application will be redirected (302) from non-www and vice versa.<br><br>To modify the domain, you must first stop the application.<br><br><span class='text-white font-bold'>You must set your DNS to point to the server IP in advance.</span>"
/>

View File

@ -4,10 +4,10 @@ import { ErrorHandler } from '$lib/database';
import type { RequestHandler } from '@sveltejs/kit';
export const post: RequestHandler = async (event) => {
const { email, password } = await event.request.json();
const { email, password, isLogin } = await event.request.json();
try {
const { body } = await db.login({ email, password });
const { body } = await db.login({ email, password, isLogin });
event.locals.session.data = body;
return {
status: 200

View File

@ -18,7 +18,11 @@
async function handleSubmit() {
loading = true;
try {
const { teamId } = await post(`/login.json`, { email: email.toLowerCase(), password });
const { teamId } = await post(`/login.json`, {
email: email.toLowerCase(),
password,
isLogin: true
});
if (teamId === '0') {
window.location.replace('/settings');
} else {
@ -67,7 +71,13 @@
class:text-stone-600={loading}
class:bg-coollabs={!loading}>{loading ? 'Authenticating...' : 'Login'}</button
>
<button on:click|preventDefault={() => goto('/reset')}>Reset password</button>
<button
on:click|preventDefault={() => goto('/register')}
class="hover:opacity-90 text-white">Register</button
>
<button class="bg-transparent" on:click|preventDefault={() => goto('/reset')}
>Reset password</button
>
</div>
</form>
</div>

View File

@ -0,0 +1,103 @@
<script lang="ts">
export let userCount: number;
import { browser } from '$app/env';
import { goto } from '$app/navigation';
import { session } from '$app/stores';
import { post } from '$lib/api';
import { errorNotification } from '$lib/form';
import { onMount } from 'svelte';
let loading = false;
let emailEl;
let email, password, passwordCheck;
if (browser && $session.userId) {
goto('/');
}
onMount(() => {
emailEl.focus();
});
async function handleSubmit() {
if (password !== passwordCheck) {
return errorNotification('Passwords do not match.');
}
loading = true;
try {
await post(`/login.json`, {
email: email.toLowerCase(),
password,
isLogin: false
});
return window.location.replace('/');
} catch ({ error }) {
return errorNotification(error);
} finally {
loading = false;
}
}
</script>
<div class="icons fixed top-0 left-0 m-3 cursor-pointer" on:click={() => goto('/')}>
<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" />
<line x1="5" y1="12" x2="19" y2="12" />
<line x1="5" y1="12" x2="11" y2="18" />
<line x1="5" y1="12" x2="11" y2="6" />
</svg>
</div>
<div class="flex h-screen flex-col items-center justify-center">
{#if $session.userId}
<div class="flex justify-center px-4 text-xl font-bold">Already logged in...</div>
{:else}
<div class="flex justify-center px-4">
<form on:submit|preventDefault={handleSubmit} class="flex flex-col py-4 space-y-2">
<div class="text-6xl font-bold border-gradient w-48 mx-auto border-b-4">Coolify</div>
<div class="text-xs text-center font-bold pb-10">v{$session.version}</div>
<input
type="email"
name="email"
placeholder="Email"
autocomplete="off"
required
bind:this={emailEl}
bind:value={email}
/>
<input
type="password"
name="password"
placeholder="Password"
bind:value={password}
required
/>
<input
type="password"
name="passwordCheck"
placeholder="Password again"
bind:value={passwordCheck}
required
/>
<div class="flex space-x-2 h-8 items-center justify-center pt-8">
<button type="submit" class="hover:bg-coollabs-100 text-white bg-coollabs"
>Register</button
>
</div>
</form>
</div>
{#if userCount === 0}
<div class="pt-5">
You are registering the first user. It will be the administrator of your Coolify instance.
</div>
{/if}
{/if}
</div>

View File

@ -0,0 +1,11 @@
import * as db from '$lib/database';
import { ErrorHandler } from '$lib/database';
import type { RequestHandler } from '@sveltejs/kit';
export const get: RequestHandler = async () => {
try {
return { status: 200, body: { userCount: await db.prisma.user.count() } };
} catch (error) {
return ErrorHandler(error);
}
};

View File

@ -37,10 +37,16 @@
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';
export let service;
export let isRunning;
export let readOnly;
if (browser && window.location.hostname === 'demo.coolify.io' && !service.fqdn) {
service.fqdn = `http://${cuid()}.demo.coolify.io`;
}
</script>
<div

View File

@ -35,10 +35,10 @@ main,
}
input {
@apply h-12 w-96 rounded border border-transparent bg-transparent bg-coolgray-200 p-2 pr-20 text-xs tracking-tight text-white placeholder-stone-600 outline-none transition duration-150 hover:bg-coolgray-500 focus:bg-coolgray-500 disabled:border disabled:border-dashed disabled:border-coolgray-300 disabled:bg-transparent md:text-sm;
@apply h-12 w-96 rounded border border-transparent bg-transparent bg-coolgray-200 p-2 text-xs tracking-tight text-white placeholder-stone-600 outline-none transition duration-150 hover:bg-coolgray-500 focus:bg-coolgray-500 disabled:border disabled:border-dashed disabled:border-coolgray-300 disabled:bg-transparent md:text-sm;
}
textarea {
@apply min-w-[24rem] rounded border border-transparent bg-transparent bg-coolgray-200 p-2 pr-20 text-xs tracking-tight text-white placeholder-stone-600 outline-none transition duration-150 hover:bg-coolgray-500 focus:bg-coolgray-500 disabled:border disabled:border-dashed disabled:border-coolgray-300 disabled:bg-transparent md:text-sm;
@apply min-w-[24rem] rounded border border-transparent bg-transparent bg-coolgray-200 p-2 text-xs tracking-tight text-white placeholder-stone-600 outline-none transition duration-150 hover:bg-coolgray-500 focus:bg-coolgray-500 disabled:border disabled:border-dashed disabled:border-coolgray-300 disabled:bg-transparent md:text-sm;
}
select {