commit
a116028e1b
18
package.json
18
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "coolify",
|
"name": "coolify",
|
||||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||||
"version": "2.0.11",
|
"version": "2.0.12",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "docker compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev --host 0.0.0.0",
|
"dev": "docker compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev --host 0.0.0.0",
|
||||||
@ -30,7 +30,7 @@
|
|||||||
"@sveltejs/kit": "1.0.0-next.259",
|
"@sveltejs/kit": "1.0.0-next.259",
|
||||||
"@types/bcrypt": "5.0.0",
|
"@types/bcrypt": "5.0.0",
|
||||||
"@types/js-cookie": "3.0.1",
|
"@types/js-cookie": "3.0.1",
|
||||||
"@types/node": "17.0.16",
|
"@types/node": "17.0.18",
|
||||||
"@types/node-forge": "1.0.0",
|
"@types/node-forge": "1.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "4.31.1",
|
"@typescript-eslint/eslint-plugin": "4.31.1",
|
||||||
"@typescript-eslint/parser": "4.31.1",
|
"@typescript-eslint/parser": "4.31.1",
|
||||||
@ -41,16 +41,16 @@
|
|||||||
"eslint-config-prettier": "8.3.0",
|
"eslint-config-prettier": "8.3.0",
|
||||||
"eslint-plugin-svelte3": "3.2.1",
|
"eslint-plugin-svelte3": "3.2.1",
|
||||||
"husky": "7.0.4",
|
"husky": "7.0.4",
|
||||||
"lint-staged": "12.3.3",
|
"lint-staged": "12.3.4",
|
||||||
"postcss": "8.4.6",
|
"postcss": "8.4.6",
|
||||||
"prettier": "2.5.1",
|
"prettier": "2.5.1",
|
||||||
"prettier-plugin-svelte": "2.6.0",
|
"prettier-plugin-svelte": "2.6.0",
|
||||||
"prettier-plugin-tailwindcss": "0.1.7",
|
"prettier-plugin-tailwindcss": "0.1.7",
|
||||||
"prisma": "3.9.1",
|
"prisma": "3.9.2",
|
||||||
"svelte": "3.46.4",
|
"svelte": "3.46.4",
|
||||||
"svelte-check": "2.4.3",
|
"svelte-check": "2.4.3",
|
||||||
"svelte-preprocess": "4.10.3",
|
"svelte-preprocess": "4.10.3",
|
||||||
"tailwindcss": "3.0.19",
|
"tailwindcss": "3.0.22",
|
||||||
"ts-node": "10.5.0",
|
"ts-node": "10.5.0",
|
||||||
"tslib": "2.3.1",
|
"tslib": "2.3.1",
|
||||||
"typescript": "4.5.5"
|
"typescript": "4.5.5"
|
||||||
@ -58,10 +58,10 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iarna/toml": "2.2.5",
|
"@iarna/toml": "2.2.5",
|
||||||
"@prisma/client": "3.9.1",
|
"@prisma/client": "3.9.2",
|
||||||
"@sentry/node": "6.17.6",
|
"@sentry/node": "6.17.8",
|
||||||
"bcrypt": "5.0.1",
|
"bcrypt": "5.0.1",
|
||||||
"bullmq": "1.69.0",
|
"bullmq": "1.72.0",
|
||||||
"compare-versions": "4.1.3",
|
"compare-versions": "4.1.3",
|
||||||
"cookie": "0.4.2",
|
"cookie": "0.4.2",
|
||||||
"cuid": "2.1.8",
|
"cuid": "2.1.8",
|
||||||
@ -75,7 +75,7 @@
|
|||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"jsonwebtoken": "8.5.1",
|
"jsonwebtoken": "8.5.1",
|
||||||
"node-forge": "1.2.1",
|
"node-forge": "1.2.1",
|
||||||
"svelte-kit-cookie-session": "2.0.3",
|
"svelte-kit-cookie-session": "2.0.5",
|
||||||
"unique-names-generator": "4.6.0"
|
"unique-names-generator": "4.6.0"
|
||||||
},
|
},
|
||||||
"prisma": {
|
"prisma": {
|
||||||
|
147
pnpm-lock.yaml
generated
147
pnpm-lock.yaml
generated
@ -2,21 +2,21 @@ lockfileVersion: 5.3
|
|||||||
|
|
||||||
specifiers:
|
specifiers:
|
||||||
'@iarna/toml': 2.2.5
|
'@iarna/toml': 2.2.5
|
||||||
'@prisma/client': 3.9.1
|
'@prisma/client': 3.9.2
|
||||||
'@sentry/node': 6.17.6
|
'@sentry/node': 6.17.8
|
||||||
'@sveltejs/adapter-node': 1.0.0-next.67
|
'@sveltejs/adapter-node': 1.0.0-next.67
|
||||||
'@sveltejs/adapter-static': 1.0.0-next.27
|
'@sveltejs/adapter-static': 1.0.0-next.27
|
||||||
'@sveltejs/kit': 1.0.0-next.259
|
'@sveltejs/kit': 1.0.0-next.259
|
||||||
'@types/bcrypt': 5.0.0
|
'@types/bcrypt': 5.0.0
|
||||||
'@types/js-cookie': 3.0.1
|
'@types/js-cookie': 3.0.1
|
||||||
'@types/node': 17.0.16
|
'@types/node': 17.0.18
|
||||||
'@types/node-forge': 1.0.0
|
'@types/node-forge': 1.0.0
|
||||||
'@typescript-eslint/eslint-plugin': 4.31.1
|
'@typescript-eslint/eslint-plugin': 4.31.1
|
||||||
'@typescript-eslint/parser': 4.31.1
|
'@typescript-eslint/parser': 4.31.1
|
||||||
'@zerodevx/svelte-toast': 0.6.3
|
'@zerodevx/svelte-toast': 0.6.3
|
||||||
autoprefixer: 10.4.2
|
autoprefixer: 10.4.2
|
||||||
bcrypt: 5.0.1
|
bcrypt: 5.0.1
|
||||||
bullmq: 1.69.0
|
bullmq: 1.72.0
|
||||||
compare-versions: 4.1.3
|
compare-versions: 4.1.3
|
||||||
cookie: 0.4.2
|
cookie: 0.4.2
|
||||||
cross-var: 1.1.0
|
cross-var: 1.1.0
|
||||||
@ -34,18 +34,18 @@ specifiers:
|
|||||||
js-cookie: 3.0.1
|
js-cookie: 3.0.1
|
||||||
js-yaml: 4.1.0
|
js-yaml: 4.1.0
|
||||||
jsonwebtoken: 8.5.1
|
jsonwebtoken: 8.5.1
|
||||||
lint-staged: 12.3.3
|
lint-staged: 12.3.4
|
||||||
node-forge: 1.2.1
|
node-forge: 1.2.1
|
||||||
postcss: 8.4.6
|
postcss: 8.4.6
|
||||||
prettier: 2.5.1
|
prettier: 2.5.1
|
||||||
prettier-plugin-svelte: 2.6.0
|
prettier-plugin-svelte: 2.6.0
|
||||||
prettier-plugin-tailwindcss: 0.1.7
|
prettier-plugin-tailwindcss: 0.1.7
|
||||||
prisma: 3.9.1
|
prisma: 3.9.2
|
||||||
svelte: 3.46.4
|
svelte: 3.46.4
|
||||||
svelte-check: 2.4.3
|
svelte-check: 2.4.3
|
||||||
svelte-kit-cookie-session: 2.0.3
|
svelte-kit-cookie-session: 2.0.5
|
||||||
svelte-preprocess: 4.10.3
|
svelte-preprocess: 4.10.3
|
||||||
tailwindcss: 3.0.19
|
tailwindcss: 3.0.22
|
||||||
ts-node: 10.5.0
|
ts-node: 10.5.0
|
||||||
tslib: 2.3.1
|
tslib: 2.3.1
|
||||||
typescript: 4.5.5
|
typescript: 4.5.5
|
||||||
@ -53,10 +53,10 @@ specifiers:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@iarna/toml': 2.2.5
|
'@iarna/toml': 2.2.5
|
||||||
'@prisma/client': 3.9.1_prisma@3.9.1
|
'@prisma/client': 3.9.2_prisma@3.9.2
|
||||||
'@sentry/node': 6.17.6
|
'@sentry/node': 6.17.8
|
||||||
bcrypt: 5.0.1
|
bcrypt: 5.0.1
|
||||||
bullmq: 1.69.0
|
bullmq: 1.72.0
|
||||||
compare-versions: 4.1.3
|
compare-versions: 4.1.3
|
||||||
cookie: 0.4.2
|
cookie: 0.4.2
|
||||||
cuid: 2.1.8
|
cuid: 2.1.8
|
||||||
@ -70,7 +70,7 @@ dependencies:
|
|||||||
js-yaml: 4.1.0
|
js-yaml: 4.1.0
|
||||||
jsonwebtoken: 8.5.1
|
jsonwebtoken: 8.5.1
|
||||||
node-forge: 1.2.1
|
node-forge: 1.2.1
|
||||||
svelte-kit-cookie-session: 2.0.3
|
svelte-kit-cookie-session: 2.0.5
|
||||||
unique-names-generator: 4.6.0
|
unique-names-generator: 4.6.0
|
||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
@ -79,7 +79,7 @@ devDependencies:
|
|||||||
'@sveltejs/kit': 1.0.0-next.259_svelte@3.46.4
|
'@sveltejs/kit': 1.0.0-next.259_svelte@3.46.4
|
||||||
'@types/bcrypt': 5.0.0
|
'@types/bcrypt': 5.0.0
|
||||||
'@types/js-cookie': 3.0.1
|
'@types/js-cookie': 3.0.1
|
||||||
'@types/node': 17.0.16
|
'@types/node': 17.0.18
|
||||||
'@types/node-forge': 1.0.0
|
'@types/node-forge': 1.0.0
|
||||||
'@typescript-eslint/eslint-plugin': 4.31.1_5d7752337e5ea49772097d8af1823bf9
|
'@typescript-eslint/eslint-plugin': 4.31.1_5d7752337e5ea49772097d8af1823bf9
|
||||||
'@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.5.5
|
||||||
@ -90,17 +90,17 @@ devDependencies:
|
|||||||
eslint-config-prettier: 8.3.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-plugin-svelte3: 3.2.1_eslint@7.32.0+svelte@3.46.4
|
||||||
husky: 7.0.4
|
husky: 7.0.4
|
||||||
lint-staged: 12.3.3
|
lint-staged: 12.3.4
|
||||||
postcss: 8.4.6
|
postcss: 8.4.6
|
||||||
prettier: 2.5.1
|
prettier: 2.5.1
|
||||||
prettier-plugin-svelte: 2.6.0_prettier@2.5.1+svelte@3.46.4
|
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.7_prettier@2.5.1
|
||||||
prisma: 3.9.1
|
prisma: 3.9.2
|
||||||
svelte: 3.46.4
|
svelte: 3.46.4
|
||||||
svelte-check: 2.4.3_postcss@8.4.6+svelte@3.46.4
|
svelte-check: 2.4.3_postcss@8.4.6+svelte@3.46.4
|
||||||
svelte-preprocess: 4.10.3_88b359da5cac6d8f6ee1bbb7080a3fa9
|
svelte-preprocess: 4.10.3_88b359da5cac6d8f6ee1bbb7080a3fa9
|
||||||
tailwindcss: 3.0.19_27d966e3a2f4b84fbc8a2f9653dbb362
|
tailwindcss: 3.0.22_c940fbabf228b85b1c73d314b43e31f1
|
||||||
ts-node: 10.5.0_99ae9436e134a034c8d45fdd98ebbf22
|
ts-node: 10.5.0_f3bd4037939c2ed2942ba074291f8ef2
|
||||||
tslib: 2.3.1
|
tslib: 2.3.1
|
||||||
typescript: 4.5.5
|
typescript: 4.5.5
|
||||||
|
|
||||||
@ -250,10 +250,10 @@ packages:
|
|||||||
fastq: 1.13.0
|
fastq: 1.13.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@prisma/client/3.9.1_prisma@3.9.1:
|
/@prisma/client/3.9.2_prisma@3.9.2:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-aLwfXKLvL+loQ0IuPPCXkcq8cXBg1IeoHHa5lqQu3dJHdj45wnislA/Ny4UxRQjD5FXqrfAb8sWtF+jhdmjFTg==
|
integrity: sha512-VlEIYVMyfFZHbVBOlunPl47gmP/Z0zzPjPj8I7uKEIaABqrUy50ru3XS0aZd8GFvevVwt7p91xxkUjNjrWhKAQ==
|
||||||
}
|
}
|
||||||
engines: { node: '>=12.6' }
|
engines: { node: '>=12.6' }
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
@ -264,7 +264,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@prisma/engines-version': 3.9.0-58.bcc2ff906db47790ee902e7bbc76d7ffb1893009
|
'@prisma/engines-version': 3.9.0-58.bcc2ff906db47790ee902e7bbc76d7ffb1893009
|
||||||
prisma: 3.9.1
|
prisma: 3.9.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@prisma/engines-version/3.9.0-58.bcc2ff906db47790ee902e7bbc76d7ffb1893009:
|
/@prisma/engines-version/3.9.0-58.bcc2ff906db47790ee902e7bbc76d7ffb1893009:
|
||||||
@ -293,56 +293,56 @@ packages:
|
|||||||
picomatch: 2.3.0
|
picomatch: 2.3.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@sentry/core/6.17.6:
|
/@sentry/core/6.17.8:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-wSNsQSqsW8vQ2HEvUEXYOJnzTyVDSWbyH4RHrWV1pQM8zqGx/qfz0sKFM5XFnE9ZeaXKL8LXV3v5i73v+z8lew==
|
integrity: sha512-4WTjgQom75Rvgn6XYy6e7vMIbWlj8utau1wWvr7kjqFKuuuuycRvPgVzAdVr4B3WDHHCInAZpUchsOLs2qwIEA==
|
||||||
}
|
}
|
||||||
engines: { node: '>=6' }
|
engines: { node: '>=6' }
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sentry/hub': 6.17.6
|
'@sentry/hub': 6.17.8
|
||||||
'@sentry/minimal': 6.17.6
|
'@sentry/minimal': 6.17.8
|
||||||
'@sentry/types': 6.17.6
|
'@sentry/types': 6.17.8
|
||||||
'@sentry/utils': 6.17.6
|
'@sentry/utils': 6.17.8
|
||||||
tslib: 1.14.1
|
tslib: 1.14.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@sentry/hub/6.17.6:
|
/@sentry/hub/6.17.8:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-Ps9nk+DoFia8jhZ1lucdRE0vDx8hqXOsKXJE8a3hK/Ndki0J9jedYqBeLqSgiFG4qRjXpNFcD6TEM6tnQrv5lw==
|
integrity: sha512-GW0XYpkoQu/kSJaTLfsF4extHDOBPNRnT0qKr/YO20Z5wGxYp8LsdnAuU3njcFHcAV2F/QDTj2BPq1U385/4+A==
|
||||||
}
|
}
|
||||||
engines: { node: '>=6' }
|
engines: { node: '>=6' }
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sentry/types': 6.17.6
|
'@sentry/types': 6.17.8
|
||||||
'@sentry/utils': 6.17.6
|
'@sentry/utils': 6.17.8
|
||||||
tslib: 1.14.1
|
tslib: 1.14.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@sentry/minimal/6.17.6:
|
/@sentry/minimal/6.17.8:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-PLGf8WlhtdHuY6ofwYR3nyClr/TYHHAW6i0r62OZCOXTqnFPJorZpAz3VCCP2jMJmbgVbo03wN+u/xAA/zwObA==
|
integrity: sha512-VJXFZBO/O8SViK0fdzodxpNr+pbpgczNgLpz/MNuSooV6EBesgCMVjXtxDUp1Ie1odc0GUprN/ZMLYBmYdIrKQ==
|
||||||
}
|
}
|
||||||
engines: { node: '>=6' }
|
engines: { node: '>=6' }
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sentry/hub': 6.17.6
|
'@sentry/hub': 6.17.8
|
||||||
'@sentry/types': 6.17.6
|
'@sentry/types': 6.17.8
|
||||||
tslib: 1.14.1
|
tslib: 1.14.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@sentry/node/6.17.6:
|
/@sentry/node/6.17.8:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-T1s0yPbGvYpoh9pJgLvpy7s+jVwCyf0ieEoN9rSbnPwbi2vm6MfoV5wtGrE0cBHTPgnyOMv+zq4Q3ww6dfr7Pw==
|
integrity: sha512-b3zg1XjKtxp7o821ENORO1CCzMM4QzKP01rzztMwyMcj28dmUq36QXoQAnwdKn7jEYkJdLnMeniIBR6U6NUJrQ==
|
||||||
}
|
}
|
||||||
engines: { node: '>=6' }
|
engines: { node: '>=6' }
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sentry/core': 6.17.6
|
'@sentry/core': 6.17.8
|
||||||
'@sentry/hub': 6.17.6
|
'@sentry/hub': 6.17.8
|
||||||
'@sentry/tracing': 6.17.6
|
'@sentry/tracing': 6.17.8
|
||||||
'@sentry/types': 6.17.6
|
'@sentry/types': 6.17.8
|
||||||
'@sentry/utils': 6.17.6
|
'@sentry/utils': 6.17.8
|
||||||
cookie: 0.4.2
|
cookie: 0.4.2
|
||||||
https-proxy-agent: 5.0.0
|
https-proxy-agent: 5.0.0
|
||||||
lru_map: 0.3.3
|
lru_map: 0.3.3
|
||||||
@ -351,36 +351,36 @@ packages:
|
|||||||
- supports-color
|
- supports-color
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@sentry/tracing/6.17.6:
|
/@sentry/tracing/6.17.8:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-+h5ov+zEm5WH9+vmFfdT4EIqBOW7Tggzh0BDz8QRStRc2JbvEiSZDs+HlsycBwWMQi/ucJs93FPtNnWjW+xvBw==
|
integrity: sha512-WJ3W8O6iPI3w7MrzTnYcw3s5PGBNFqT4b9oBCl5Ndjexs8DsGlQOxjrsipo36z6TpnRHpAE4FEbOETb2R8JRJQ==
|
||||||
}
|
}
|
||||||
engines: { node: '>=6' }
|
engines: { node: '>=6' }
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sentry/hub': 6.17.6
|
'@sentry/hub': 6.17.8
|
||||||
'@sentry/minimal': 6.17.6
|
'@sentry/minimal': 6.17.8
|
||||||
'@sentry/types': 6.17.6
|
'@sentry/types': 6.17.8
|
||||||
'@sentry/utils': 6.17.6
|
'@sentry/utils': 6.17.8
|
||||||
tslib: 1.14.1
|
tslib: 1.14.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@sentry/types/6.17.6:
|
/@sentry/types/6.17.8:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-peGM873lDJtHd/jwW9Egr/hhxLuF0bcPIf2kMZlvEvW/G5GCbuaCR4ArQJlh7vQyma+NLn/XdojpJkC0TomKrw==
|
integrity: sha512-0i0f+dpvV62Pm5QMVBHNfEsTGIXoXRGQbeN2LGL4XbhzrzUmIrBPzrnZHv9c/JYtSJnI6A0B9OG7Bdlh3aku+Q==
|
||||||
}
|
}
|
||||||
engines: { node: '>=6' }
|
engines: { node: '>=6' }
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@sentry/utils/6.17.6:
|
/@sentry/utils/6.17.8:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-RI797N8Ax5yuKUftVX6dc0XmXqo5CN7XqJYPFzYC8udutQ4L8ZYadtUcqNsdz1ZQxl+rp0XK9Q6wjoWmsI2RXA==
|
integrity: sha512-cAOM53A5FHv95hpDuXKJU8rI4B1XdZ6qe3Yo+/nDS9QDpOgzvyjcItgXPvKW1wUjdHCcnwu7VBfBxB7teYOW9g==
|
||||||
}
|
}
|
||||||
engines: { node: '>=6' }
|
engines: { node: '>=6' }
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sentry/types': 6.17.6
|
'@sentry/types': 6.17.8
|
||||||
tslib: 1.14.1
|
tslib: 1.14.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@ -502,7 +502,7 @@ packages:
|
|||||||
integrity: sha512-agtcFKaruL8TmcvqbndlqHPSJgsolhf/qPWchFlgnW1gECTN/nKbFcoFnvKAQRFfKbh+BO6A3SWdJu9t+xF3Lw==
|
integrity: sha512-agtcFKaruL8TmcvqbndlqHPSJgsolhf/qPWchFlgnW1gECTN/nKbFcoFnvKAQRFfKbh+BO6A3SWdJu9t+xF3Lw==
|
||||||
}
|
}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 17.0.16
|
'@types/node': 17.0.18
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@types/cacheable-request/6.0.2:
|
/@types/cacheable-request/6.0.2:
|
||||||
@ -513,7 +513,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/http-cache-semantics': 4.0.1
|
'@types/http-cache-semantics': 4.0.1
|
||||||
'@types/keyv': 3.1.3
|
'@types/keyv': 3.1.3
|
||||||
'@types/node': 17.0.16
|
'@types/node': 17.0.18
|
||||||
'@types/responselike': 1.0.0
|
'@types/responselike': 1.0.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@ -544,7 +544,7 @@ packages:
|
|||||||
integrity: sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==
|
integrity: sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==
|
||||||
}
|
}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 17.0.16
|
'@types/node': 17.0.18
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/node-forge/1.0.0:
|
/@types/node-forge/1.0.0:
|
||||||
@ -553,13 +553,13 @@ packages:
|
|||||||
integrity: sha512-h0bgwPKq5u99T9Gor4qtV1lCZ41xNkai0pie1n/a2mh2/4+jENWOlo7AJ4YKxTZAnSZ8FRurUpdIN7ohaPPuHA==
|
integrity: sha512-h0bgwPKq5u99T9Gor4qtV1lCZ41xNkai0pie1n/a2mh2/4+jENWOlo7AJ4YKxTZAnSZ8FRurUpdIN7ohaPPuHA==
|
||||||
}
|
}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 17.0.16
|
'@types/node': 17.0.18
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@types/node/17.0.16:
|
/@types/node/17.0.18:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA==
|
integrity: sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==
|
||||||
}
|
}
|
||||||
|
|
||||||
/@types/parse-json/4.0.0:
|
/@types/parse-json/4.0.0:
|
||||||
@ -582,7 +582,7 @@ packages:
|
|||||||
integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==
|
integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==
|
||||||
}
|
}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 17.0.16
|
'@types/node': 17.0.18
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/sass/1.16.1:
|
/@types/sass/1.16.1:
|
||||||
@ -591,7 +591,7 @@ packages:
|
|||||||
integrity: sha512-iZUcRrGuz/Tbg3loODpW7vrQJkUtpY2fFSf4ELqqkApcS2TkZ1msk7ie8iZPB86lDOP8QOTTmuvWjc5S0R9OjQ==
|
integrity: sha512-iZUcRrGuz/Tbg3loODpW7vrQJkUtpY2fFSf4ELqqkApcS2TkZ1msk7ie8iZPB86lDOP8QOTTmuvWjc5S0R9OjQ==
|
||||||
}
|
}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 17.0.16
|
'@types/node': 17.0.18
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/eslint-plugin/4.31.1_5d7752337e5ea49772097d8af1823bf9:
|
/@typescript-eslint/eslint-plugin/4.31.1_5d7752337e5ea49772097d8af1823bf9:
|
||||||
@ -1746,10 +1746,10 @@ packages:
|
|||||||
ieee754: 1.2.1
|
ieee754: 1.2.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/bullmq/1.69.0:
|
/bullmq/1.72.0:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-1aIO7bN0HQeADWoXa+I72GgofvoBFRs/kcoveB3KN8ytKv7QJbGhtks0pYNhHn/P9H3OWHWDccpNEfnv3VGfcw==
|
integrity: sha512-Q0pk6GphHyYsacpjZZFhjp/+TY+2g2FDsJS3qwIyskQL4j7vZaa1iYX3gKDEBn4C5eZMP1EOl9GWkm2bhdB0Wg==
|
||||||
}
|
}
|
||||||
dependencies:
|
dependencies:
|
||||||
cron-parser: 2.18.0
|
cron-parser: 2.18.0
|
||||||
@ -3718,10 +3718,10 @@ packages:
|
|||||||
resolution: { integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= }
|
resolution: { integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= }
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/lint-staged/12.3.3:
|
/lint-staged/12.3.4:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-OqcLsqcPOqzvsfkxjeBpZylgJ3SRG1RYqc9LxC6tkt6tNsq1bNVkAixBwX09f6CobcHswzqVOCBpFR1Fck0+ag==
|
integrity: sha512-yv/iK4WwZ7/v0GtVkNb3R82pdL9M+ScpIbJLJNyCXkJ1FGaXvRCOg/SeL59SZtPpqZhE7BD6kPKFLIDUhDx2/w==
|
||||||
}
|
}
|
||||||
engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 }
|
engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 }
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@ -4397,7 +4397,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
import-cwd: 3.0.0
|
import-cwd: 3.0.0
|
||||||
lilconfig: 2.0.4
|
lilconfig: 2.0.4
|
||||||
ts-node: 10.5.0_99ae9436e134a034c8d45fdd98ebbf22
|
ts-node: 10.5.0_f3bd4037939c2ed2942ba074291f8ef2
|
||||||
yaml: 1.10.2
|
yaml: 1.10.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@ -4486,10 +4486,10 @@ packages:
|
|||||||
hasBin: true
|
hasBin: true
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/prisma/3.9.1:
|
/prisma/3.9.2:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-IGcJAu5LzlFv+i+NNhOEh1J1xVVttsVdRBxmrMN7eIH+7mRN6L89Hz1npUAiz4jOpNlHC7n9QwaOYZGxTqlwQw==
|
integrity: sha512-i9eK6cexV74OgeWaH3+e6S07kvC9jEZTl6BqtBH398nlCU0tck7mE9dicY6YQd+euvMjjCtY89q4NgmaPnUsSg==
|
||||||
}
|
}
|
||||||
engines: { node: '>=12.6' }
|
engines: { node: '>=12.6' }
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@ -5203,10 +5203,10 @@ packages:
|
|||||||
svelte: 3.46.4
|
svelte: 3.46.4
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/svelte-kit-cookie-session/2.0.3:
|
/svelte-kit-cookie-session/2.0.5:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-jOBUpvrkt/fI5zaqWsWHDDIGnfuPQt3/PC1FDJpEV/E/hA8DvGO52esFny1HvUAP1tkVZ5FU3k6Yd3HyQH5oUQ==
|
integrity: sha512-IX1IXtn42UTz/isem1LqH0SAZdCx6Z6Iu2V4Q83V2EScFbXZWfeFY08Azl8ZrPKdIDhSNHBLAAumRjA6TBxCvQ==
|
||||||
}
|
}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@ -5288,16 +5288,15 @@ packages:
|
|||||||
strip-ansi: 6.0.1
|
strip-ansi: 6.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/tailwindcss/3.0.19_27d966e3a2f4b84fbc8a2f9653dbb362:
|
/tailwindcss/3.0.22_c940fbabf228b85b1c73d314b43e31f1:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-rjsdfz/qZya5xQ0OVynEMETgWq1CacmftgMYeXXh6bRM5vxsNwRSbMJsCCIjq/w67om9VP/AFMolOwiE+5VKig==
|
integrity: sha512-F8lt74RlNZirnkaSk310+vGQta7c0/hgx7/bqxruM4wS9lp8oqV93lzavajC3VT0Lp4UUtUVIt8ifKcmGzkr0A==
|
||||||
}
|
}
|
||||||
engines: { node: '>=12.13.0' }
|
engines: { node: '>=12.13.0' }
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
autoprefixer: ^10.0.2
|
autoprefixer: ^10.0.2
|
||||||
postcss: ^8.0.9
|
|
||||||
dependencies:
|
dependencies:
|
||||||
arg: 5.0.1
|
arg: 5.0.1
|
||||||
autoprefixer: 10.4.2_postcss@8.4.6
|
autoprefixer: 10.4.2_postcss@8.4.6
|
||||||
@ -5408,7 +5407,7 @@ packages:
|
|||||||
engines: { node: '>=0.10.0' }
|
engines: { node: '>=0.10.0' }
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/ts-node/10.5.0_99ae9436e134a034c8d45fdd98ebbf22:
|
/ts-node/10.5.0_f3bd4037939c2ed2942ba074291f8ef2:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-6kEJKwVxAJ35W4akuiysfKwKmjkbYxwQMTBaAxo9KKAx/Yd26mPUyhGz3ji+EsJoAgrLqVsYHNuuYwQe22lbtw==
|
integrity: sha512-6kEJKwVxAJ35W4akuiysfKwKmjkbYxwQMTBaAxo9KKAx/Yd26mPUyhGz3ji+EsJoAgrLqVsYHNuuYwQe22lbtw==
|
||||||
@ -5430,7 +5429,7 @@ packages:
|
|||||||
'@tsconfig/node12': 1.0.9
|
'@tsconfig/node12': 1.0.9
|
||||||
'@tsconfig/node14': 1.0.1
|
'@tsconfig/node14': 1.0.1
|
||||||
'@tsconfig/node16': 1.0.2
|
'@tsconfig/node16': 1.0.2
|
||||||
'@types/node': 17.0.16
|
'@types/node': 17.0.18
|
||||||
acorn: 8.5.0
|
acorn: 8.5.0
|
||||||
acorn-walk: 8.2.0
|
acorn-walk: 8.2.0
|
||||||
arg: 4.1.3
|
arg: 4.1.3
|
||||||
|
@ -74,26 +74,12 @@ export async function makeLabelForStandaloneDatabase({ id, image, volume }) {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function makeLabelForPlausibleAnalytics({ id, images, volume }) {
|
export function makeLabelForServices(type) {
|
||||||
const service = await db.prisma.service.findFirst({
|
|
||||||
where: { id },
|
|
||||||
include: { plausibleAnalytics: true }
|
|
||||||
});
|
|
||||||
delete service.destinationDockerId;
|
|
||||||
delete service.createdAt;
|
|
||||||
delete service.updatedAt;
|
|
||||||
return [
|
return [
|
||||||
'coolify.managed=true',
|
'coolify.managed=true',
|
||||||
`coolify.version=${version}`,
|
`coolify.version=${version}`,
|
||||||
`coolify.type=service-plausibleanalytics`,
|
`coolify.type=service`,
|
||||||
`coolify.configuration=${base64Encode(
|
`coolify.service.type=${type}`
|
||||||
JSON.stringify({
|
|
||||||
version,
|
|
||||||
images,
|
|
||||||
volume,
|
|
||||||
...service
|
|
||||||
})
|
|
||||||
)}`
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,15 +22,15 @@ export async function isSecretExists({ id, name }) {
|
|||||||
export async function isDomainConfigured({ id, fqdn }) {
|
export async function isDomainConfigured({ id, fqdn }) {
|
||||||
const domain = getDomain(fqdn);
|
const domain = getDomain(fqdn);
|
||||||
const foundApp = await prisma.application.findFirst({
|
const foundApp = await prisma.application.findFirst({
|
||||||
where: { fqdn: { endsWith: domain }, id: { not: id } },
|
where: { fqdn: { endsWith: `//${domain}` }, id: { not: id } },
|
||||||
select: { fqdn: true }
|
select: { fqdn: true }
|
||||||
});
|
});
|
||||||
const foundService = await prisma.service.findFirst({
|
const foundService = await prisma.service.findFirst({
|
||||||
where: { fqdn: { endsWith: domain }, id: { not: id } },
|
where: { fqdn: { endsWith: `//${domain}` }, id: { not: id } },
|
||||||
select: { fqdn: true }
|
select: { fqdn: true }
|
||||||
});
|
});
|
||||||
const coolifyFqdn = await prisma.setting.findFirst({
|
const coolifyFqdn = await prisma.setting.findFirst({
|
||||||
where: { fqdn: { endsWith: domain }, id: { not: id } },
|
where: { fqdn: { endsWith: `//${domain}` }, id: { not: id } },
|
||||||
select: { fqdn: true }
|
select: { fqdn: true }
|
||||||
});
|
});
|
||||||
if (foundApp || foundService || coolifyFqdn) return true;
|
if (foundApp || foundService || coolifyFqdn) return true;
|
||||||
|
@ -114,27 +114,55 @@ export const supportedServiceTypesAndVersions = [
|
|||||||
name: 'plausibleanalytics',
|
name: 'plausibleanalytics',
|
||||||
fancyName: 'Plausible Analytics',
|
fancyName: 'Plausible Analytics',
|
||||||
baseImage: 'plausible/analytics',
|
baseImage: 'plausible/analytics',
|
||||||
versions: ['latest']
|
versions: ['latest'],
|
||||||
|
ports: {
|
||||||
|
main: 8000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'nocodb',
|
||||||
|
fancyName: 'NocoDB',
|
||||||
|
baseImage: 'nocodb/nocodb',
|
||||||
|
versions: ['latest'],
|
||||||
|
ports: {
|
||||||
|
main: 8080
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'minio',
|
||||||
|
fancyName: 'MinIO',
|
||||||
|
baseImage: 'minio/minio',
|
||||||
|
versions: ['latest'],
|
||||||
|
ports: {
|
||||||
|
main: 9001
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ name: 'nocodb', fancyName: 'NocoDB', baseImage: 'nocodb/nocodb', versions: ['latest'] },
|
|
||||||
{ name: 'minio', fancyName: 'MinIO', baseImage: 'minio/minio', versions: ['latest'] },
|
|
||||||
{
|
{
|
||||||
name: 'vscodeserver',
|
name: 'vscodeserver',
|
||||||
fancyName: 'VSCode Server',
|
fancyName: 'VSCode Server',
|
||||||
baseImage: 'codercom/code-server',
|
baseImage: 'codercom/code-server',
|
||||||
versions: ['latest']
|
versions: ['latest'],
|
||||||
|
ports: {
|
||||||
|
main: 8080
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'wordpress',
|
name: 'wordpress',
|
||||||
fancyName: 'Wordpress',
|
fancyName: 'Wordpress',
|
||||||
baseImage: 'wordpress',
|
baseImage: 'wordpress',
|
||||||
versions: ['latest', 'php8.1', 'php8.0', 'php7.4', 'php7.3']
|
versions: ['latest', 'php8.1', 'php8.0', 'php7.4', 'php7.3'],
|
||||||
|
ports: {
|
||||||
|
main: 80
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'vaultwarden',
|
name: 'vaultwarden',
|
||||||
fancyName: 'Vaultwarden',
|
fancyName: 'Vaultwarden',
|
||||||
baseImage: 'vaultwarden/server',
|
baseImage: 'vaultwarden/server',
|
||||||
versions: ['latest']
|
versions: ['latest'],
|
||||||
|
ports: {
|
||||||
|
main: 80
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ export async function configureDestinationForDatabase({ id, destinationId }) {
|
|||||||
if (type && version) {
|
if (type && version) {
|
||||||
const baseImage = getDatabaseImage(type);
|
const baseImage = getDatabaseImage(type);
|
||||||
asyncExecShell(
|
asyncExecShell(
|
||||||
`DOCKER_HOST=${host} docker pull ${baseImage}:${version} && echo "FROM ${baseImage}:${version}" | docker build --label coolify.managed="true" -t "${baseImage}:${version}" -`
|
`DOCKER_HOST=${host} docker pull ${baseImage}:${version} && echo "FROM ${baseImage}:${version}" | docker build --label coolify.image="true" -t "${baseImage}:${version}" -`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ export async function forceSSLOffApplication({ domain }) {
|
|||||||
if (!dev) {
|
if (!dev) {
|
||||||
const haproxy = await haproxyInstance();
|
const haproxy = await haproxyInstance();
|
||||||
await checkHAProxy(haproxy);
|
await checkHAProxy(haproxy);
|
||||||
const transactionId = await getNextTransactionId();
|
let transactionId;
|
||||||
try {
|
try {
|
||||||
const rules: any = await haproxy
|
const rules: any = await haproxy
|
||||||
.get(`v2/services/haproxy/configuration/http_request_rules`, {
|
.get(`v2/services/haproxy/configuration/http_request_rules`, {
|
||||||
@ -84,6 +84,8 @@ export async function forceSSLOffApplication({ domain }) {
|
|||||||
if (rules.data.length > 0) {
|
if (rules.data.length > 0) {
|
||||||
const rule = rules.data.find((rule) => rule.cond_test.includes(`-i ${domain}`));
|
const rule = rules.data.find((rule) => rule.cond_test.includes(`-i ${domain}`));
|
||||||
if (rule) {
|
if (rule) {
|
||||||
|
transactionId = await getNextTransactionId();
|
||||||
|
|
||||||
await haproxy
|
await haproxy
|
||||||
.delete(`v2/services/haproxy/configuration/http_request_rules/${rule.index}`, {
|
.delete(`v2/services/haproxy/configuration/http_request_rules/${rule.index}`, {
|
||||||
searchParams: {
|
searchParams: {
|
||||||
@ -98,7 +100,7 @@ export async function forceSSLOffApplication({ domain }) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
} finally {
|
} finally {
|
||||||
await completeTransaction(transactionId);
|
if (transactionId) await completeTransaction(transactionId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(`[DEBUG] Removing ssl for ${domain}`);
|
console.log(`[DEBUG] Removing ssl for ${domain}`);
|
||||||
@ -108,8 +110,7 @@ export async function forceSSLOnApplication({ domain }) {
|
|||||||
if (!dev) {
|
if (!dev) {
|
||||||
const haproxy = await haproxyInstance();
|
const haproxy = await haproxyInstance();
|
||||||
await checkHAProxy(haproxy);
|
await checkHAProxy(haproxy);
|
||||||
const transactionId = await getNextTransactionId();
|
let transactionId;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const rules: any = await haproxy
|
const rules: any = await haproxy
|
||||||
.get(`v2/services/haproxy/configuration/http_request_rules`, {
|
.get(`v2/services/haproxy/configuration/http_request_rules`, {
|
||||||
@ -127,6 +128,8 @@ export async function forceSSLOnApplication({ domain }) {
|
|||||||
if (rule) return;
|
if (rule) return;
|
||||||
nextRule = rules.data[rules.data.length - 1].index + 1;
|
nextRule = rules.data[rules.data.length - 1].index + 1;
|
||||||
}
|
}
|
||||||
|
transactionId = await getNextTransactionId();
|
||||||
|
|
||||||
await haproxy
|
await haproxy
|
||||||
.post(`v2/services/haproxy/configuration/http_request_rules`, {
|
.post(`v2/services/haproxy/configuration/http_request_rules`, {
|
||||||
searchParams: {
|
searchParams: {
|
||||||
@ -149,7 +152,7 @@ export async function forceSSLOnApplication({ domain }) {
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
throw error;
|
throw error;
|
||||||
} finally {
|
} finally {
|
||||||
await completeTransaction(transactionId);
|
if (transactionId) await completeTransaction(transactionId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(`[DEBUG] Adding ssl for ${domain}`);
|
console.log(`[DEBUG] Adding ssl for ${domain}`);
|
||||||
@ -159,9 +162,10 @@ export async function forceSSLOnApplication({ domain }) {
|
|||||||
export async function deleteProxy({ id }) {
|
export async function deleteProxy({ id }) {
|
||||||
const haproxy = await haproxyInstance();
|
const haproxy = await haproxyInstance();
|
||||||
await checkHAProxy(haproxy);
|
await checkHAProxy(haproxy);
|
||||||
const transactionId = await getNextTransactionId();
|
let transactionId;
|
||||||
try {
|
try {
|
||||||
await haproxy.get(`v2/services/haproxy/configuration/backends/${id}`).json();
|
await haproxy.get(`v2/services/haproxy/configuration/backends/${id}`).json();
|
||||||
|
transactionId = await getNextTransactionId();
|
||||||
await haproxy
|
await haproxy
|
||||||
.delete(`v2/services/haproxy/configuration/backends/${id}`, {
|
.delete(`v2/services/haproxy/configuration/backends/${id}`, {
|
||||||
searchParams: {
|
searchParams: {
|
||||||
@ -180,7 +184,7 @@ export async function deleteProxy({ id }) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error.response.body);
|
console.log(error.response.body);
|
||||||
} finally {
|
} finally {
|
||||||
await completeTransaction(transactionId);
|
if (transactionId) await completeTransaction(transactionId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,7 +216,7 @@ export async function configureProxyForApplication({ domain, imageId, applicatio
|
|||||||
if (backendAvailable.data.forwardfor.enabled === 'enabled') {
|
if (backendAvailable.data.forwardfor.enabled === 'enabled') {
|
||||||
if (backendAvailable.data.name === domain) {
|
if (backendAvailable.data.name === domain) {
|
||||||
if (server.data.check === 'enabled') {
|
if (server.data.check === 'enabled') {
|
||||||
if (server.data.address === applicationId) {
|
if (server.data.address === imageId) {
|
||||||
if (server.data.port === port) {
|
if (server.data.port === port) {
|
||||||
serverConfigured = true;
|
serverConfigured = true;
|
||||||
}
|
}
|
||||||
@ -274,8 +278,8 @@ export async function configureCoolifyProxyOff(fqdn) {
|
|||||||
await checkHAProxy(haproxy);
|
await checkHAProxy(haproxy);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const transactionId = await getNextTransactionId();
|
|
||||||
await haproxy.get(`v2/services/haproxy/configuration/backends/${domain}`).json();
|
await haproxy.get(`v2/services/haproxy/configuration/backends/${domain}`).json();
|
||||||
|
const transactionId = await getNextTransactionId();
|
||||||
await haproxy
|
await haproxy
|
||||||
.delete(`v2/services/haproxy/configuration/backends/${domain}`, {
|
.delete(`v2/services/haproxy/configuration/backends/${domain}`, {
|
||||||
searchParams: {
|
searchParams: {
|
||||||
@ -505,52 +509,60 @@ export async function configureNetworkCoolifyProxy(engine) {
|
|||||||
export async function configureSimpleServiceProxyOn({ id, domain, port }) {
|
export async function configureSimpleServiceProxyOn({ id, domain, port }) {
|
||||||
const haproxy = await haproxyInstance();
|
const haproxy = await haproxyInstance();
|
||||||
await checkHAProxy(haproxy);
|
await checkHAProxy(haproxy);
|
||||||
|
let serverConfigured = false;
|
||||||
|
let backendAvailable: any = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await haproxy.get(`v2/services/haproxy/configuration/backends/${domain}`).json();
|
backendAvailable = await haproxy
|
||||||
const transactionId = await getNextTransactionId();
|
.get(`v2/services/haproxy/configuration/backends/${domain}`)
|
||||||
await haproxy
|
.json();
|
||||||
.delete(`v2/services/haproxy/configuration/backends/${domain}`, {
|
const server: any = await haproxy
|
||||||
|
.get(`v2/services/haproxy/configuration/servers/${id}`, {
|
||||||
searchParams: {
|
searchParams: {
|
||||||
transaction_id: transactionId
|
backend: domain
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.json();
|
.json();
|
||||||
await completeTransaction(transactionId);
|
if (backendAvailable && server) {
|
||||||
|
// Very sophisticated way to check if the server is already configured in proxy
|
||||||
|
if (backendAvailable.data.forwardfor.enabled === 'enabled') {
|
||||||
|
if (backendAvailable.data.name === domain) {
|
||||||
|
if (server.data.check === 'enabled') {
|
||||||
|
if (server.data.address === id) {
|
||||||
|
if (server.data.port === port) {
|
||||||
|
serverConfigured = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
try {
|
if (serverConfigured) return;
|
||||||
const transactionId = await getNextTransactionId();
|
const transactionId = await getNextTransactionId();
|
||||||
await haproxy.post('v2/services/haproxy/configuration/backends', {
|
await haproxy.post('v2/services/haproxy/configuration/backends', {
|
||||||
searchParams: {
|
searchParams: {
|
||||||
transaction_id: transactionId
|
transaction_id: transactionId
|
||||||
},
|
},
|
||||||
json: {
|
json: {
|
||||||
'init-addr': 'last,libc,none',
|
'init-addr': 'last,libc,none',
|
||||||
forwardfor: { enabled: 'enabled' },
|
forwardfor: { enabled: 'enabled' },
|
||||||
name: domain
|
name: domain
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await haproxy.post('v2/services/haproxy/configuration/servers', {
|
await haproxy.post('v2/services/haproxy/configuration/servers', {
|
||||||
searchParams: {
|
searchParams: {
|
||||||
transaction_id: transactionId,
|
transaction_id: transactionId,
|
||||||
backend: domain
|
backend: domain
|
||||||
},
|
},
|
||||||
json: {
|
json: {
|
||||||
address: id,
|
|
||||||
check: 'enabled',
|
|
||||||
name: id,
|
|
||||||
port: port
|
|
||||||
}
|
|
||||||
});
|
|
||||||
console.log({
|
|
||||||
address: id,
|
address: id,
|
||||||
check: 'enabled',
|
check: 'enabled',
|
||||||
name: id,
|
name: id,
|
||||||
port: port
|
port: port
|
||||||
});
|
}
|
||||||
await completeTransaction(transactionId);
|
});
|
||||||
} catch (error) {
|
await completeTransaction(transactionId);
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function configureSimpleServiceProxyOff({ domain }) {
|
export async function configureSimpleServiceProxyOff({ domain }) {
|
||||||
@ -605,7 +617,7 @@ export async function removeWwwRedirection(domain) {
|
|||||||
export async function setWwwRedirection(fqdn) {
|
export async function setWwwRedirection(fqdn) {
|
||||||
const haproxy = await haproxyInstance();
|
const haproxy = await haproxyInstance();
|
||||||
await checkHAProxy(haproxy);
|
await checkHAProxy(haproxy);
|
||||||
const transactionId = await getNextTransactionId();
|
let transactionId;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const domain = getDomain(fqdn);
|
const domain = getDomain(fqdn);
|
||||||
@ -629,6 +641,7 @@ export async function setWwwRedirection(fqdn) {
|
|||||||
nextRule = rules.data[rules.data.length - 1].index + 1;
|
nextRule = rules.data[rules.data.length - 1].index + 1;
|
||||||
}
|
}
|
||||||
const redirectValue = `${isHttps ? 'https://' : 'http://'}${domain}%[capture.req.uri]`;
|
const redirectValue = `${isHttps ? 'https://' : 'http://'}${domain}%[capture.req.uri]`;
|
||||||
|
transactionId = await getNextTransactionId();
|
||||||
await haproxy
|
await haproxy
|
||||||
.post(`v2/services/haproxy/configuration/http_request_rules`, {
|
.post(`v2/services/haproxy/configuration/http_request_rules`, {
|
||||||
searchParams: {
|
searchParams: {
|
||||||
@ -651,6 +664,6 @@ export async function setWwwRedirection(fqdn) {
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
throw error;
|
throw error;
|
||||||
} finally {
|
} finally {
|
||||||
await completeTransaction(transactionId);
|
if (transactionId) await completeTransaction(transactionId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ export default async function () {
|
|||||||
];
|
];
|
||||||
for (const image of images) {
|
for (const image of images) {
|
||||||
await asyncExecShell(
|
await asyncExecShell(
|
||||||
`DOCKER_HOST=${host} docker pull ${image} && echo "FROM ${image}" | docker build --label coolify.managed="true" -t "${image}" -`
|
`DOCKER_HOST=${host} docker pull ${image} && echo "FROM ${image}" | docker build --label coolify.image="true" -t "${image}" -`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
@ -35,11 +35,17 @@ export default async function () {
|
|||||||
// Cleanup images that are not managed by coolify
|
// Cleanup images that are not managed by coolify
|
||||||
try {
|
try {
|
||||||
await asyncExecShell(
|
await asyncExecShell(
|
||||||
`DOCKER_HOST=${host} docker image prune --filter 'label!=coolify.managed=true' -a -f`
|
`DOCKER_HOST=${host} docker image prune --filter 'label!=coolify.image=true' -a -f`
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
// Cleanup dangling images
|
||||||
|
try {
|
||||||
|
await asyncExecShell(`DOCKER_HOST=${host} docker image prune -f`);
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ const cron = async () => {
|
|||||||
|
|
||||||
await queue.proxy.add('proxy', {}, { repeat: { every: 10000 } });
|
await queue.proxy.add('proxy', {}, { repeat: { every: 10000 } });
|
||||||
// await queue.ssl.add('ssl', {}, { repeat: { every: 10000 } });
|
// await queue.ssl.add('ssl', {}, { repeat: { every: 10000 } });
|
||||||
await queue.cleanup.add('cleanup', {}, { repeat: { every: 3600000 } });
|
if (!dev) await queue.cleanup.add('cleanup', {}, { repeat: { every: 600000 } });
|
||||||
await queue.sslRenew.add('sslRenew', {}, { repeat: { every: 1800000 } });
|
await queue.sslRenew.add('sslRenew', {}, { repeat: { every: 1800000 } });
|
||||||
|
|
||||||
const events = {
|
const events = {
|
||||||
@ -144,7 +144,7 @@ buildWorker.on('failed', async (job: Bullmq.Job, failedReason) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const buildLogQueueName = dev ? cuid() : 'log_queue';
|
const buildLogQueueName = 'log_queue';
|
||||||
const buildLogQueue = new Queue(buildLogQueueName, connectionOptions);
|
const buildLogQueue = new Queue(buildLogQueueName, connectionOptions);
|
||||||
const buildLogWorker = new Worker(buildLogQueueName, async (job) => await logger(job), {
|
const buildLogWorker = new Worker(buildLogQueueName, async (job) => await logger(job), {
|
||||||
concurrency: 1,
|
concurrency: 1,
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
import { getDomain } from '$lib/common';
|
import { getDomain } from '$lib/common';
|
||||||
import { getApplicationById, prisma } from '$lib/database';
|
import { getApplicationById, prisma, supportedServiceTypesAndVersions } from '$lib/database';
|
||||||
import { dockerInstance } from '$lib/docker';
|
import { dockerInstance } from '$lib/docker';
|
||||||
import {
|
import {
|
||||||
checkContainer,
|
checkContainer,
|
||||||
configureCoolifyProxyOn,
|
configureCoolifyProxyOn,
|
||||||
configureProxyForApplication,
|
configureProxyForApplication,
|
||||||
|
configureSimpleServiceProxyOn,
|
||||||
forceSSLOnApplication,
|
forceSSLOnApplication,
|
||||||
reloadHaproxy,
|
reloadHaproxy,
|
||||||
setWwwRedirection,
|
setWwwRedirection,
|
||||||
startCoolifyProxy
|
startCoolifyProxy,
|
||||||
|
startHttpProxy
|
||||||
} from '$lib/haproxy';
|
} from '$lib/haproxy';
|
||||||
import * as db from '$lib/database';
|
import * as db from '$lib/database';
|
||||||
|
|
||||||
@ -24,39 +26,76 @@ export default async function () {
|
|||||||
(container) => container.Labels['coolify.managed']
|
(container) => container.Labels['coolify.managed']
|
||||||
);
|
);
|
||||||
for (const configuration of configurations) {
|
for (const configuration of configurations) {
|
||||||
const parsedConfiguration = JSON.parse(
|
if (configuration.Labels['coolify.configuration']) {
|
||||||
Buffer.from(configuration.Labels['coolify.configuration'], 'base64').toString()
|
const parsedConfiguration = JSON.parse(
|
||||||
);
|
Buffer.from(configuration.Labels['coolify.configuration'], 'base64').toString()
|
||||||
if (configuration.Labels['coolify.type'] === 'standalone-application') {
|
);
|
||||||
const { fqdn, applicationId, port, pullmergeRequestId } = parsedConfiguration;
|
if (
|
||||||
if (fqdn) {
|
parsedConfiguration &&
|
||||||
const found = await getApplicationById({ id: applicationId });
|
configuration.Labels['coolify.type'] === 'standalone-application'
|
||||||
if (found) {
|
) {
|
||||||
const domain = getDomain(fqdn);
|
const { fqdn, applicationId, port, pullmergeRequestId } = parsedConfiguration;
|
||||||
await configureProxyForApplication({
|
if (fqdn) {
|
||||||
domain,
|
const found = await getApplicationById({ id: applicationId });
|
||||||
imageId: pullmergeRequestId
|
if (found) {
|
||||||
? `${applicationId}-${pullmergeRequestId}`
|
const domain = getDomain(fqdn);
|
||||||
: applicationId,
|
await configureProxyForApplication({
|
||||||
applicationId,
|
domain,
|
||||||
port
|
imageId: pullmergeRequestId
|
||||||
});
|
? `${applicationId}-${pullmergeRequestId}`
|
||||||
const isHttps = fqdn.startsWith('https://');
|
: applicationId,
|
||||||
if (isHttps) await forceSSLOnApplication({ domain });
|
applicationId,
|
||||||
await setWwwRedirection(fqdn);
|
port
|
||||||
|
});
|
||||||
|
const isHttps = fqdn.startsWith('https://');
|
||||||
|
if (isHttps) await forceSSLOnApplication({ domain });
|
||||||
|
await setWwwRedirection(fqdn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const container of containers) {
|
||||||
|
const image = container.Image.split(':')[0];
|
||||||
|
const found = supportedServiceTypesAndVersions.find((a) => a.baseImage === image);
|
||||||
|
if (found) {
|
||||||
|
const type = found.name;
|
||||||
|
const mainPort = found.ports.main;
|
||||||
|
const id = container.Names[0].replace('/', '');
|
||||||
|
const service = await db.prisma.service.findUnique({
|
||||||
|
where: { id },
|
||||||
|
include: {
|
||||||
|
destinationDocker: true,
|
||||||
|
minio: true,
|
||||||
|
plausibleAnalytics: true,
|
||||||
|
vscodeserver: true,
|
||||||
|
wordpress: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const { fqdn } = service;
|
||||||
|
const domain = getDomain(fqdn);
|
||||||
|
await configureSimpleServiceProxyOn({ id, domain, port: mainPort });
|
||||||
|
const publicPort = service[type]?.publicPort;
|
||||||
|
if (publicPort) {
|
||||||
|
const containerFound = await checkContainer(
|
||||||
|
destination.engine,
|
||||||
|
`haproxy-for-${publicPort}`
|
||||||
|
);
|
||||||
|
if (!containerFound) {
|
||||||
|
await startHttpProxy(destination, id, publicPort, 9000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const services = await prisma.service.findMany({});
|
||||||
// Check Coolify FQDN and configure proxy if needed
|
// Check Coolify FQDN and configure proxy if needed
|
||||||
const { fqdn } = await db.listSettings();
|
const { fqdn } = await db.listSettings();
|
||||||
if (fqdn) {
|
if (fqdn) {
|
||||||
const domain = getDomain(fqdn);
|
const domain = getDomain(fqdn);
|
||||||
const found = await checkContainer('/var/run/docker.sock', 'coolify-haproxy');
|
await startCoolifyProxy('/var/run/docker.sock');
|
||||||
if (!found) await startCoolifyProxy('/var/run/docker.sock');
|
await configureCoolifyProxyOn(fqdn);
|
||||||
await configureCoolifyProxyOn({ domain });
|
|
||||||
await setWwwRedirection(fqdn);
|
await setWwwRedirection(fqdn);
|
||||||
const isHttps = fqdn.startsWith('https://');
|
const isHttps = fqdn.startsWith('https://');
|
||||||
if (isHttps) await forceSSLOnApplication({ domain });
|
if (isHttps) await forceSSLOnApplication({ domain });
|
||||||
@ -64,7 +103,5 @@ export default async function () {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
throw error;
|
throw error;
|
||||||
} finally {
|
|
||||||
// await reloadHaproxy('/var/run/docker.sock');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
let cannotDisable = settings.fqdn && destination.engine === '/var/run/docker.sock';
|
let cannotDisable = settings.fqdn && destination.engine === '/var/run/docker.sock';
|
||||||
// let scannedApps = [];
|
// let scannedApps = [];
|
||||||
let loading = false;
|
let loading = false;
|
||||||
|
let restarting = false;
|
||||||
async function handleSubmit() {
|
async function handleSubmit() {
|
||||||
loading = true;
|
loading = true;
|
||||||
try {
|
try {
|
||||||
@ -42,6 +43,17 @@
|
|||||||
} catch ({ error }) {
|
} catch ({ error }) {
|
||||||
return errorNotification(error);
|
return errorNotification(error);
|
||||||
}
|
}
|
||||||
|
} else if (state === true && destination.isCoolifyProxyUsed === false) {
|
||||||
|
destination.isCoolifyProxyUsed = !destination.isCoolifyProxyUsed;
|
||||||
|
try {
|
||||||
|
await post(`/destinations/${id}/settings.json`, {
|
||||||
|
isCoolifyProxyUsed: destination.isCoolifyProxyUsed,
|
||||||
|
engine: destination.engine
|
||||||
|
});
|
||||||
|
await startProxy();
|
||||||
|
} catch ({ error }) {
|
||||||
|
return errorNotification(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
async function changeProxySetting() {
|
async function changeProxySetting() {
|
||||||
@ -89,6 +101,25 @@
|
|||||||
return errorNotification(error);
|
return errorNotification(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
async function forceRestartProxy() {
|
||||||
|
const sure = confirm(
|
||||||
|
'Are you sure you want to restart the proxy? Everyting will be reconfigured in ~10 sec.'
|
||||||
|
);
|
||||||
|
if (sure) {
|
||||||
|
try {
|
||||||
|
restarting = true;
|
||||||
|
toast.push('Coolify Proxy restarting...');
|
||||||
|
await post(`/destinations/${id}/restart.json`, {
|
||||||
|
engine: destination.engine,
|
||||||
|
fqdn: settings.fqdn
|
||||||
|
});
|
||||||
|
} catch ({ error }) {
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.reload();
|
||||||
|
}, 5000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex justify-center px-6 pb-8">
|
<div class="flex justify-center px-6 pb-8">
|
||||||
@ -103,6 +134,12 @@
|
|||||||
disabled={loading}
|
disabled={loading}
|
||||||
>{loading ? 'Saving...' : 'Save'}
|
>{loading ? 'Saving...' : 'Save'}
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class={restarting ? '' : 'bg-red-600 hover:bg-red-500'}
|
||||||
|
disabled={restarting}
|
||||||
|
on:click|preventDefault={forceRestartProxy}
|
||||||
|
>{restarting ? 'Restarting... please wait...' : 'Force restart proxy'}</button
|
||||||
|
>
|
||||||
<!-- <button type="button" class="bg-coollabs hover:bg-coollabs-100" on:click={scanApps}
|
<!-- <button type="button" class="bg-coollabs hover:bg-coollabs-100" on:click={scanApps}
|
||||||
>Scan for applications</button
|
>Scan for applications</button
|
||||||
> -->
|
> -->
|
||||||
|
34
src/routes/destinations/[id]/restart.json.ts
Normal file
34
src/routes/destinations/[id]/restart.json.ts
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { getDomain, getUserDetails } from '$lib/common';
|
||||||
|
import { ErrorHandler } from '$lib/database';
|
||||||
|
import * as db from '$lib/database';
|
||||||
|
import {
|
||||||
|
configureCoolifyProxyOn,
|
||||||
|
forceSSLOnApplication,
|
||||||
|
setWwwRedirection,
|
||||||
|
startCoolifyProxy,
|
||||||
|
stopCoolifyProxy
|
||||||
|
} 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 { engine, fqdn } = await event.request.json();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const domain = getDomain(fqdn);
|
||||||
|
await stopCoolifyProxy(engine);
|
||||||
|
await startCoolifyProxy(engine);
|
||||||
|
await db.setDestinationSettings({ engine, isCoolifyProxyUsed: true });
|
||||||
|
await configureCoolifyProxyOn(fqdn);
|
||||||
|
await setWwwRedirection(fqdn);
|
||||||
|
const isHttps = fqdn.startsWith('https://');
|
||||||
|
if (isHttps) await forceSSLOnApplication({ domain });
|
||||||
|
return {
|
||||||
|
status: 200
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
return ErrorHandler(error);
|
||||||
|
}
|
||||||
|
};
|
@ -15,6 +15,7 @@ import {
|
|||||||
import getPort from 'get-port';
|
import getPort from 'get-port';
|
||||||
import { getDomain } from '$lib/components/common';
|
import { getDomain } from '$lib/components/common';
|
||||||
import { ErrorHandler } from '$lib/database';
|
import { ErrorHandler } from '$lib/database';
|
||||||
|
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||||
|
|
||||||
export const post: RequestHandler = async (event) => {
|
export const post: RequestHandler = async (event) => {
|
||||||
const { teamId, status, body } = await getUserDetails(event);
|
const { teamId, status, body } = await getUserDetails(event);
|
||||||
@ -63,7 +64,8 @@ export const post: RequestHandler = async (event) => {
|
|||||||
environment: config.environmentVariables,
|
environment: config.environmentVariables,
|
||||||
networks: [network],
|
networks: [network],
|
||||||
volumes: [config.volume],
|
volumes: [config.volume],
|
||||||
restart: 'always'
|
restart: 'always',
|
||||||
|
labels: makeLabelForServices('minio')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
|
@ -12,6 +12,7 @@ import {
|
|||||||
} from '$lib/haproxy';
|
} from '$lib/haproxy';
|
||||||
import { getDomain } from '$lib/components/common';
|
import { getDomain } from '$lib/components/common';
|
||||||
import { ErrorHandler } from '$lib/database';
|
import { ErrorHandler } from '$lib/database';
|
||||||
|
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||||
|
|
||||||
export const post: RequestHandler = async (event) => {
|
export const post: RequestHandler = async (event) => {
|
||||||
const { teamId, status, body } = await getUserDetails(event);
|
const { teamId, status, body } = await getUserDetails(event);
|
||||||
@ -39,7 +40,8 @@ export const post: RequestHandler = async (event) => {
|
|||||||
container_name: id,
|
container_name: id,
|
||||||
image: `nocodb/nocodb:${version}`,
|
image: `nocodb/nocodb:${version}`,
|
||||||
networks: [network],
|
networks: [network],
|
||||||
restart: 'always'
|
restart: 'always',
|
||||||
|
labels: makeLabelForServices('nocodb')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
|
@ -12,6 +12,7 @@ import {
|
|||||||
} from '$lib/haproxy';
|
} from '$lib/haproxy';
|
||||||
import { getDomain } from '$lib/components/common';
|
import { getDomain } from '$lib/components/common';
|
||||||
import { ErrorHandler } from '$lib/database';
|
import { ErrorHandler } from '$lib/database';
|
||||||
|
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||||
|
|
||||||
export const post: RequestHandler = async (event) => {
|
export const post: RequestHandler = async (event) => {
|
||||||
const { teamId, status, body } = await getUserDetails(event);
|
const { teamId, status, body } = await getUserDetails(event);
|
||||||
@ -82,7 +83,6 @@ export const post: RequestHandler = async (event) => {
|
|||||||
const network = destinationDockerId && destinationDocker.network;
|
const network = destinationDockerId && destinationDocker.network;
|
||||||
const host = getEngine(destinationDocker.engine);
|
const host = getEngine(destinationDocker.engine);
|
||||||
const engine = destinationDocker.engine;
|
const engine = destinationDocker.engine;
|
||||||
// const labels = await makeLabelForPlausibleAnalytics({ id, })
|
|
||||||
|
|
||||||
const { workdir } = await createDirectories({ repository: type, buildId: id });
|
const { workdir } = await createDirectories({ repository: type, buildId: id });
|
||||||
|
|
||||||
@ -138,7 +138,8 @@ COPY ./init-db.sh /docker-entrypoint-initdb.d/init-db.sh`;
|
|||||||
environment: config.plausibleAnalytics.environmentVariables,
|
environment: config.plausibleAnalytics.environmentVariables,
|
||||||
volumes: [config.postgresql.volume],
|
volumes: [config.postgresql.volume],
|
||||||
restart: 'always',
|
restart: 'always',
|
||||||
depends_on: [`${id}-postgresql`, `${id}-clickhouse`]
|
depends_on: [`${id}-postgresql`, `${id}-clickhouse`],
|
||||||
|
labels: makeLabelForServices('plausibleAnalytics')
|
||||||
},
|
},
|
||||||
[`${id}-postgresql`]: {
|
[`${id}-postgresql`]: {
|
||||||
container_name: `${id}-postgresql`,
|
container_name: `${id}-postgresql`,
|
||||||
|
@ -12,6 +12,7 @@ import {
|
|||||||
} from '$lib/haproxy';
|
} from '$lib/haproxy';
|
||||||
import { getDomain } from '$lib/components/common';
|
import { getDomain } from '$lib/components/common';
|
||||||
import { getServiceImage, ErrorHandler } from '$lib/database';
|
import { getServiceImage, ErrorHandler } from '$lib/database';
|
||||||
|
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||||
|
|
||||||
export const post: RequestHandler = async (event) => {
|
export const post: RequestHandler = async (event) => {
|
||||||
const { teamId, status, body } = await getUserDetails(event);
|
const { teamId, status, body } = await getUserDetails(event);
|
||||||
@ -46,7 +47,8 @@ export const post: RequestHandler = async (event) => {
|
|||||||
image: config.image,
|
image: config.image,
|
||||||
networks: [network],
|
networks: [network],
|
||||||
volumes: [config.volume],
|
volumes: [config.volume],
|
||||||
restart: 'always'
|
restart: 'always',
|
||||||
|
labels: makeLabelForServices('vaultWarden')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
|
@ -12,6 +12,7 @@ import {
|
|||||||
} from '$lib/haproxy';
|
} from '$lib/haproxy';
|
||||||
import { getDomain } from '$lib/components/common';
|
import { getDomain } from '$lib/components/common';
|
||||||
import { ErrorHandler } from '$lib/database';
|
import { ErrorHandler } from '$lib/database';
|
||||||
|
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||||
|
|
||||||
export const post: RequestHandler = async (event) => {
|
export const post: RequestHandler = async (event) => {
|
||||||
const { teamId, status, body } = await getUserDetails(event);
|
const { teamId, status, body } = await getUserDetails(event);
|
||||||
@ -54,7 +55,8 @@ export const post: RequestHandler = async (event) => {
|
|||||||
environment: config.environmentVariables,
|
environment: config.environmentVariables,
|
||||||
networks: [network],
|
networks: [network],
|
||||||
volumes: [config.volume],
|
volumes: [config.volume],
|
||||||
restart: 'always'
|
restart: 'always',
|
||||||
|
labels: makeLabelForServices('vscodeServer')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
|
@ -12,6 +12,7 @@ import {
|
|||||||
} from '$lib/haproxy';
|
} from '$lib/haproxy';
|
||||||
import { getDomain } from '$lib/components/common';
|
import { getDomain } from '$lib/components/common';
|
||||||
import { ErrorHandler } from '$lib/database';
|
import { ErrorHandler } from '$lib/database';
|
||||||
|
import { makeLabelForServices } from '$lib/buildPacks/common';
|
||||||
|
|
||||||
export const post: RequestHandler = async (event) => {
|
export const post: RequestHandler = async (event) => {
|
||||||
const { teamId, status, body } = await getUserDetails(event);
|
const { teamId, status, body } = await getUserDetails(event);
|
||||||
@ -78,7 +79,8 @@ export const post: RequestHandler = async (event) => {
|
|||||||
environment: config.wordpress.environmentVariables,
|
environment: config.wordpress.environmentVariables,
|
||||||
networks: [network],
|
networks: [network],
|
||||||
restart: 'always',
|
restart: 'always',
|
||||||
depends_on: [`${id}-mysql`]
|
depends_on: [`${id}-mysql`],
|
||||||
|
labels: makeLabelForServices('wordpress')
|
||||||
},
|
},
|
||||||
[`${id}-mysql`]: {
|
[`${id}-mysql`]: {
|
||||||
container_name: `${id}-mysql`,
|
container_name: `${id}-mysql`,
|
||||||
|
@ -87,8 +87,7 @@ export const post: RequestHandler = async (event) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fqdn) {
|
if (fqdn) {
|
||||||
const found = await checkContainer('/var/run/docker.sock', 'coolify-haproxy');
|
await startCoolifyProxy('/var/run/docker.sock');
|
||||||
if (!found) await startCoolifyProxy('/var/run/docker.sock');
|
|
||||||
const domain = getDomain(fqdn);
|
const domain = getDomain(fqdn);
|
||||||
const isHttps = fqdn.startsWith('https://');
|
const isHttps = fqdn.startsWith('https://');
|
||||||
if (domain) {
|
if (domain) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user