Compare commits

...

986 Commits

Author SHA1 Message Date
Andras Bacsai
31d7e7e806 fix: forgot that the version bump changed 😅 2022-07-06 13:46:00 +02:00
Andras Bacsai
e740788d6c chore: version++ 2022-07-06 11:49:53 +02:00
Andras Bacsai
928d53e532 fix: Seeding 2022-07-06 11:49:07 +02:00
Andras Bacsai
87ba4560ad v3.0.0 (#476)
* New Version: 3.0.0
2022-07-06 11:02:36 +02:00
Andras Bacsai
9137e8bc32 Merge pull request #469 from coollabsio/v2.9.11
v2.9.11
2022-06-20 20:48:30 +02:00
Andras Bacsai
35bd2b23d5 fix: lock file 2022-06-20 20:47:33 +02:00
Andras Bacsai
10a514d9ac fix: be able to change database + service versions 2022-06-20 20:47:10 +02:00
Andras Bacsai
71096acdff chore: version++ 2022-06-17 09:11:03 +02:00
Andras Bacsai
07da696397 Merge pull request #463 from execreate/main
Upgrade PSQL version to fix an issue with indices corruption
2022-06-17 09:10:40 +02:00
Jorilla Abdullaev
41baf150c2 upgrade PSQL version to fix an issue with CREATE INDEX CONCURRENTLY and REINDEX CONCURRENTLY that could cause silent data corruption of indexes 2022-06-17 11:08:47 +05:00
Andras Bacsai
f0a52b2ef4 Merge pull request #460 from coollabsio/scshiv29-dev/main
v2.9.9
2022-06-10 10:45:55 +02:00
Andras Bacsai
54e83fdff1 fix: remove package-lock 2022-06-10 10:45:32 +02:00
Andras Bacsai
46327ff2fc chore: version++ 2022-06-10 10:44:15 +02:00
Andras Bacsai
8b26acc841 fix: host and reload for uvicorn 2022-06-10 10:42:58 +02:00
Andras Bacsai
b90cb5a731 Merge pull request #420 from scshiv29-dev/main
Uvicorn ASGI for Python #388
2022-06-10 10:16:26 +02:00
Andras Bacsai
cd9b642c5e Merge branch 'feat/python' into main 2022-06-10 10:15:54 +02:00
Andras Bacsai
41a928d41b Merge branch 'main' into scshiv29-dev/main 2022-06-10 10:14:50 +02:00
Andras Bacsai
1388bee62c Merge pull request #459 from pucilpet/pucilpet-patch-1
Removed space from the version number
2022-06-10 08:51:36 +02:00
Petteri Pucilowski
8ebc778d40 Removed space from the version number 2022-06-10 01:30:46 +03:00
Andras Bacsai
3a59091b41 fix: nocodb persistency 2022-06-09 19:44:41 +02:00
Andras Bacsai
e764c4651c Merge pull request #454 from coollabsio/next
v2.9.8
2022-06-09 15:50:30 +02:00
Andras Bacsai
10f04d2177 fix: persistent nocodb 2022-06-09 15:49:21 +02:00
Andras Bacsai
119f994b50 chore: version++ 2022-06-09 15:49:07 +02:00
Andras Bacsai
e39541c318 fix: Traefik middleware 2022-06-09 15:18:21 +02:00
Andras Bacsai
cf88885c94 Merge pull request #452 from coollabsio/next
Fixes for v2.9.7
2022-06-09 14:01:20 +02:00
Andras Bacsai
1192346ce3 fix: remove comments 2022-06-09 14:00:41 +02:00
Andras Bacsai
0e3bd85847 fix: remove console log 2022-06-09 14:00:08 +02:00
Andras Bacsai
edeb6c6965 fix: Plausible script and middlewares 2022-06-09 13:59:09 +02:00
Andras Bacsai
138fd5cb6d Merge pull request #451 from coollabsio/next
v2.9.7
2022-06-09 13:34:02 +02:00
Andras Bacsai
155410bd44 Merge branch 'next' of github.com:coollabsio/coolify into next 2022-06-09 13:31:10 +02:00
Andras Bacsai
20bd829c2e Merge pull request #448 from titouanmathis/feat/gitlab-filter-projects-branches
feat: Add support for search for GitLab applications
2022-06-09 13:31:06 +02:00
Andras Bacsai
7b7e222946 chore: version++ 2022-06-09 13:30:29 +02:00
Andras Bacsai
98d901d06c fix: Plausible custom script 2022-06-08 13:45:42 +02:00
Titouan Mathis
4e862cda6f Add support for accessing all projects and branches for GitLab applications
Fix #236
2022-06-03 12:21:42 +02:00
Andras Bacsai
4e940807ae Merge pull request #446 from coollabsio/next
v2.9.6
2022-06-02 22:05:31 +02:00
Andras Bacsai
b081743f54 fix: pnpm command 2022-06-02 21:59:51 +02:00
Andras Bacsai
34bb9f301f fix: Fider changed an env variable name 2022-06-02 20:37:45 +02:00
Andras Bacsai
ed8a6daeea chore: version++ 2022-06-02 20:37:31 +02:00
Andras Bacsai
9e81ab43ac Merge pull request #445 from coollabsio/next
v2.9.5
2022-06-02 11:24:50 +02:00
Andras Bacsai
32d94cbe97 fix: proxy stop missing argument 2022-06-02 11:13:27 +02:00
Andras Bacsai
46a83aa457 chore: version++ 2022-06-02 11:13:14 +02:00
Andras Bacsai
08d7593ca9 Merge pull request #444 from coollabsio/next
v2.9.4
2022-06-01 10:43:30 +02:00
Andras Bacsai
a50f7a7cc2 fix: Revert gh and gl cloning 2022-06-01 10:42:17 +02:00
Andras Bacsai
2c33447f9f fix: typo 2022-05-31 23:23:39 +02:00
Andras Bacsai
d67a3f51ec fix: Demo version forms 2022-05-31 23:09:55 +02:00
Andras Bacsai
2719974262 chore: Version++ 2022-05-31 22:41:33 +02:00
Andras Bacsai
eb5aebd58d Merge pull request #442 from coollabsio/next
fix: Only reconfigure coolify proxy if its missconfigured
2022-05-31 22:30:09 +02:00
Andras Bacsai
98dbf3d8a5 fix: Only reconfigure coolify proxy if its missconfigured 2022-05-31 22:29:50 +02:00
Andras Bacsai
d9489a2cb4 Merge pull request #441 from coollabsio/next
fix: versions
2022-05-31 22:18:16 +02:00
Andras Bacsai
95832d34f7 fix: versions 2022-05-31 22:17:51 +02:00
Andras Bacsai
d3e9aea63d Merge pull request #440 from coollabsio/next
v2.9.3
2022-05-31 22:14:06 +02:00
Andras Bacsai
d6972e2ed1 fix: Recurisve clone instead of submodule 2022-05-31 21:52:25 +02:00
Andras Bacsai
50844e98be chore: version++ 2022-05-31 21:52:12 +02:00
Andras Bacsai
5c6fcfebf9 Merge pull request #439 from coollabsio/next
v2.9.2
2022-05-31 20:54:55 +02:00
Andras Bacsai
84cfe6fb42 fix: Add GIT ENV variable for submodules 2022-05-31 20:50:47 +02:00
Andras Bacsai
abf0aeb2a8 fix: Force restart proxy on seeding 2022-05-31 20:50:28 +02:00
Andras Bacsai
a7aca0ce8b fix: Only restart coolify proxy in case of version prior to 2.9.2 2022-05-31 20:25:39 +02:00
Andras Bacsai
67bb5d973b fix: force restart proxy 2022-05-31 19:39:25 +02:00
Andras Bacsai
662948d622 fix: TrustProxy 2022-05-31 19:35:07 +02:00
Andras Bacsai
f5bedfdf7f chore: Version++ 2022-05-31 19:34:55 +02:00
Andras Bacsai
db9db61d92 Merge pull request #436 from coollabsio/next
v2.9.1
2022-05-31 14:00:17 +02:00
Andras Bacsai
d255cb1973 chore: version++ 2022-05-31 13:57:55 +02:00
Andras Bacsai
6529271de2 fix: GitHub fixes 2022-05-31 13:57:42 +02:00
Andras Bacsai
0dd32b5319 Merge pull request #435 from coollabsio/next
v2.9.0 - fixes
2022-05-31 12:47:11 +02:00
Andras Bacsai
b032da798b fix: ftp connection 2022-05-31 12:02:09 +02:00
Andras Bacsai
a1a9f1531e fix: Host key verification 2022-05-31 12:01:55 +02:00
Andras Bacsai
f71b54deb2 fix: Otherfqdns 2022-05-31 11:35:04 +02:00
Andras Bacsai
c63430e342 Merge pull request #426 from christopherklint97/fix/lint-errors-services
fix: remove lint errors in database services
2022-05-31 11:25:10 +02:00
Andras Bacsai
6821b128ad Merge pull request #427 from vasani-arpit/main
adding service request link in template chooser
2022-05-31 11:23:52 +02:00
Andras Bacsai
3f8d44a01c Merge branch 'main' into main 2022-05-31 11:23:34 +02:00
Andras Bacsai
3aef04437c Merge pull request #433 from vasani-arpit/next
Support for Github codespaces and Service request issue template
2022-05-31 11:22:01 +02:00
Andras Bacsai
53e32c038b Merge pull request #434 from coollabsio/next
v2.9.0
2022-05-31 11:20:16 +02:00
Andras Bacsai
1660510614 Merge branch 'main' into next 2022-05-28 21:08:21 +02:00
Arpit Vasani
69f5601b3e Updating docs and removing redundant information 2022-05-28 16:50:45 +00:00
Arpit Vasani
6e22fecc98 adding more commands 2022-05-28 15:19:49 +00:00
Arpit Vasani
d18b2b6a1f Update devcontainer.json 2022-05-28 20:33:47 +05:30
Arpit Vasani
4b0370ac08 Let's see if this works 2022-05-28 14:58:52 +00:00
Arpit Vasani
750ef80777 adding support for github codespaces. 2022-05-28 13:08:52 +00:00
Arpit Vasani
59c62923be gradually redirecting users to fider 2022-05-28 13:00:08 +00:00
Arpit Vasani
68b220d06e Merge remote-tracking branch 'upstream/next' into next 2022-05-28 12:59:30 +00:00
Arpit Vasani
250ea64203 pulling latest changes. 2022-05-28 12:55:55 +00:00
Arpit Vasani
0ab57396d2 Removing redundant information, adding support for github codespaces. 2022-05-28 12:49:56 +00:00
Arpit Vasani
1e36856e65 gradually redirecting users to fider 2022-05-23 14:30:28 +05:30
Andras Bacsai
cfdc8db543 Deleted a file, oops 2022-05-19 16:47:45 +02:00
Andras Bacsai
1f25bc411f feat: database + service usage 2022-05-19 16:43:17 +02:00
Andras Bacsai
972f77c790 ui: css 2022-05-19 16:19:20 +02:00
Andras Bacsai
795f99bb47 fix: new source canceled view 2022-05-19 15:18:19 +02:00
Andras Bacsai
54f7142b2b disable appwrite for now 2022-05-19 15:05:56 +02:00
Andras Bacsai
26eacfc2c0 fix: Instant save on demo instance 2022-05-19 14:38:38 +02:00
Andras Bacsai
e2bf02841f fix: Demo instance save domain instantly 2022-05-19 14:36:49 +02:00
Andras Bacsai
6a59b8d27c fix: do not fetch app state in case of missconfiguration 2022-05-19 14:33:02 +02:00
Andras Bacsai
7fc43ef2bb fix: Remove gh token on git source changes 2022-05-19 14:32:47 +02:00
Andras Bacsai
70a3fc247e remove notifications for now 2022-05-19 14:32:31 +02:00
Andras Bacsai
56ab8312f1 remove notifications for now 2022-05-19 14:32:10 +02:00
Andras Bacsai
6fb6a514ac fix: Minio urls + domain checks 2022-05-19 13:45:17 +02:00
Andras Bacsai
b01f5f47b3 fix: PR deployments view 2022-05-19 13:44:45 +02:00
Andras Bacsai
ebdd3601b3 remove console.logs 2022-05-19 10:21:18 +02:00
Andras Bacsai
c0d711170b fix: Proxy for http 2022-05-19 10:20:43 +02:00
scshiv29-dev
da86f0076b Merge branch 'main' into main 2022-05-19 09:54:10 +05:30
scshiv29-dev
9d8551a9be minor fix 2022-05-19 04:23:23 +00:00
Christopher Klint
01ea86479d fix: lint errors in database services 2022-05-18 21:09:01 +02:00
Andras Bacsai
eb62888c39 fix: WIP Traefik 2022-05-18 16:54:04 +02:00
Andras Bacsai
b006fe8f68 fix: remove debug things 2022-05-18 12:33:24 +02:00
Andras Bacsai
dc3add495c wip(fix): traefik 2022-05-18 12:32:53 +02:00
Andras Bacsai
59086e9eb4 fixes 2022-05-17 15:54:11 +02:00
Andras Bacsai
e563988596 fix: Traefik 2022-05-17 14:06:07 +02:00
Andras Bacsai
5a206a140c fix: remove console.log 2022-05-17 13:25:42 +02:00
Andras Bacsai
dbf910ff38 feat: PageLoader 2022-05-17 11:16:58 +02:00
Andras Bacsai
35b31dce2b WIP: Notifications and application usage 2022-05-17 10:14:06 +02:00
Andras Bacsai
1ec620be4b WIP: Traefik 2022-05-16 23:56:54 +02:00
Andras Bacsai
8516ac671a WIP: Traefik 2022-05-16 23:20:50 +02:00
Andras Bacsai
3b7fdebe8c Merge pull request #425 from coollabsio/quickfix
v2.8.2
2022-05-16 16:19:58 +02:00
Andras Bacsai
17ac3048ac chore: Version++ 2022-05-16 16:17:41 +02:00
Andras Bacsai
4e43efef50 fix: Gastby buildpack 2022-05-16 16:17:32 +02:00
Andras Bacsai
4f4f5b1c01 WIP: Traefik 2022-05-16 16:11:35 +02:00
Andras Bacsai
1fa5c5e021 WIP: Traefik migration 2022-05-14 15:23:41 +02:00
Andras Bacsai
436e0e3a2b WIP: Traefik 2022-05-13 18:09:12 +02:00
Andras Bacsai
e717c1d599 add migration 2022-05-13 17:49:38 +02:00
Andras Bacsai
ae5d90eb47 WIP: Traefik 2022-05-12 16:53:22 +02:00
Andras Bacsai
c095cb58b3 migration 2022-05-12 13:02:40 +02:00
Andras Bacsai
6bba37c36d WIP: Traefik?! 2022-05-12 13:02:14 +02:00
Andras Bacsai
60a428a952 Remove WS for now 2022-05-11 23:21:45 +02:00
scshiv29-dev
c376123877 added uvicorn 2022-05-11 22:54:13 +05:30
scshiv29-dev
cd3663038f added uvicorn 2022-05-11 22:45:50 +05:30
Andras Bacsai
16b7c1708b WIP: Testing WS 2022-05-11 16:15:34 +02:00
Andras Bacsai
3435f92fcb WIP: Appwrite 2022-05-11 12:02:09 +02:00
Andras Bacsai
cef571b8cc chore: version++ 2022-05-11 11:03:01 +02:00
Andras Bacsai
242bc61e2d Readme update 2022-05-11 11:02:28 +02:00
Andras Bacsai
c917135bd3 fix: Service checks 2022-05-11 11:02:21 +02:00
Andras Bacsai
3802158ad5 Merge pull request #419 from coollabsio/next
v2.8.1
2022-05-10 18:25:38 +02:00
Andras Bacsai
e452f68614 fix: UI 2022-05-10 18:25:23 +02:00
Andras Bacsai
9586213dd1 fix: WP custom db 2022-05-10 18:21:05 +02:00
Andras Bacsai
30781f218c Merge branch 'main' into next 2022-05-10 14:59:57 +02:00
Andras Bacsai
697c42ff66 update readme 2022-05-10 14:58:49 +02:00
Andras Bacsai
37d8f1847c fix: Default Python package 2022-05-10 14:26:25 +02:00
Andras Bacsai
2af13fff55 chore: Version++ 2022-05-10 14:16:04 +02:00
Andras Bacsai
51e8ca8de0 fix: UI 2022-05-10 13:44:36 +02:00
Andras Bacsai
06228cd2a7 fix: UI 2022-05-10 13:40:30 +02:00
Andras Bacsai
0033baafdc fix: UI 2022-05-10 13:36:39 +02:00
Andras Bacsai
79dfc6a660 Merge pull request #416 from coollabsio/next
v2.8.0
2022-05-10 11:50:07 +02:00
Andras Bacsai
972b0fa811 fix: Remove RC python 2022-05-10 11:14:25 +02:00
Andras Bacsai
ad51a9ebc8 feat: Python image selection 2022-05-10 11:10:58 +02:00
Andras Bacsai
51a40d049d fix: UI 2022-05-10 10:54:47 +02:00
Andras Bacsai
8b3113bd92 fix: UI 2022-05-10 10:34:50 +02:00
Andras Bacsai
d6b6938555 fix: Navbar UI 2022-05-10 10:14:48 +02:00
Andras Bacsai
ce52608f19 feat: WP could have custom db 2022-05-10 10:12:13 +02:00
Andras Bacsai
ede37d296b fix: UI 2022-05-09 23:52:49 +02:00
Andras Bacsai
6374b1284b fix Mongodb icon 2022-05-09 23:51:40 +02:00
Andras Bacsai
6ac8dd8907 fix: Expose ports for services 2022-05-09 15:18:25 +02:00
Andras Bacsai
24c655d7ef feat: Custom script path for Plausible 2022-05-09 15:05:24 +02:00
Andras Bacsai
1f087cc29a fix: Server usage only shown for root team 2022-05-09 14:11:34 +02:00
Andras Bacsai
c3684a1650 chore: version++ 2022-05-09 14:08:13 +02:00
Andras Bacsai
a410fd0776 feat: usage on dashboard 2022-05-09 14:03:07 +02:00
Andras Bacsai
271fb1358d feat: show usage trends 2022-05-09 13:01:00 +02:00
Andras Bacsai
a4d53a28eb feat: Basic server usage on dashboard 2022-05-09 12:45:17 +02:00
Andras Bacsai
e69e32f6c7 fix: default packagemanager 2022-05-09 09:12:21 +02:00
Andras Bacsai
650409dde3 chore: version++ 2022-05-07 10:41:52 +02:00
Andras Bacsai
f3f4bb5105 fix: No image for Docker buildpack 2022-05-07 10:41:31 +02:00
Andras Bacsai
9c02af6b52 Update github-actions.yml 2022-05-06 15:41:42 +02:00
Andras Bacsai
6a3f4ba171 Merge pull request #413 from coollabsio/next
v2.7.0 again
2022-05-06 15:40:30 +02:00
Andras Bacsai
6a6426fe6b fix: Sentry 2022-05-06 15:40:07 +02:00
Andras Bacsai
21256746c3 Update github-actions.yml 2022-05-06 15:23:18 +02:00
Andras Bacsai
c34d643f95 Update github-actions.yml 2022-05-06 15:22:22 +02:00
Andras Bacsai
0be402af82 Update github-actions.yml 2022-05-06 15:18:38 +02:00
Andras Bacsai
b5b0b6524d Update github-actions.yml 2022-05-06 15:10:28 +02:00
Andras Bacsai
22f1a3c908 Merge pull request #412 from coollabsio/next
v2.7.0
2022-05-06 14:55:45 +02:00
Andras Bacsai
fa5f439858 fix: Cancel 2022-05-06 14:45:50 +02:00
Andras Bacsai
7cc760eecf fix: Disable sentry for now 2022-05-06 14:43:28 +02:00
Andras Bacsai
af0652f6b2 fix: DNS check 2022-05-06 14:07:43 +02:00
Andras Bacsai
9e009bebaa fix 2022-05-06 11:53:53 +02:00
Andras Bacsai
8e53ae3484 fix: Check DNS in prod only 2022-05-06 11:42:24 +02:00
Andras Bacsai
7ceb8f1537 fix: Better DNS check to prevent errors 2022-05-06 11:41:39 +02:00
Andras Bacsai
b0eae8cfe9 fix: Cancel old builds in database 2022-05-06 09:55:39 +02:00
Andras Bacsai
febef372b8 fix: Cancel jobs 2022-05-06 08:42:06 +02:00
Andras Bacsai
a18e3659aa TODO for myself 2022-05-05 15:28:32 +02:00
Andras Bacsai
e2e342851a fix: Remove debug info 2022-05-05 15:25:22 +02:00
Andras Bacsai
bee3292088 fixes 2022-05-05 15:23:34 +02:00
Andras Bacsai
f56d4dbbb3 fix: Check domain for coolify before saving 2022-05-05 15:18:13 +02:00
Andras Bacsai
eccd7c96d7 fix: Do not run SSL renew in development 2022-05-05 13:31:36 +02:00
Andras Bacsai
4046c472ed chore: version++ 2022-05-05 13:29:46 +02:00
Andras Bacsai
0da4a1024a Add feedback link 2022-05-05 13:22:42 +02:00
Andras Bacsai
aa2f328640 fix: logos for dbs 2022-05-05 13:20:59 +02:00
Andras Bacsai
4d22b610b6 Merge pull request #398 from vasani-arpit/main
Structured issue making using new github issues forms.
2022-05-05 13:10:10 +02:00
Andras Bacsai
e91c3eab9c Merge pull request #396 from Cyril-Beeckman/main
[WIP] Added MariaDB database
2022-05-05 13:06:58 +02:00
Andras Bacsai
2e8fd6f0c7 fix: exposedPorts 2022-05-04 15:45:44 +02:00
Andras Bacsai
90fde24b40 Merge pull request #318 from CharcoalStyles/exposePort
Added expose port for applications
2022-05-04 15:45:16 +02:00
Andras Bacsai
02a1f50776 Update README.md 2022-05-04 14:40:00 +02:00
Andras Bacsai
57b97a9204 Merge pull request #411 from coollabsio/gh-actions
GitHub Actions for release
2022-05-04 14:37:50 +02:00
Andras Bacsai
1ec03693d3 Update github-actions.yml 2022-05-04 14:31:03 +02:00
Andras Bacsai
4246d86694 Update github-actions.yml 2022-05-04 14:30:35 +02:00
Andras Bacsai
2cce1f8459 Update github-actions.yml 2022-05-04 14:11:46 +02:00
Andras Bacsai
3937cfec53 Update github-actions.yml 2022-05-04 14:08:24 +02:00
Andras Bacsai
259aeeb67a Update github-actions.yml 2022-05-04 14:06:06 +02:00
Andras Bacsai
9d53bc0926 Update github-actions.yml 2022-05-04 14:03:00 +02:00
Andras Bacsai
1211f3c9fd Update github-actions.yml 2022-05-04 13:59:59 +02:00
Andras Bacsai
c07d6aa702 Update github-actions.yml 2022-05-04 13:44:48 +02:00
Andras Bacsai
4f662dbf21 Update github-actions.yml 2022-05-04 13:36:46 +02:00
Andras Bacsai
a4301c5d23 Update github-actions.yml 2022-05-04 13:32:35 +02:00
Andras Bacsai
86b7824c78 Update github-actions.yml 2022-05-04 13:22:54 +02:00
Andras Bacsai
435f063c36 Update and rename github-actions-demo.yml to github-actions.yml 2022-05-04 13:20:46 +02:00
Andras Bacsai
902a764ff2 Update github-actions-demo.yml 2022-05-04 13:06:15 +02:00
Andras Bacsai
4097378847 Update github-actions-demo.yml 2022-05-04 13:05:01 +02:00
Andras Bacsai
5f3567e808 Create github-actions-demo.yml 2022-05-04 13:02:16 +02:00
Andras Bacsai
7325353ced Merge pull request #406 from coollabsio/next
v2.6.3
2022-05-03 22:50:53 +02:00
Andras Bacsai
68f5b32876 fix: missing node versions 2022-05-03 22:49:52 +02:00
Andras Bacsai
8d4eaad920 Merge pull request #402 from coollabsio/next
v2.6.2
2022-05-03 12:11:39 +02:00
Andras Bacsai
4b38865cc9 fix: Webhook build images 2022-05-03 12:07:37 +02:00
Andras Bacsai
030cb124e5 Merge pull request #400 from coollabsio/next
v2.6.1
2022-05-03 11:41:51 +02:00
Andras Bacsai
fd363ec017 update readme.md 2022-05-03 11:40:09 +02:00
Andras Bacsai
8b813fb07a fix: Renew certificates 2022-05-03 11:40:02 +02:00
Aaron Styles
326f0dac1b Merge github.com:coollabsio/coolify into exposePort 2022-05-03 16:14:58 +10:00
Arpit Vasani
828faaf2b1 Update --bug-report.yaml 2022-05-03 11:38:49 +05:30
Arpit Vasani
9582664406 Create --task.yaml 2022-05-03 11:37:32 +05:30
Arpit Vasani
ec5474b72b Create --feature-request.yaml 2022-05-03 11:36:13 +05:30
Arpit Vasani
62d1011d9f Create --bug-report.yaml 2022-05-03 11:33:19 +05:30
Arpit Vasani
0a7ec6bd20 Create config.yml 2022-05-03 11:29:10 +05:30
Cyril Beeckman
b84c37cd8f Update README and remove duplicate for NextJS 2022-05-02 20:27:39 +02:00
Cyril Beeckman
887d65e512 Change MariaDB logo 2022-05-02 17:06:25 +02:00
Cyril Beeckman
3543a9c809 Added MariaDB database 2022-05-02 16:25:24 +02:00
Andras Bacsai
40da3ff9fe fix: Update autoupdate env variable 2022-05-02 15:50:40 +02:00
Andras Bacsai
2315192f4b Merge pull request #380 from coollabsio/next
v2.6.0
2022-05-02 14:59:40 +02:00
Andras Bacsai
0faa1540f4 ui fixes 2022-05-02 14:42:19 +02:00
Andras Bacsai
00cab67e73 feat: Cancel builds! 2022-05-02 14:15:50 +02:00
Andras Bacsai
b92bc9eebb fix: build image 2022-05-02 13:00:13 +02:00
Andras Bacsai
1905db16e8 beta features 2022-05-02 09:43:38 +02:00
Andras Bacsai
3e9cf7285b fix locale 2022-05-02 09:21:01 +02:00
Andras Bacsai
6fdbc572fe update locale 2022-05-02 09:13:56 +02:00
Aaron Styles
f94e17134e Added expose port for Services 2022-04-30 22:47:00 +10:00
Andras Bacsai
3fd50ebb12 fix: checking low disk space 2022-04-30 13:54:19 +02:00
Aaron Styles
40cbee0d75 Removed some checking that doesn't work properly. Added a switch for exposing a port. 2022-04-30 21:34:00 +10:00
Andras Bacsai
0eb7f4526e feat: DNS check settings for SSL generation 2022-04-30 13:21:18 +02:00
Andras Bacsai
646d92757a fix: Fider envs 2022-04-29 23:51:40 +02:00
Andras Bacsai
51efa01b11 fix: migration 2022-04-29 23:41:31 +02:00
Andras Bacsai
dc4a63ef92 fix: UI 2022-04-29 23:36:10 +02:00
Andras Bacsai
1b717ac091 Explainer 2022-04-29 23:33:04 +02:00
Andras Bacsai
e93d97f2bc Revert "fix: Always use IP address for webhooks"
This reverts commit 880865f1f2.
2022-04-29 23:25:15 +02:00
Andras Bacsai
45c904e876 fix: remove unnecessary test endpoint 2022-04-29 23:25:02 +02:00
Andras Bacsai
880865f1f2 fix: Always use IP address for webhooks 2022-04-29 23:02:58 +02:00
Andras Bacsai
8e42203b89 feat: Database and services logs 2022-04-29 22:25:37 +02:00
Andras Bacsai
2bd91fa970 migration for fider 2022-04-29 22:25:27 +02:00
Andras Bacsai
a3fd95020d feat: Fider service 2022-04-29 22:25:04 +02:00
Andras Bacsai
e5b1ce4eef feat: Laravel 2022-04-29 22:24:14 +02:00
Andras Bacsai
531973baab feat: Laravel buildpack is working! 2022-04-29 11:26:31 +02:00
Andras Bacsai
b6e6a1ccf1 WIP laravel 2022-04-28 16:40:32 +02:00
Andras Bacsai
1140afe2c9 feat: gzip compression 2022-04-28 16:40:23 +02:00
Andras Bacsai
f8f17832de WIP Laravel 2022-04-28 16:31:46 +02:00
Andras Bacsai
caaf030517 WIP: Laravel 2022-04-28 15:10:45 +02:00
Andras Bacsai
106aee31bd fix: Team switching moved to IAM menu 2022-04-28 14:12:19 +02:00
Aaron Styles
c98ed5338a Merged upstream and fixed expose port implementation 2022-04-28 21:49:13 +10:00
Andras Bacsai
48fa4ff245 feat: Hasura as a service 2022-04-27 15:37:50 +02:00
Andras Bacsai
d75d2880e5 fix: Unami svg size 2022-04-27 15:19:07 +02:00
Andras Bacsai
ec907b0ce4 Merge branch 'next' of github.com:coollabsio/coolify into next 2022-04-27 14:56:30 +02:00
Andras Bacsai
2cda0b22c2 chore: version++ 2022-04-27 14:56:24 +02:00
Andras Bacsai
a0076db42e Merge pull request #378 from KayhanB/main
Added new services to readme
2022-04-27 14:07:10 +02:00
Burak
a37cf49c2a Merge pull request #1 from KayhanB/update-readme
update readme for newly added services
2022-04-26 22:46:40 +03:00
Burak
c4833c3cc2 update readme for newly added services 2022-04-26 22:45:59 +03:00
Andras Bacsai
d03fbd9224 feat: select base image for buildpacks 2022-04-26 14:51:08 +02:00
Andras Bacsai
5998212b82 WIP: Base image selector 2022-04-25 23:44:06 +02:00
Andras Bacsai
62ccab22d6 fix: Packagemanager finder 2022-04-25 23:08:08 +02:00
Andras Bacsai
5ccea1cfcc Merge pull request #370 from coollabsio/next
v2.5.2
2022-04-25 17:49:07 +02:00
Andras Bacsai
8ccb1bd34c show autoupdate in localhost 2022-04-25 17:48:25 +02:00
Andras Bacsai
c1a48dcf1e feat: Autoupdater 2022-04-25 15:51:43 +02:00
Andras Bacsai
11d74c0c1f feat: Coolify auto-updater 2022-04-25 09:54:28 +02:00
Andras Bacsai
8290ee856f migration for umami 2022-04-25 09:11:49 +02:00
Andras Bacsai
08332c8321 fix: Contribution guide 2022-04-25 08:55:04 +02:00
Andras Bacsai
046f738b7d feat: Umami service 2022-04-25 08:54:53 +02:00
Andras Bacsai
07708155ac WIP: Umami service 2022-04-25 00:00:06 +02:00
Andras Bacsai
df5e23c7c2 fix: Contribution guide 2022-04-24 00:27:27 +02:00
Andras Bacsai
41adc02801 fix: Contribution 2022-04-24 00:25:38 +02:00
Andras Bacsai
72b650b086 fix: Simplify list services 2022-04-24 00:24:08 +02:00
Andras Bacsai
06fe3f33c0 fix: Contribution guide 2022-04-24 00:23:35 +02:00
Andras Bacsai
cbabf7fc51 chore: version++ 2022-04-23 18:46:00 +02:00
Andras Bacsai
6aeafda604 fix: Reactivate posgtres password 2022-04-23 16:12:16 +02:00
Andras Bacsai
30d656698e Merge pull request #369 from coollabsio/next
v2.5.1
2022-04-23 13:16:35 +02:00
Andras Bacsai
94d1af01df Merge pull request #365 from coollabsio/restray-restray_i18n
v2.5.1
2022-04-23 13:15:13 +02:00
Andras Bacsai
af97d399b6 fix: Code cleanups 2022-04-22 13:57:28 +02:00
Andras Bacsai
2f90fd1fe6 fix: No logs found 2022-04-22 11:44:04 +02:00
Andras Bacsai
c05a140b0b fix: GitHub token cleanup on team switch 2022-04-22 11:43:55 +02:00
Andras Bacsai
cbfb9a3844 chore: version++ 2022-04-22 11:20:15 +02:00
Andras Bacsai
5a227f70c6 fix: Do not activate i18n for now 2022-04-22 11:19:56 +02:00
Andras Bacsai
44a102443d fix: Application logs is not reversed and queried better 2022-04-21 23:07:54 +02:00
Andras Bacsai
cf7fdf198d fix: locales 2022-04-21 14:57:52 +02:00
Andras Bacsai
68f2f4f978 fix: Vscode permission fix 2022-04-21 11:25:51 +02:00
Andras Bacsai
029b623f08 fix: i18n 2022-04-21 10:05:27 +02:00
Andras Bacsai
fe3702847a Merge branch 'restray_i18n' of https://github.com/restray/coolify into restray-restray_i18n 2022-04-21 09:51:29 +02:00
Andras Bacsai
e9b852a30e Merge pull request #361 from coollabsio/next
v2.5.0
2022-04-20 23:14:54 +02:00
Andras Bacsai
1d4e5df5a2 fix contribution guide 2022-04-20 23:14:19 +02:00
Andras Bacsai
5e14b72fe4 Merge pull request #362 from coollabsio/contribution
Extended contribution guide
2022-04-20 23:08:50 +02:00
Andras Bacsai
8ebff72cde fix: Correct branch shown in build logs 2022-04-20 23:02:19 +02:00
Andras Bacsai
e16643c48c feat: Query container state periodically 2022-04-20 22:49:24 +02:00
Andras Bacsai
65c8f55ee6 fix: Text on deno buildpack 2022-04-20 22:27:10 +02:00
Andras Bacsai
fbc81ab3eb feat/fix: Show exited containers on UI & better UX 2022-04-20 22:24:41 +02:00
Andras Bacsai
a4d56fd79a feat: Deno DB migration 2022-04-20 22:24:00 +02:00
Andras Bacsai
ce45cb8aca package updates 2022-04-20 22:23:35 +02:00
Andras Bacsai
7f8428cd17 fix: Deno configurations 2022-04-20 22:23:25 +02:00
Andras Bacsai
14d79031c1 Merge pull request #360 from lichtscheu/buildpack-deno
Buildpack Deno
2022-04-20 19:06:27 +02:00
Andras Bacsai
b8aa7b6d08 Internal changes 2022-04-20 15:15:18 +02:00
Andras Bacsai
397ca7f20e Merge pull request #357 from coollabsio/next
v2.4.11
2022-04-20 14:19:49 +02:00
Andras Bacsai
e10b76a46b feat: Fluentbit investigation 2022-04-20 13:33:04 +02:00
Andras Bacsai
b46566280d fix: Application logs 2022-04-20 09:23:06 +02:00
Andras Bacsai
3ab6a231eb feat: Testing fluentd logging driver 2022-04-20 00:20:37 +02:00
lichtscheu
2bc2ae9b6e Merge remote-tracking branch 'upstream/next' into buildpack-deno
# Conflicts:
#	src/routes/applications/[id]/index.svelte
2022-04-19 23:17:03 +02:00
Andras Bacsai
2b28f8bd8f feat: Multiply dockerfile locations for docker buildpack 2022-04-19 22:34:28 +02:00
lichtscheu
dcdac29135 Merge remote-tracking branch 'upstream/main' into buildpack-deno 2022-04-19 22:09:21 +02:00
lichtscheu
591ee29e0d feat: initial deno support 2022-04-19 22:08:42 +02:00
Andras Bacsai
625e71ab08 fix: white-labeled custom logo 2022-04-19 18:23:04 +02:00
Andras Bacsai
b0af54587b feat: Add persistent storage for services 2022-04-18 23:49:08 +02:00
Andras Bacsai
be3080df08 fix: Pull new images for services all the time it's started. 2022-04-18 22:51:55 +02:00
Andras Bacsai
04685c9f9d fix: Scroll to top for logs 2022-04-18 22:46:39 +02:00
Andras Bacsai
1a83f2635f fix: Switch to stream on applications logs 2022-04-18 00:44:08 +02:00
Andras Bacsai
630aa45c87 fix: Application logs paginated 2022-04-18 00:42:08 +02:00
Andras Bacsai
0c3a381d1f fix: Buildlog line number is not string 2022-04-17 23:32:27 +02:00
Andras Bacsai
ffac7c5c87 chore:version++ 2022-04-17 21:08:19 +02:00
Andras Bacsai
410800e81c fix: use arm based certbot on arm 2022-04-17 21:07:59 +02:00
Andras Bacsai
9481beb61f Merge pull request #355 from coollabsio/next
v2.4.10
2022-04-17 20:37:56 +02:00
Andras Bacsai
141f2481a7 fix: Change user's id in sftp wp instance 2022-04-17 20:22:42 +02:00
Andras Bacsai
ea18f25adc ui: show extraconfig if wp is running 2022-04-17 20:22:21 +02:00
Andras Bacsai
9018184747 fix: Stop sFTP connection on wp stop 2022-04-17 20:22:07 +02:00
Andras Bacsai
4fc2dd55f5 chore: version++ 2022-04-17 19:17:20 +02:00
Andras Bacsai
5ef9a282eb fix: Wordpress extra config 2022-04-17 19:17:12 +02:00
Andras Bacsai
93a6518974 docs: update 2022-04-16 23:04:29 +02:00
Andras Bacsai
07aa285b27 updates on docs 2022-04-16 22:31:30 +02:00
Andras Bacsai
bf01e9e29f Grammar things 2022-04-16 22:28:17 +02:00
Andras Bacsai
d70672ba4b switch example type 2022-04-16 22:21:42 +02:00
Andras Bacsai
5eeb519ed6 docs: update 2022-04-16 22:19:41 +02:00
Andras Bacsai
5f047e4adf docs: How to add new services 2022-04-16 22:16:47 +02:00
Andras Bacsai
56b9a376bd fix: use redis-alpine 2022-04-14 23:48:52 +02:00
Andras Bacsai
0a1d31a188 Merge pull request #349 from coollabsio/v2.4.9
fix: Switch from bitnami/redis to normal redis
2022-04-14 23:42:13 +02:00
Andras Bacsai
64c9fb9a1b fix: Switch from bitnami/redis to normal redis 2022-04-14 23:40:23 +02:00
Andras Bacsai
47aad15cd5 Merge pull request #347 from coollabsio/v2.4.9
v2.4.9
2022-04-14 23:29:15 +02:00
Andras Bacsai
260a47a366 fix: Id of service container 2022-04-14 23:11:24 +02:00
Andras Bacsai
fd4bbe17f0 fix: Restart local docker coolify proxy in case of something happens to it 2022-04-14 21:43:22 +02:00
Andras Bacsai
25ff637703 fix: Remove proxy container in case of dependent container is down 2022-04-14 21:43:05 +02:00
Andras Bacsai
f571453696 fix: Better performance for cleanup images 2022-04-14 18:45:42 +02:00
Andras Bacsai
5cd7533972 fix: Loading of new destinations 2022-04-14 18:34:43 +02:00
Andras Bacsai
3a252509d0 fix: Add HTTP proxy checks 2022-04-14 15:04:18 +02:00
Andras Bacsai
2bd3802a6f fix: Improved tcp proxy monitoring for databases/ftp 2022-04-14 00:04:46 +02:00
Andras Bacsai
ce2757f514 fix: Teams view 2022-04-13 21:06:22 +02:00
Andras Bacsai
8419cdf604 fix: Postgres root pw is pw field 2022-04-13 19:59:30 +02:00
Andras Bacsai
907c2414ae chore:version++ 2022-04-13 19:52:56 +02:00
Andras Bacsai
f82207564f Merge pull request #344 from coollabsio/v2.4.8
v2.4.8
2022-04-13 19:19:04 +02:00
Andras Bacsai
991a09838c chore: version++ 2022-04-13 16:08:40 +02:00
Andras Bacsai
25df4bfd85 fix: Remove system wide pw reset 2022-04-13 16:05:26 +02:00
Andras Bacsai
d2f89d001b fix: GitLab typo 2022-04-13 16:05:08 +02:00
Andras Bacsai
1971f227fd fix: Register should happen if coolify proxy cannot be started 2022-04-13 14:23:42 +02:00
Andras Bacsai
c1adffe260 Merge pull request #343 from coollabsio/v2.4.7
v2.4.7
2022-04-13 13:12:35 +02:00
Andras Bacsai
e725887a55 chore:version++ 2022-04-13 13:12:23 +02:00
Andras Bacsai
5bf79b75b0 fix: Destinations to HAProxy 2022-04-13 13:10:04 +02:00
Andras Bacsai
6926975e40 Merge pull request #341 from coollabsio/v2.4.6
v2.4.6
2022-04-13 08:40:10 +02:00
Andras Bacsai
978a01c968 fix: Reverting postgres password for now 2022-04-13 08:35:20 +02:00
Andras Bacsai
f421f5ee84 fix: No permission on first registration 2022-04-12 23:57:08 +02:00
Andras Bacsai
383831c7b8 fix: Restart policy for resources 2022-04-12 23:12:09 +02:00
Andras Bacsai
41329facf7 fix: Try catch me 2022-04-12 22:49:48 +02:00
Andras Bacsai
7d3c644148 fix: DNS check before creating SSL cert 2022-04-12 22:18:54 +02:00
Andras Bacsai
7fab9b5930 fix: ProjectID for Github 2022-04-12 22:18:43 +02:00
Andras Bacsai
58763ef84c fix: Load all branches, not just the first 30 2022-04-12 21:48:50 +02:00
Andras Bacsai
0e6abf172b fix: Meilisearch service 2022-04-12 21:09:38 +02:00
Andras Bacsai
9e681ece41 chore: version++ 2022-04-12 20:58:02 +02:00
Andras Bacsai
28f87a306d fix: Cleanup images older than a day 2022-04-12 20:57:49 +02:00
Andras Bacsai
23e8833208 Merge pull request #339 from coollabsio/v2.4.5
v2.4.5
2022-04-12 19:08:46 +02:00
Andras Bacsai
03962663c2 fix: Timeout values 2022-04-12 18:21:10 +02:00
Andras Bacsai
cc2ec55c4d chore: version++ 2022-04-12 16:50:13 +02:00
Andras Bacsai
ff2c38aa16 fix: Invitations 2022-04-12 16:49:59 +02:00
Andras Bacsai
b5a9a2cea8 fix: Types 2022-04-12 16:49:52 +02:00
Andras Bacsai
cd3f661f7e Merge pull request #336 from coollabsio/v2.4.4
v2.4.4
2022-04-12 11:02:35 +02:00
Andras Bacsai
41bf6b5b86 fixes 2022-04-12 10:47:53 +02:00
Andras Bacsai
a4e7c85184 Add only amd release 2022-04-12 10:14:18 +02:00
Andras Bacsai
19aca9ab35 chore: version++ 2022-04-12 10:13:19 +02:00
Andras Bacsai
08704c289a fix: Proxy 2022-04-12 10:12:46 +02:00
Andras Bacsai
2224c22c6e fix: haproxy build stuffs 2022-04-12 09:22:27 +02:00
Andras Bacsai
b281889acd Merge branch 'main' of github.com:coollabsio/coolify into main 2022-04-12 09:20:12 +02:00
Andras Bacsai
cfc50a27b0 Package.json update 2022-04-12 09:19:48 +02:00
Andras Bacsai
ed5f21da6a Merge pull request #335 from coollabsio/arm
v2.4.3 - ARM!
2022-04-12 09:10:57 +02:00
Andras Bacsai
78f3eb81dd Merge pull request #314 from Mobilpadde/fix-coloured-tooltips
Tooltip with corresponding colours
2022-04-12 07:57:09 +02:00
Andras Bacsai
6a833934ce Merge pull request #293 from dominicbachmann/improve-typing
Started to introduce more typing
2022-04-11 22:40:47 +02:00
Andras Bacsai
45bf6f77d1 Merge branch 'arm' into improve-typing 2022-04-11 22:39:45 +02:00
Andras Bacsai
a1b3b7b687 Merge branch 'arm' of github.com:coollabsio/coolify into arm 2022-04-11 22:31:32 +02:00
Andras Bacsai
7ebcad6abb fix: Update dockerfile 2022-04-11 22:31:27 +02:00
Andras Bacsai
fed6d2bf07 Merge pull request #301 from esdete2/main
Rearrange ARGs in Docker build pack
2022-04-11 22:31:16 +02:00
Andras Bacsai
bea4943e9f chore: update build packages 2022-04-11 20:43:19 +02:00
Andras Bacsai
1979e431b8 chore: update build scripts 2022-04-11 20:40:06 +02:00
Andras Bacsai
9bead1d6b4 chore: Version++ 2022-04-11 20:36:46 +02:00
Andras Bacsai
56c4295e16 chore: Update packages 2022-04-11 20:36:15 +02:00
Andras Bacsai
7c7b5a61e5 fix: Remove unnecessary save button haha 2022-04-11 20:36:03 +02:00
Andras Bacsai
abaa13fda8 Merge branch 'main' into arm 2022-04-11 20:29:29 +02:00
esdete
042bfeddbb Merge branch 'main' into main 2022-04-11 17:47:50 +02:00
Mads Bram Cordes
f45ab067ce Add fuchsia for IAM 2022-04-11 16:58:00 +02:00
Mads Bram Cordes
97a6f04aaa Merge branch 'main' into fix-coloured-tooltips 2022-04-11 16:55:37 +02:00
Aaron Charcoal Styles
27f1e1d7cd Merge branch 'main' into exposePort 2022-04-11 09:49:07 +00:00
Andras Bacsai
417c01d6e0 Merge pull request #331 from coollabsio/v2.4.2
v2.4.2
2022-04-10 00:44:22 +02:00
Andras Bacsai
b2e7435d0f chore: version++ 2022-04-10 00:40:12 +02:00
Andras Bacsai
73c9cb1d51 Revert source configuration changes 2022-04-10 00:39:50 +02:00
Andras Bacsai
41c5dd3b53 fix: Show config missing on sources 2022-04-10 00:36:42 +02:00
Andras Bacsai
bb0c93dc2f fix: Return own and other sources better 2022-04-10 00:31:10 +02:00
Andras Bacsai
7953c1df30 fix: Missing install repositories GitHub 2022-04-10 00:30:47 +02:00
esdete
c3f4245164 Merge branch 'main' into main 2022-04-09 15:44:13 +02:00
Andras Bacsai
369001febb Merge pull request #326 from coollabsio/v2.4.1
v2.4.1
2022-04-09 14:17:48 +02:00
Andras Bacsai
7ec296be6b fix: DB Connecting string generator 2022-04-09 13:58:13 +02:00
Andras Bacsai
d2f5a58f3b fix: Able to change postgres user password from ui 2022-04-09 13:33:23 +02:00
Andras Bacsai
f4315144af chore: version++ 2022-04-09 13:26:08 +02:00
Andras Bacsai
e92775887d fix: Postgres root passwor shown and set 2022-04-09 13:26:00 +02:00
Andras Bacsai
a5f1b4b675 fix: Enable https for Ghost 2022-04-09 13:25:46 +02:00
Aaron Charcoal Styles
8f3f9ebade Merge branch 'main' into exposePort 2022-04-08 18:48:16 +00:00
esdete
157e5fd7aa Merge branch 'main' into main 2022-04-08 20:07:43 +02:00
Andras Bacsai
5e7e1c11c7 Merge pull request #307 from coollabsio/v2.4.0
v2.4.0
2022-04-08 15:20:34 +02:00
Andras Bacsai
e8516bc831 ui: fixes 2022-04-08 15:12:10 +02:00
Andras Bacsai
e3f78a1cf9 ui: fixes 2022-04-08 15:02:48 +02:00
Andras Bacsai
3449e0f8fc ui: fix 2022-04-08 14:16:14 +02:00
Andras Bacsai
66af12f9b5 ui: fixes 2022-04-08 14:12:06 +02:00
Andras Bacsai
13acf09dcc ui: fixes 2022-04-08 14:03:21 +02:00
Andras Bacsai
ce71dccbc1 fix: Missing buildpack 2022-04-08 11:19:01 +02:00
Andras Bacsai
d9ba1a0b5c fix: typo 2022-04-08 11:16:07 +02:00
Andras Bacsai
0b709c93a8 fix: html/apiUrls cannot end with / 2022-04-08 10:57:44 +02:00
Andras Bacsai
1657e5a151 fix: no line during buildLog 2022-04-08 10:54:40 +02:00
Andras Bacsai
a165b21950 ui: fix 2022-04-08 10:47:01 +02:00
Andras Bacsai
0d0715a340 ui/fix: Insane amount 2022-04-08 10:35:16 +02:00
Aaron Styles
1bd33fea98 Added expose port for applications 2022-04-08 17:12:01 +10:00
Andras Bacsai
76754ded79 docs: Contribution guide 2022-04-08 00:28:10 +02:00
Andras Bacsai
4da27a46a2 fix: self-hosted GitLab URL 2022-04-08 00:16:10 +02:00
Mads Bram Cordes
039953588e Add tooltip colours to correspond with colour of Icon 2022-04-08 00:11:30 +02:00
Andras Bacsai
b8b4f559db fix: Unique storage paths 2022-04-08 00:09:09 +02:00
Andras Bacsai
2b0df270df fix: small typo 2022-04-07 23:58:56 +02:00
Andras Bacsai
b96c1a23ec fix: Ton of updates for users/teams 2022-04-07 23:26:06 +02:00
Andras Bacsai
f779b3bb54 fix: fix for the fix that fixes the fix 2022-04-07 21:29:45 +02:00
Andras Bacsai
6462982d12 fix: www or not-www, that's the question 2022-04-07 21:24:05 +02:00
Andras Bacsai
84b4cc5d54 fix: Last commit 2022-04-07 21:18:36 +02:00
Andras Bacsai
1bd2ccbc16 fix: Possible fix for spikes in CPU usage 2022-04-07 21:12:41 +02:00
Andras Bacsai
3abe1610bf fix: Do not trigger >1 webhooks on GitLab 2022-04-07 20:37:08 +02:00
Andras Bacsai
61716738ed ui: fix 2022-04-07 19:17:03 +02:00
Andras Bacsai
4e819f6eba ui: fix 2022-04-07 19:11:58 +02:00
Andras Bacsai
fedb38f2bc ui: fix 2022-04-07 18:51:52 +02:00
Andras Bacsai
aae108032c ui:fix 2022-04-07 18:45:21 +02:00
Andras Bacsai
020013683b ui: fix 2022-04-07 16:02:02 +02:00
Andras Bacsai
70de2538e2 ui: fix 2022-04-07 16:01:14 +02:00
Andras Bacsai
9f581c82a9 ui: fix 2022-04-07 15:59:01 +02:00
Andras Bacsai
eb2e07afc5 ui: fixes 2022-04-07 15:50:57 +02:00
Andras Bacsai
9c47b8495c ui: fix 2022-04-07 15:40:32 +02:00
Andras Bacsai
2f8d0ee60c ui: Better layout for root team 2022-04-07 15:23:32 +02:00
Andras Bacsai
5bf14f4639 feat: Able to modify database passwords 2022-04-07 14:29:40 +02:00
dominicbachmann
9da08d600b Merged v2.4.0 2022-04-07 01:03:13 +02:00
Andras Bacsai
4d47eab07c fix: Team view for root team 2022-04-06 22:34:56 +02:00
Andras Bacsai
f2061c5c25 fix: Only show proxy for admin team 2022-04-06 22:28:03 +02:00
Andras Bacsai
430fc66ed7 fix: Updated db versions 2022-04-06 22:15:13 +02:00
Andras Bacsai
bcb84b8126 Revert "fix: Do not pull latest image"
This reverts commit dd83e86bc3.
2022-04-06 22:10:48 +02:00
Andras Bacsai
dd83e86bc3 fix: Do not pull latest image 2022-04-06 22:06:14 +02:00
Andras Bacsai
3e8a8364dc feat: Basic white labeled version 2022-04-06 22:01:41 +02:00
dominicbachmann
be41c0dd02 Added types for store 2022-04-06 21:51:19 +02:00
dominicbachmann
a17b7a564e Added types for form 2022-04-06 21:49:43 +02:00
Andras Bacsai
f3cdda29bc code improvement 2022-04-06 21:37:42 +02:00
dominicbachmann
de37ee9f1c Added types for crypto 2022-04-06 21:10:37 +02:00
dominicbachmann
8212868b92 Added types for api 2022-04-06 21:09:15 +02:00
dominicbachmann
b44d8578d9 Added types for queues/sslrenewal 2022-04-06 21:05:36 +02:00
dominicbachmann
0358cf2de2 Added types for queues/ssl 2022-04-06 21:05:12 +02:00
dominicbachmann
94da008a47 Added types for queues/proxy 2022-04-06 21:04:51 +02:00
dominicbachmann
456b1b8074 Added types for queues/logger 2022-04-06 21:04:14 +02:00
dominicbachmann
78e6a7d1d3 Improved code quality of queues/index 2022-04-06 21:03:20 +02:00
dominicbachmann
76dc7ffb68 Added types for queues/cleanup 2022-04-06 21:01:47 +02:00
dominicbachmann
211aff7170 Added types for letsencrypt/index 2022-04-06 20:52:46 +02:00
dominicbachmann
bcacefb841 Added types for importers/gitlab 2022-04-06 20:50:57 +02:00
dominicbachmann
4505ad37d8 Added types for importers/github 2022-04-06 20:50:04 +02:00
dominicbachmann
18cf57f33c Added types for haproxy/index 2022-04-06 20:47:22 +02:00
Andras Bacsai
9f2f5b40c3 Only show teams for root team 2022-04-06 20:44:24 +02:00
dominicbachmann
8a401f50cb Added types for haproxy/configuration 2022-04-06 20:40:25 +02:00
dominicbachmann
51a5b3b602 Added types to database/users 2022-04-06 20:36:51 +02:00
dominicbachmann
68f9bca054 Added types to database/teams 2022-04-06 20:34:22 +02:00
dominicbachmann
e9e92c6e9e Added types to databse/settings 2022-04-06 20:31:51 +02:00
dominicbachmann
008cfdba09 Added types to database/services 2022-04-06 20:30:29 +02:00
dominicbachmann
9973197fa5 Added types for database/secrets 2022-04-06 20:23:27 +02:00
dominicbachmann
ec3b94cf96 added types for database/logs 2022-04-06 20:16:21 +02:00
dominicbachmann
c4cb92c78d Added types for database/gitSource 2022-04-06 20:15:15 +02:00
dominicbachmann
c390f82246 Added types to database/gitlab 2022-04-06 20:01:35 +02:00
dominicbachmann
b4f98e24a1 Added types to database/github 2022-04-06 19:56:47 +02:00
dominicbachmann
e042c5cfde Added types for database/databases 2022-04-06 19:45:47 +02:00
dominicbachmann
faeae8fd6c Added typings for database/destinations 2022-04-06 19:34:17 +02:00
Andras Bacsai
ae4942ba29 feat: Able to change service version/tag 2022-04-06 19:17:28 +02:00
Philip Schmidt
fd652bfce6 write args at the beginning of dockerfile and inherit them for each stage 2022-04-06 18:33:02 +02:00
Andras Bacsai
3d72167721 Merge branch 'v2.4.0' of github.com:coollabsio/coolify into v2.4.0 2022-04-06 17:21:32 +02:00
Andras Bacsai
ba284bef9e Merge pull request #292 from Soneji/patch-1
Add plausible/analytics:stable docker tag
2022-04-06 17:20:50 +02:00
Andras Bacsai
d18bb9cc74 Extend typings 2022-04-06 17:18:25 +02:00
Andras Bacsai
a7ed3e58db Merge pull request #287 from dominicbachmann/dockerfile-typing
Implemented typing for dockerfile configuration
2022-04-06 17:12:17 +02:00
Andras Bacsai
8405ebd28d feat: Admin team sees everything 2022-04-06 15:55:17 +02:00
Andras Bacsai
352bb65125 ui: fix 2022-04-06 14:57:41 +02:00
Andras Bacsai
fe2cc5a99a feat: Working on-demand sftp to wp data 2022-04-06 14:27:51 +02:00
Andras Bacsai
7a2f29f6a3 feat: PHP Composer support 2022-04-06 13:35:53 +02:00
Andras Bacsai
9a05bfa899 fix: Fix for fix haha 2022-04-06 10:30:53 +02:00
Andras Bacsai
39fa64e20d fix: On-demand sFTP for wp 2022-04-06 10:29:42 +02:00
Andras Bacsai
3a835b420e WIP 2022-04-05 23:44:18 +02:00
dominicbachmann
82f7633c3a Improved typing and quality of database/checks and database/common code 2022-04-05 21:15:02 +02:00
dominicbachmann
9fdac2741a Improved typing and quality of applications.ts 2022-04-05 20:48:33 +02:00
dominicbachmann
8fb5260809 Resolved merge conflicts 2022-04-05 20:17:53 +02:00
dominicbachmann
e08ec12d26 Introduced typing for the buildJob and cleaned up common.ts 2022-04-05 20:11:19 +02:00
Dominic Bachmann
1202e00a21 Merge branch 'main' into dockerfile-typing 2022-04-05 19:36:52 +02:00
Andras Bacsai
4ba2205af4 fix: Permission issues 2022-04-05 17:37:03 +02:00
Andras Bacsai
09841ad4cb fix: Add openssl to image 2022-04-05 17:21:40 +02:00
Andras Bacsai
d2dcd0abc8 chore:version++ 2022-04-05 17:15:21 +02:00
Andras Bacsai
fe9d0503fb feat: Finalize on-demand sftp for wp 2022-04-05 17:15:06 +02:00
Andras Bacsai
8e9e6607e5 feat: Wordpress on-demand SFTP 2022-04-05 15:56:25 +02:00
Dhaval Soneji
e1efd9355f Add plausible/analytics:stable docker tag 2022-04-05 14:03:36 +01:00
Andras Bacsai
ca705bbf89 Merge pull request #290 from coollabsio/v2.3.3
v2.3.3
2022-04-05 11:19:07 +02:00
Andras Bacsai
b70fe09d17 fix: Remove asyncUntil 2022-04-05 11:13:13 +02:00
Andras Bacsai
d7d570393f Revert try 2022-04-05 11:09:17 +02:00
Andras Bacsai
41ca265e5a Try to not restart redis? 2022-04-05 11:00:36 +02:00
Andras Bacsai
03cde08d67 fix: Lame fixing 2022-04-05 10:58:47 +02:00
Andras Bacsai
5684674bd7 fix: revert seed 2022-04-05 10:36:28 +02:00
Andras Bacsai
4fe919f2ea Merge branch 'v2.3.3' of github.com:coollabsio/coolify into v2.3.3 2022-04-05 10:36:12 +02:00
Andras Bacsai
c8c23c53ef fix: Update stucked builds 2022-04-05 10:36:09 +02:00
Andras Bacsai
b1c25e98d7 fix: Update stucked builds on startup 2022-04-05 10:34:31 +02:00
Andras Bacsai
7ab5a4bfcf fix: Try to update build status several times 2022-04-05 10:30:18 +02:00
Andras Bacsai
a3ee57995c chore: Version++ 2022-04-05 10:21:46 +02:00
Andras Bacsai
32020fd336 fix: Add git lfs while deploying 2022-04-05 10:21:40 +02:00
dominicbachmann
f1313b6468 Implemented typing for dockerfile configuration 2022-04-05 01:13:25 +02:00
Andras Bacsai
3ef093c7e6 Merge pull request #286 from coollabsio/v2.3.2
v2.3.2
2022-04-04 19:40:39 +02:00
Andras Bacsai
f5dfaa81d3 chore:version++ 2022-04-04 19:35:17 +02:00
Andras Bacsai
fcf206a081 fix: Add default webhook domain for n8n 2022-04-04 19:18:06 +02:00
Andras Bacsai
9790d2b613 fix(php): If .htaccess file found use apache 2022-04-04 18:47:22 +02:00
Restray
c39cb42601 feat (i18n) : go back i18n loading json files 2022-04-04 17:56:32 +02:00
Restray
0ead17ab70 Patch translation module not loaded 2022-04-04 17:06:03 +02:00
Restray
4a6062522e Merge branch 'main' into restray_i18n 2022-04-04 16:54:51 +02:00
Andras Bacsai
201fa82efc Merge pull request #284 from coollabsio/v2.3.1
v2.3.1
2022-04-04 14:00:28 +02:00
Andras Bacsai
d28433ee64 fix: Default configuration 2022-04-04 13:55:11 +02:00
Andras Bacsai
cc348bf0f5 chore: Version++ 2022-04-04 13:49:37 +02:00
Andras Bacsai
b023d65fcf fix: Secrets build/runtime coudl be changed after save 2022-04-04 13:49:26 +02:00
Restray
bd15d85732 Add last translations for 2.3.0 2022-04-04 12:37:24 +02:00
Restray
b4bbd22781 Merge branch 'restray_i18n' of github.com:restray/coolify into restray_i18n 2022-04-04 12:31:48 +02:00
Restray
d4c972584a Add english translation for register page 2022-04-04 12:30:22 +02:00
Restray
edef4bd4a0 Merge branch 'main' into restray_i18n 2022-04-04 12:29:20 +02:00
Restray
448611039c Patch langs problems 2022-04-04 11:50:54 +02:00
Andras Bacsai
305fab488e Merge pull request #276 from coollabsio/v2.3.0
v2.3.0
2022-04-04 11:30:19 +02:00
Andras Bacsai
38f0546f05 fix: Gitlab & Github urls 2022-04-04 11:27:23 +02:00
Andras Bacsai
8cb679711d fix: UI 2022-04-04 11:08:32 +02:00
Andras Bacsai
4d11867500 Merge branch 'main' of github.com:coollabsio/coolify into v2.3.0 2022-04-04 10:41:50 +02:00
Andras Bacsai
8232a7468b fix: Build log 2022-04-03 23:34:17 +02:00
Andras Bacsai
03e7af12be fix: Remove console.log 2022-04-03 23:03:41 +02:00
Andras Bacsai
39f2e28a11 fix: Async progress 2022-04-03 22:53:50 +02:00
Andras Bacsai
53947d805b fix: Lets await! 2022-04-03 22:53:11 +02:00
Andras Bacsai
15f8e44237 Merge pull request #281 from dominicbachmann/fix-husky-pre-commit
Changed the package manager used in the .husky/pre-commit hook
2022-04-03 22:32:36 +02:00
Andras Bacsai
5ce1bc1ec5 Merge pull request #282 from dominicbachmann/fix-contributing-guide
Fixed contributing guide
2022-04-03 22:32:20 +02:00
Andras Bacsai
c36bd34a1a fix: Small UI fix on logs 2022-04-03 22:31:07 +02:00
Andras Bacsai
781d034484 fix: Build log fix attempt #1 2022-04-03 22:18:04 +02:00
Restray
e4f701b148 Add auto detect of locales files and contrib guide 2022-04-03 21:47:58 +02:00
Andras Bacsai
5160d0780e fix: No need to paste clear text env for previews 2022-04-03 21:38:58 +02:00
Restray
8cd561b8cc Update french translations 2022-04-03 19:58:10 +02:00
dominicbachmann
b8b57bc48b Fixed contributing guide 2022-04-03 19:15:26 +02:00
dominicbachmann
58406f055e Changed the package manager used in the .husky/pre-commit hook from yarn to pnpm 2022-04-03 19:10:29 +02:00
Andras Bacsai
b049297082 fix: Infinite loop on www domains 2022-04-03 17:49:41 +02:00
Restray
a284928352 Patch flags and add french translation 2022-04-03 14:34:48 +02:00
Restray
fe787538e3 Finish routes translations 2022-04-03 14:14:59 +02:00
Restray
360fb5ea37 Add services i18n 2022-04-03 00:18:48 +02:00
Andras Bacsai
45af5cbef8 fix: Rename envs to secrets 2022-04-03 00:03:51 +02:00
Andras Bacsai
463dacbe59 chore: Lock file + fix packages 2022-04-02 23:58:59 +02:00
Restray
13891110ce Add reset i18n 2022-04-02 23:57:37 +02:00
Andras Bacsai
01e0fb70c9 Merge branch 'v2.3.0' of github.com:coollabsio/coolify into v2.3.0 2022-04-02 23:53:41 +02:00
Restray
c1c25d59c8 Add "new" i18n 2022-04-02 23:53:10 +02:00
Andras Bacsai
6ac54e17f4 Merge pull request #277 from SaraVieira/allow-paste-env
feat: Add ability to paste env files
2022-04-02 23:52:53 +02:00
Andras Bacsai
a82805846f fix: If user not found 2022-04-02 23:48:56 +02:00
Restray
a53bda1436 Add destinations i18n 2022-04-02 23:34:30 +02:00
Sara Vieira
6309074844 clean when done 2022-04-02 23:30:16 +02:00
Sara Vieira
b80e0d15fb feat: Add abilitry to paste env files 2022-04-02 23:25:55 +02:00
Restray
7a0d151467 Add database translation 2022-04-02 23:17:59 +02:00
Andras Bacsai
c55505af6c feat: MeiliSearch service 2022-04-02 23:08:27 +02:00
Restray
a788b7bc13 Add translation for applications components 2022-04-02 23:00:03 +02:00
Andras Bacsai
5f27fc0770 Merge pull request #275 from SaraVieira/274-fix
Get error correctly in catch
2022-04-02 22:35:13 +02:00
Sara Vieira
b814c6e563 get error correctly; closes 274 2022-04-02 22:21:22 +02:00
Restray
8f58b14629 Add application i18n 2022-04-02 22:04:50 +02:00
Restray
269250ef3d Begin translation and finish i18n system 2022-04-02 21:08:55 +02:00
Restray
a3241516cb Change the way to load i18n (go throw cookie) 2022-04-02 20:25:24 +02:00
Restray
943300509b Revert "Add Locale URL"
This reverts commit d910b21185.
2022-04-02 19:29:22 +02:00
Restray
92d1f5aa55 Revert "Patch bugs on locale redirections"
This reverts commit 614eb923d8.
2022-04-02 19:28:20 +02:00
Andras Bacsai
7a74ba1796 ui: Improvements 2022-04-02 17:43:24 +02:00
Restray
614eb923d8 Patch bugs on locale redirections 2022-04-02 17:33:50 +02:00
Andras Bacsai
066f5b25e0 fix: Python no wsgi 2022-04-02 17:05:32 +02:00
Andras Bacsai
18f7ab1b95 Merge pull request #268 from restray/main
feat(dev): allow windows users to use pnpm dev
2022-04-02 16:28:44 +02:00
Andras Bacsai
78293340cc chore: version++ 2022-04-02 16:27:44 +02:00
Andras Bacsai
c47457a17f Merge pull request #269 from restray/restray_registre_loading
feat(auth): add loading on register button
2022-04-02 16:26:57 +02:00
Andras Bacsai
d00629b627 Merge pull request #273 from Just-Moh-it/patch-1
Suggested change
2022-04-02 16:26:02 +02:00
Andras Bacsai
ddfbda6f80 feat: initial python support 2022-04-02 16:22:51 +02:00
Restray
d910b21185 Add Locale URL 2022-04-02 16:15:00 +02:00
Andras Bacsai
b60b832426 chore: version++ 2022-04-02 15:53:25 +02:00
Mohit Yadav
adfc976f41 Suggested change
Changed to appropriate word
2022-04-02 17:28:42 +05:30
Andras Bacsai
1b43976ff0 Update proxy build commands 2022-04-02 13:39:24 +02:00
Andras Bacsai
321fb019eb Update dockerfiles for arm 2022-04-01 23:02:23 +02:00
Andras Bacsai
f6858a68e0 Update schema 2022-04-01 22:51:08 +02:00
Restray
741db1778b feat: install svelte-18n and init setup 2022-04-01 22:50:55 +02:00
Restray
809f40dec9 feat: add loading on register button 2022-04-01 21:41:22 +02:00
Restray
f3b5de4697 feat(dev): allow windows users to use pnpm dev 2022-04-01 21:10:24 +02:00
Andras Bacsai
fe17e2eaba Prisma Engine build script 2022-04-01 17:57:37 +02:00
Andras Bacsai
22ef0b5d29 Update packages 2022-04-01 17:46:08 +02:00
Andras Bacsai
823279fb60 Updates 2022-04-01 17:16:11 +02:00
Andras Bacsai
19f661706d fix: Ignore coolify proxy error for now 2022-04-01 15:34:29 +02:00
Andras Bacsai
986c5b7133 Merge pull request #264 from coollabsio/v2.2.7
v2.2.7
2022-04-01 14:43:53 +02:00
Andras Bacsai
4e334d4fff fix: Use NodeJS for sveltekit for now 2022-04-01 14:41:38 +02:00
Andras Bacsai
dcf7f92aab fix: Build variables 2022-04-01 14:29:06 +02:00
Andras Bacsai
f56361c0ca updates for ARM 2022-04-01 14:25:55 +02:00
Andras Bacsai
4946ca2d91 Dockerfile for multiarch builds 2022-04-01 00:08:29 +02:00
Andras Bacsai
f6a91cb53c fix: Haproxy errors 2022-04-01 00:07:29 +02:00
Andras Bacsai
726fbbb52a Merge pull request #257 from coollabsio/v2.2.6
v2.2.6
2022-03-31 20:57:34 +02:00
Andras Bacsai
29d2278579 fix: Add PROTO headers 2022-03-31 20:55:58 +02:00
Andras Bacsai
72ceeff022 Merge pull request #255 from coollabsio/v2.2.5
v2.2.5
2022-03-31 17:47:46 +02:00
Andras Bacsai
54d65ec011 chore: Version++ 2022-03-31 17:45:20 +02:00
Andras Bacsai
96aef5c4a6 fix: registration enabled/disabled 2022-03-31 17:45:04 +02:00
Andras Bacsai
7b64166fb0 Merge pull request #253 from coollabsio/v2.2.4
v2.2.4
2022-03-31 15:45:37 +02:00
Andras Bacsai
1f5908e0b8 fix: No need to dashify anymore 2022-03-31 15:42:15 +02:00
Andras Bacsai
a4562d18b6 chore: version++ 2022-03-31 15:41:02 +02:00
Andras Bacsai
875e232199 fix: Gitlab repo url 2022-03-31 15:40:26 +02:00
Andras Bacsai
80f95a4674 Merge pull request #244 from coollabsio/v2.2.3
v2.2.3
2022-03-31 15:17:38 +02:00
Andras Bacsai
17d56aa972 fix: Space in repo names 2022-03-31 15:11:51 +02:00
Andras Bacsai
f4ba60cf8f Merge pull request #249 from TommasoAmici/patch-1
chore: fixed typo on New Git Source view
2022-03-31 11:44:54 +02:00
Andras Bacsai
0b8a648f13 fix: Add license 2022-03-31 09:11:09 +02:00
Tommaso A
2576a3af2c chore: fixed typo on New Git Source view 2022-03-30 18:13:00 +02:00
Andras Bacsai
2e6c73fa3c chore: version++ 2022-03-30 10:12:04 +02:00
Andras Bacsai
b8d8ee4560 fix: Persistent storage on webhooks 2022-03-30 09:28:45 +02:00
Andras Bacsai
d9b74ada84 Merge pull request #239 from SaraVieira/patch-1
fix compare link in CONTRIBUTING
2022-03-28 15:35:04 +02:00
Andras Bacsai
01b058151b Merge pull request #240 from coollabsio/init-fqdn
v2.2.2
2022-03-28 15:24:37 +02:00
Andras Bacsai
989d952f35 chore: version++ 2022-03-28 15:21:03 +02:00
Andras Bacsai
908af3e024 fix: Reload window on settings saved 2022-03-28 15:20:49 +02:00
Sara Vieira
819157fda1 fix compare link in CONTRIBUTING 2022-03-28 15:04:00 +02:00
Andras Bacsai
5a4458e93f Merge pull request #237 from coollabsio/docs
v2.2.1
2022-03-28 13:35:52 +02:00
Andras Bacsai
1fbd403f34 chore: version++ 2022-03-28 13:28:09 +02:00
Andras Bacsai
098e519c55 Contribution 2022-03-28 13:26:38 +02:00
Andras Bacsai
3ef4a242f9 fix: List ghost services 2022-03-28 13:10:58 +02:00
Andras Bacsai
ad3044dce1 Merge pull request #234 from coollabsio/v2.2.0
v2.2.0
2022-03-27 22:48:04 +02:00
Andras Bacsai
e40541d831 design: Colors on svelte-select 2022-03-27 22:40:36 +02:00
Andras Bacsai
2786e7dbaf Merge pull request #235 from SaraVieira/add-better-repo-select
Add search in repo and branch select
2022-03-27 22:34:15 +02:00
Andras Bacsai
196d681a63 fix: Ghost icon, remove console.log 2022-03-27 22:32:31 +02:00
Andras Bacsai
d2353e3c35 fix: Ghost logo size 2022-03-27 22:28:39 +02:00
Andras Bacsai
2475031f88 feat: Ghost service 2022-03-27 22:03:21 +02:00
Sara Vieira
cd15e68adc remove console.log 2022-03-27 21:56:23 +02:00
Sara Vieira
27431f779d clean css 2022-03-27 21:50:28 +02:00
Sara Vieira
b9b5a2faeb add search in repo and branch select 2022-03-27 21:48:25 +02:00
Andras Bacsai
e471b11d3b Add icons 2022-03-27 14:37:32 +02:00
Andras Bacsai
a742a3d2e3 feat: Add update kuma service 2022-03-27 14:05:36 +02:00
Andras Bacsai
c615f6c07e chore: Version ++ 2022-03-27 13:49:13 +02:00
Andras Bacsai
a6ebfb08f7 feat: Add n8n.io service 2022-03-27 13:49:04 +02:00
Andras Bacsai
2b0d162226 Merge pull request #232 from coollabsio/v2.1.1
v2.1.1
2022-03-25 15:41:26 +01:00
Andras Bacsai
2c5f09a8bb fix: Cleanup only 2 hours+ old images 2022-03-25 15:34:14 +01:00
Andras Bacsai
ef073e586b Test nocheck proxy 2022-03-25 10:48:11 +01:00
Andras Bacsai
82bfdb87e3 UI fixes 2022-03-25 10:36:47 +01:00
Andras Bacsai
767e7b80cb chore: version++ 2022-03-25 09:14:55 +01:00
Andras Bacsai
8d26ea9063 Update packages 2022-03-25 09:14:32 +01:00
Andras Bacsai
1a7c4310d0 Merge pull request #230 from coollabsio/v2.1.0
v2.1.0
2022-03-23 11:54:15 +01:00
Andras Bacsai
4e8fe79e2b feat: Be able to redeploy PRs 2022-03-23 11:49:40 +01:00
Andras Bacsai
a8c5551292 fix: Volumes 2022-03-23 11:14:38 +01:00
Andras Bacsai
2bf73109b2 feat: Use compose instead of normal docker cmd 2022-03-23 10:25:32 +01:00
Andras Bacsai
f0ab3750bd Disable PHP modules, as the new image has all activated by default 2022-03-22 15:56:03 +01:00
Andras Bacsai
58a11e37fe Add schema 2022-03-22 14:58:08 +01:00
Andras Bacsai
927bf46304 fix: skip ssl cert in case of error 2022-03-22 10:37:33 +01:00
Andras Bacsai
6b89857697 chore: version++ 2022-03-22 10:24:52 +01:00
Andras Bacsai
b72e5ccef6 Merge branch 'main' into v2.0.32 2022-03-22 10:23:11 +01:00
Andras Bacsai
6617b7811b log ssl errors 2022-03-22 10:22:20 +01:00
Andras Bacsai
e1c1988db4 Merge pull request #229 from coollabsio/importer-error
Add debug for GH importer
2022-03-22 09:42:49 +01:00
Andras Bacsai
af99ea4678 Add debug for GH importer 2022-03-22 09:35:24 +01:00
Andras Bacsai
a6d5316090 WIP - Persistent storage 2022-03-21 21:46:49 +01:00
Andras Bacsai
f5e7a84fa6 Update buildpacks for static sites 2022-03-21 21:25:01 +01:00
Andras Bacsai
c013764b61 WIP Persistent storage 2022-03-21 16:58:13 +01:00
Andras Bacsai
2320ab0dfc WIP - Persistent storage 2022-03-20 23:51:50 +01:00
Andras Bacsai
1281a0f7e4 Merge pull request #226 from coollabsio/v2.0.31
v2.0.31
2022-03-20 15:21:57 +01:00
Andras Bacsai
d8350cd4ee Migration file 2022-03-20 15:14:33 +01:00
Andras Bacsai
e3b7c23ed9 chore: Version++ 2022-03-20 15:05:05 +01:00
Andras Bacsai
eae1ea21d6 fix: Add nginx + htaccess files 2022-03-20 15:03:24 +01:00
Andras Bacsai
541aa76b64 fix: Only cleanup same app 2022-03-20 14:21:11 +01:00
Andras Bacsai
7b8555d524 fix: Cleanup old builds 2022-03-20 14:20:29 +01:00
Andras Bacsai
fdf998c181 css fix for select 2022-03-20 14:03:52 +01:00
Andras Bacsai
3d6b343adc remove mysql 2022-03-19 23:47:05 +01:00
Andras Bacsai
e338cecc14 feat: Add PHP modules 2022-03-19 23:46:33 +01:00
Andras Bacsai
e5537a33fb Merge pull request #223 from coollabsio/v2.0.30
v2.0.30
2022-03-19 15:11:42 +01:00
Andras Bacsai
35384deb68 fix: Remove build logs in case of app removed 2022-03-19 15:06:25 +01:00
Andras Bacsai
547ca60c2a fix: Better queue system + more support on monorepos 2022-03-19 15:04:52 +01:00
Andras Bacsai
376f6f7455 fix: Basedir for dockerfiles 2022-03-19 13:33:31 +01:00
Andras Bacsai
abe92dedff fix: no webhook secret found? 2022-03-15 17:35:37 +01:00
Andras Bacsai
4b521ceedc chore: version++ 2022-03-15 17:25:17 +01:00
Andras Bacsai
6dfcb9e52b fix: No error if GitSource is missing 2022-03-15 17:22:28 +01:00
Andras Bacsai
335e3216e2 fix: Missing session data 2022-03-15 17:21:18 +01:00
Andras Bacsai
5b22bb4818 fix: No cookie found 2022-03-15 17:04:15 +01:00
Andras Bacsai
0097004882 Merge pull request #217 from coollabsio/v2.0.29
v2.0.29
2022-03-12 00:28:26 +01:00
Andras Bacsai
1bc9e4c2d3 fix: Autodeploy true by default for GH repos 2022-03-11 23:56:11 +01:00
Andras Bacsai
36c7e1a3c3 feat: Install pnpm into docker image if pnpm lock file is used 2022-03-11 23:55:57 +01:00
Andras Bacsai
c6b4d04e26 Revert double build 2022-03-11 22:48:55 +01:00
Andras Bacsai
fa6cf068c7 feat: Autodeploy pause 2022-03-11 22:36:21 +01:00
Andras Bacsai
7c273a3a48 feat: Check ssl for new apps/services first 2022-03-11 21:28:27 +01:00
Andras Bacsai
3de2ea1523 chore: version++ 2022-03-11 21:19:03 +01:00
Andras Bacsai
c5c9f84503 feat: Webhooks inititate all applications with the correct branch 2022-03-11 21:18:12 +01:00
Andras Bacsai
16ea9a3e07 Update options request 2022-03-11 20:52:11 +01:00
Andras Bacsai
48f952c798 fix: Personal Gitlab repos 2022-03-11 20:47:26 +01:00
Andras Bacsai
f78ea5de07 Remove colors Tailwind 2022-03-11 20:47:13 +01:00
Andras Bacsai
5adbd5e784 Merge pull request #210 from coollabsio/v2.0.28
v2.0.28
2022-03-04 15:39:35 +01:00
Andras Bacsai
5b2afa79d7 chore: version++ 2022-03-04 15:20:03 +01:00
Andras Bacsai
dc4e6d02b7 feat: Service secrets 2022-03-04 15:14:25 +01:00
Andras Bacsai
8ae61c8f78 fix: do not error if proxy is not running 2022-03-04 14:20:20 +01:00
Andras Bacsai
684b8e0914 Merge pull request #207 from coollabsio/v2.0.27
v2.0.27
2022-03-02 21:15:32 +01:00
Andras Bacsai
7c3314abae force image deletion 2022-03-02 21:14:53 +01:00
Andras Bacsai
ab9f8ff356 Before latest image 2022-03-02 21:08:36 +01:00
Andras Bacsai
892d8cd5c1 Reload proxy after ssl renewal 2022-03-02 21:04:42 +01:00
Andras Bacsai
8b8b45778d fix: application state in UI 2022-03-02 21:01:25 +01:00
Andras Bacsai
6655fb182c fix: cleanup coolify images 2022-03-02 20:57:28 +01:00
Andras Bacsai
0926d40247 fix: Reload haproxy if new cert is added 2022-03-02 20:43:16 +01:00
Andras Bacsai
ddc4d36688 Fix cleanup process of old coolify images 2022-03-02 20:32:29 +01:00
Andras Bacsai
53e1f22eb1 fix: check when a container is running 2022-03-02 20:32:18 +01:00
Andras Bacsai
3d2a34737b prevent restarting container check 2022-03-02 15:52:22 +01:00
Andras Bacsai
ebde77008c Cleanup coolify image fix 2022-03-02 15:52:06 +01:00
Andras Bacsai
3d27fd04ba cleanup old images of coolify 2022-03-02 14:53:43 +01:00
Andras Bacsai
d9fcaf3473 update packages 2022-03-02 14:53:33 +01:00
Andras Bacsai
d266f761aa Stats open with auth 2022-03-02 14:38:51 +01:00
Andras Bacsai
1d01405412 chore: Version++ 2022-03-02 13:38:58 +01:00
Andras Bacsai
7c62eb5bd6 feat: Send version with update request 2022-03-02 13:38:45 +01:00
Andras Bacsai
4dcc76d366 fix: Update process 2022-03-02 13:37:06 +01:00
Andras Bacsai
d2fad19a11 Update package.json 2022-03-02 12:23:40 +01:00
Andras Bacsai
7c92c4c964 Merge pull request #206 from coollabsio/feat/languagetool
v2.0.26
2022-03-02 12:22:44 +01:00
Andras Bacsai
5a71d33236 chore: Version++ 2022-03-02 12:20:20 +01:00
Andras Bacsai
1b4db4f793 fix 2022-03-02 12:20:02 +01:00
Andras Bacsai
c084b22815 fix: volume name 2022-03-02 12:17:48 +01:00
Andras Bacsai
acacef95cd fix: reload proxy on ssl cert 2022-03-02 12:10:12 +01:00
Andras Bacsai
5d722183d3 feat: Languagetool service 2022-03-02 11:57:03 +01:00
Andras Bacsai
ac19ea5407 Merge pull request #202 from coollabsio/fix
v2.0.24
2022-03-02 11:18:51 +01:00
Andras Bacsai
d19b05b970 fix: update process 2022-03-02 11:00:08 +01:00
Andras Bacsai
a0795136ac fix 2022-03-01 15:30:39 +01:00
Andras Bacsai
d2566e345a fix 2022-03-01 15:27:33 +01:00
Andras Bacsai
66cd7cf90e remove debug logging 2022-03-01 15:27:06 +01:00
Andras Bacsai
9a599981ef fix 2022-03-01 15:25:13 +01:00
Andras Bacsai
f51f7bc82a fix 2022-03-01 15:22:11 +01:00
Andras Bacsai
dbcbac0137 cleanup 2022-03-01 14:29:15 +01:00
Andras Bacsai
e722f8a87c fix: Reconfigure proxy on restart 2022-03-01 14:02:46 +01:00
Andras Bacsai
61679749eb fix: null proxyhash on restart 2022-03-01 13:15:23 +01:00
Andras Bacsai
23e12c9c44 fix: ssl + sslrenew 2022-03-01 13:07:34 +01:00
Andras Bacsai
6da78cd3e5 remove proxy refresh 2022-03-01 11:45:29 +01:00
Andras Bacsai
78ce8100a3 migrate file 2022-03-01 11:19:40 +01:00
Andras Bacsai
76ba338b45 fix 2022-03-01 11:17:34 +01:00
Andras Bacsai
823fe2deb2 refactor 2022-03-01 11:10:10 +01:00
Andras Bacsai
cb90f692f2 WIP proxy 2022-03-01 00:20:28 +01:00
Andras Bacsai
0325343ede save 2022-03-01 00:12:54 +01:00
Andras Bacsai
69d1556a1d WIP better automatic proxy conf 2022-03-01 00:08:54 +01:00
Andras Bacsai
2daa043840 WIP 2022-02-28 16:55:02 +01:00
Andras Bacsai
f340ca9d05 WIP 2022-02-28 16:06:44 +01:00
Andras Bacsai
02abd038fa fix: Better proxy check 2022-02-28 11:20:46 +01:00
Andras Bacsai
b9da68ec28 Merge pull request #199 from coollabsio/fixes
v2.0.23
2022-02-28 10:25:26 +01:00
Andras Bacsai
88b3910d80 fix: Cleanup old images, > 3 days 2022-02-28 10:12:04 +01:00
Andras Bacsai
160412f6e4 fix: Add coolify-image label for build images 2022-02-28 10:09:34 +01:00
Andras Bacsai
59a86b25fc UI: Application start 2022-02-28 10:00:09 +01:00
Andras Bacsai
49e58b39f5 chore: version++ 2022-02-28 09:57:36 +01:00
Andras Bacsai
58e0757bbd fix: Default npm command 2022-02-28 09:50:47 +01:00
Andras Bacsai
5ff4197572 fix: missing fqdn for services 2022-02-28 09:48:24 +01:00
Andras Bacsai
b56e28d27a UI: colorful states 2022-02-28 09:48:12 +01:00
Andras Bacsai
c3d39e1dd4 fix: Be sure .env exists 2022-02-28 09:31:36 +01:00
Andras Bacsai
716aa36bfd Merge pull request #195 from coollabsio/next
v2.0.22-fixes
2022-02-27 12:42:03 +01:00
Andras Bacsai
f01460170e Fix 2022-02-27 12:35:29 +01:00
Andras Bacsai
a414ce282d revert old update sequence 2022-02-27 12:31:39 +01:00
Andras Bacsai
6c32f3b130 fix: update version 2022-02-27 12:22:04 +01:00
Andras Bacsai
4cf907c572 fix: do not remove coolify proxy 2022-02-27 12:17:40 +01:00
Andras Bacsai
b28baaa5aa Merge pull request #193 from coollabsio/next
v2.0.22
2022-02-27 11:55:56 +01:00
Andras Bacsai
980dea64e0 fix: Fix proxy every 10 secs 2022-02-27 11:52:05 +01:00
Andras Bacsai
c340f6436f chore: Version++ 2022-02-27 11:19:03 +01:00
Andras Bacsai
54376fd105 remove remote docker for now 2022-02-27 11:14:46 +01:00
Andras Bacsai
ef006578b2 fix: Add icons for eleventy + astro 2022-02-26 22:15:22 +01:00
Andras Bacsai
b0b1ee0c60 fix: Always use a buildpack 2022-02-26 22:01:44 +01:00
Andras Bacsai
4e2026aa2d fix: Remove wrong/stuck proxy configurations 2022-02-26 22:01:24 +01:00
Andras Bacsai
e0e50b4bd5 WIP: Remote docker engine 2022-02-26 15:08:26 +01:00
Andras Bacsai
c9b52f1310 fix: Coolify image pulls 2022-02-24 10:37:37 +01:00
Andras Bacsai
0195213dfb Merge pull request #189 from coollabsio/next
v2.0.21
2022-02-24 10:17:38 +01:00
Andras Bacsai
d6225cbde3 fix: Improvement on image pulls 2022-02-24 10:11:48 +01:00
Andras Bacsai
7b4c194b97 chore: version++ 2022-02-24 09:38:11 +01:00
Andras Bacsai
a5ecff24a3 feat: Registration page 2022-02-24 09:32:34 +01:00
Andras Bacsai
c9c003dc9b fix: Docker scanner 2022-02-24 08:50:47 +01:00
Andras Bacsai
fd95936219 feat: 11ty buildpack 2022-02-24 00:30:33 +01:00
Andras Bacsai
15a3fd4456 feat: Astro buildpack 2022-02-23 22:07:06 +01:00
Andras Bacsai
df896542e4 update packages 2022-02-23 15:47:09 +01:00
Andras Bacsai
8927e81274 changes for demo 2022-02-23 13:38:43 +01:00
Andras Bacsai
340f061827 fix: http for demo, oops 2022-02-23 13:32:43 +01:00
Andras Bacsai
15cbac97c2 feat: Random domain for services 2022-02-23 13:25:57 +01:00
Andras Bacsai
bb32d0f7d1 feat: Random subdomain for demo 2022-02-23 13:20:17 +01:00
Andras Bacsai
c370fba9ba Merge pull request #185 from coollabsio/next
v2.0.20
2022-02-23 13:00:08 +01:00
Andras Bacsai
6e32421172 chore: Version++ 2022-02-23 12:58:46 +01:00
Andras Bacsai
6643687c0a fix: Revert default network 2022-02-23 12:58:32 +01:00
Andras Bacsai
ed01e78d77 improvement: dns check 2022-02-23 12:43:04 +01:00
Andras Bacsai
93aed52f88 Login page description for demo page 2022-02-23 11:14:04 +01:00
Andras Bacsai
bb6d1fd6a3 cleanup 2022-02-23 10:40:34 +01:00
Andras Bacsai
6e33179fc2 Update README.md 2022-02-23 10:40:21 +01:00
Andras Bacsai
277fd167cf Merge pull request #184 from coollabsio/next
v2.0.19
2022-02-23 10:29:10 +01:00
Andras Bacsai
98e8d5170b fix: Settings fqdn grr 2022-02-23 10:26:29 +01:00
Andras Bacsai
11ee1651ae fix: Random network name for demo 2022-02-23 10:22:25 +01:00
Andras Bacsai
0dfcf9b1e6 Merge pull request #159 from coollabsio/next
v2.0.18
2022-02-22 20:41:53 +01:00
Andras Bacsai
08f57ac5bc UI fix 2022-02-22 20:41:07 +01:00
Andras Bacsai
7095e781e9 small fixes 2022-02-22 20:37:11 +01:00
Andras Bacsai
df18b93809 Design day! 2022-02-22 12:56:58 +01:00
Andras Bacsai
0c2e028b38 Frontend for port range 2022-02-22 10:35:39 +01:00
Andras Bacsai
80cb1bc129 fix: Use normal docker-compose in dev 2022-02-22 09:54:23 +01:00
Andras Bacsai
74c1cb51f6 nothing here 2022-02-22 09:49:17 +01:00
Andras Bacsai
2e864bddf9 nothing important 2022-02-22 09:47:21 +01:00
Andras Bacsai
e60ae91b5d design: make copy/password visible 2022-02-22 09:45:00 +01:00
Andras Bacsai
d606cd86a0 feat: Ports range 2022-02-22 09:23:41 +01:00
Andras Bacsai
bc463c37f4 fix: Lowercase email everywhere 2022-02-22 08:12:45 +01:00
Andras Bacsai
76c1480903 fix: Email is lowercased in login 2022-02-22 08:10:33 +01:00
Andras Bacsai
6f312caf8b chore: Version++ 2022-02-21 12:46:37 +01:00
Andras Bacsai
980d8d374f Merge branch 'main' into next 2022-02-21 12:46:08 +01:00
Andras Bacsai
c49b34942f Merge pull request #164 from coollabsio/fix/github-token
v2.0.17
2022-02-21 12:41:36 +01:00
Andras Bacsai
fcfa8717a5 fix: Move tokens from session to cookie/store 2022-02-21 12:35:20 +01:00
Andras Bacsai
954a265965 chore: Version++ 2022-02-21 09:52:51 +01:00
Andras Bacsai
69845a020a Merge branch 'main' into fix/github-token 2022-02-21 09:51:46 +01:00
Andras Bacsai
22200fd8a7 fix: Github token 2022-02-21 09:50:15 +01:00
Andras Bacsai
add441675d feat: Public port range (WIP) 2022-02-20 15:12:01 +01:00
Andras Bacsai
d3d9754277 chore: Version ++ 2022-02-20 14:42:24 +01:00
Andras Bacsai
aa5e2edbc5 feat: Scan for lock files and set right commands 2022-02-20 14:40:15 +01:00
Andras Bacsai
310b099ecf Merge pull request #154 from coollabsio/next
v2.0.16
2022-02-20 00:48:08 +01:00
Andras Bacsai
1cfaef911c Small fixes 2022-02-20 00:17:44 +01:00
Andras Bacsai
b931c5f638 Migration file 2022-02-20 00:13:16 +01:00
Andras Bacsai
7c683668eb feat: Secrets for previews
UI: Some CSS changes
2022-02-20 00:00:31 +01:00
Andras Bacsai
cab7ac7d58 fix: If DNS not found, do not redirect 2022-02-19 22:37:45 +01:00
Andras Bacsai
15e69c538a feat: Preview secrets
chore: version++
2022-02-19 14:54:47 +01:00
Andras Bacsai
31ee938b66 Merge pull request #152 from coollabsio/next
v2.0.15
2022-02-19 14:52:35 +01:00
Andras Bacsai
e51a8d43d9 Browser 2022-02-19 14:03:33 +01:00
Andras Bacsai
64cd5b6e4b fix: Gitlab webhooks fixed 2022-02-19 13:57:56 +01:00
Andras Bacsai
6c9ef34905 chore: version++ 2022-02-18 23:25:43 +01:00
Andras Bacsai
aa89019236 fix: Database connection strings 2022-02-18 23:25:24 +01:00
Andras Bacsai
df58fcee16 Merge pull request #148 from coollabsio/next
v2.0.14
2022-02-18 22:18:42 +01:00
Andras Bacsai
ea3ffc429f fix: Plausible volume fixed 2022-02-18 22:05:02 +01:00
Andras Bacsai
2efca7a2b5 feat: Basic password reset form 2022-02-18 21:37:40 +01:00
Andras Bacsai
9db448a5e2 fix: follow icon 2022-02-18 15:51:59 +01:00
Andras Bacsai
feee90beef fix: Random port for certbot 2022-02-18 15:37:38 +01:00
Andras Bacsai
906a63b6b5 fix: ghToken in session now 2022-02-18 15:29:32 +01:00
Andras Bacsai
2ce64ac213 fix: hook.ts - relogin needed
updated packages
fix: Lots of typescript thingy
fix: ssl request flow
fix: proxy cleanup flow
2022-02-18 13:59:23 +01:00
Andras Bacsai
4d8bf57135 fix: Remove force SSL when doing let's encrypt request 2022-02-18 09:00:23 +01:00
Andras Bacsai
c5348ce4b3 fix: Minor fixes 2022-02-18 08:48:05 +01:00
Andras Bacsai
7f87c03f97 fix: Running state css 2022-02-18 00:25:15 +01:00
Andras Bacsai
9469f148ff fix: Grr 2022-02-18 00:22:17 +01:00
Andras Bacsai
ffb7dc4ec2 fix: SSL off for services 2022-02-18 00:17:07 +01:00
Andras Bacsai
242b8fa746 fix: Remove SSL with stop 2022-02-18 00:15:46 +01:00
Andras Bacsai
50cae5ac3b fix: Lets encrypt 2022-02-18 00:08:50 +01:00
Andras Bacsai
6a71233eb2 fix: Typo 2022-02-17 23:58:21 +01:00
Andras Bacsai
1aff8933c9 fix: Local docker host 2022-02-17 23:49:25 +01:00
Andras Bacsai
0ed87a5dfc fix: SSL app off 2022-02-17 23:47:37 +01:00
Andras Bacsai
24a6bcbd1e fix: Builder debug logging is better now
fix: www and non-www domain checker
2022-02-17 23:42:23 +01:00
Andras Bacsai
ca7f3da19d fix: Getport for letsencrypt
design: Add more scroll design
2022-02-17 22:56:15 +01:00
Andras Bacsai
bf047e2a3c feat: Dual certificates
desing: Lots of design/css updates
version++
2022-02-17 22:14:06 +01:00
Andras Bacsai
4454287be9 Merge branch 'main' into next 2022-02-17 10:38:47 +01:00
Andras Bacsai
3bd2183655 Merge pull request #143 from coollabsio/fix/login-quickfix
v2.0.13
2022-02-17 10:23:26 +01:00
Andras Bacsai
1f7080e8f8 fix: Login issues 2022-02-17 10:22:38 +01:00
Andras Bacsai
8b20761e8b fix: Buggy svelte-kit-cookie-session 2022-02-17 10:11:46 +01:00
Andras Bacsai
655d0b5d5f fix: Secure cookie disabled by default 2022-02-16 17:13:24 +01:00
Andras Bacsai
91849cdd3a fix www - non-www ssl 2022-02-16 00:00:49 +01:00
Andras Bacsai
df25a694c3 fix: Add no user redis to uri 2022-02-15 23:59:26 +01:00
Andras Bacsai
eabaca145e Fix 2022-02-15 23:38:10 +01:00
Andras Bacsai
2f0e458765 Expand flag for lets encrypt 2022-02-15 23:12:28 +01:00
Andras Bacsai
ff8037f231 feat: Generate www & non-www SSL certs 2022-02-15 23:02:03 +01:00
Andras Bacsai
a116028e1b Merge pull request #137 from coollabsio/next
v2.0.12
2022-02-15 22:03:10 +01:00
Andras Bacsai
e606a02b29 Update packages 2022-02-15 21:49:14 +01:00
Andras Bacsai
531c712ea5 fix: Some nasty bug
fix: Automatic reconfiguration of all services and service proxies
2022-02-15 21:44:36 +01:00
Andras Bacsai
3ae7624361 fix: Cleanup images 2022-02-15 20:37:00 +01:00
Andras Bacsai
fed83462fa remove unncesarry logs 2022-02-15 20:34:40 +01:00
Andras Bacsai
58c9f937c5 fix: Cleanup every 10 mins 2022-02-15 19:14:23 +01:00
Andras Bacsai
5d14b9209d fix: Coolify image cleanup 2022-02-15 19:13:50 +01:00
Andras Bacsai
305a95fa74 fix: TransactionIds 2022-02-15 18:47:20 +01:00
Andras Bacsai
b29c1e702a fix: isDomainConfigured 2022-02-15 18:04:58 +01:00
Andras Bacsai
b04d75ab08 dx: only allow cleanup in production 2022-02-15 17:46:37 +01:00
Andras Bacsai
25abfaadb9 chore: version++ 2022-02-15 17:45:58 +01:00
Andras Bacsai
1df81b8698 fix: Unnecessary proxy restart
feat: Restart proxy
2022-02-15 17:45:20 +01:00
Andras Bacsai
4487846fd7 feat: Force restart coolify proxy
fix: Cannot configure coolify proxy
2022-02-15 15:55:55 +01:00
Andras Bacsai
86918f5160 Merge pull request #134 from coollabsio/next
fix: Error with follow logs
2022-02-15 10:59:58 +01:00
Andras Bacsai
bc723b3f15 fix: Error with follow logs 2022-02-15 10:57:58 +01:00
Andras Bacsai
1881e646d4 Merge pull request #132 from coollabsio/next
v2.0.11
2022-02-15 10:51:25 +01:00
Andras Bacsai
aa98808a1a fix: Typo 2022-02-15 10:46:44 +01:00
Andras Bacsai
f9a2232703 fix: Small fixes 2022-02-15 10:42:26 +01:00
Andras Bacsai
19d6be8663 fix: Load more button 2022-02-15 10:35:22 +01:00
Andras Bacsai
0eb7c890ad fix: GitHub sync PR's 2022-02-15 10:25:23 +01:00
Andras Bacsai
7bfa68aa58 chore: version++ 2022-02-15 09:40:04 +01:00
Andras Bacsai
857a38050e fix: Window error in SSR 2022-02-15 09:39:45 +01:00
Andras Bacsai
c5b7f92caf feat: Follow logs 2022-02-15 09:38:16 +01:00
Andras Bacsai
df31ffd7fb Merge pull request #127 from SaraVieira/logs-improvements
UX improvements for the log page
2022-02-15 09:02:43 +01:00
Andras Bacsai
0df0322d36 Merge pull request #129 from coollabsio/next
v2.0.10
2022-02-15 08:52:45 +01:00
Andras Bacsai
260552322d chore: Version++ 2022-02-15 08:50:17 +01:00
Andras Bacsai
88ef6496a2 fix: Coolify proxy start 2022-02-15 08:50:02 +01:00
Andras Bacsai
bdf123bf7b fix: Stopping service without proxy 2022-02-15 08:38:16 +01:00
Andras Bacsai
8fc3760eef fix: Error handling 2022-02-14 16:52:00 +01:00
Sara Vieira
5656f6f709 add env example back 2022-02-14 16:01:08 +01:00
Andras Bacsai
53e7e8b77e version bump 2022-02-14 15:59:00 +01:00
Andras Bacsai
b990915b7a fix: Typo 2022-02-14 15:58:44 +01:00
Sara Vieira
15b7822ffd put db in the right place 2022-02-14 15:58:42 +01:00
Sara Vieira
cfa28419cb add yarn lock to gitignore 2022-02-14 15:56:28 +01:00
Sara Vieira
30ef0d2a3a some log improvements 2022-02-14 15:55:19 +01:00
Andras Bacsai
755f99200a Create README.md 2022-02-14 11:32:19 +01:00
Andras Bacsai
7af79ed3a2 Update README.md 2022-02-14 11:29:56 +01:00
Andras Bacsai
2971e14269 Merge pull request #123 from coollabsio/next
v2.0.8
2022-02-14 10:09:07 +01:00
Andras Bacsai
01954aaf30 Merge pull request #122 from habibyuri/patch-1
Allow Docker Apache write permissions
2022-02-14 10:03:31 +01:00
Andras Bacsai
da018a8f2a fix: Branch used does not throw error 2022-02-14 09:57:17 +01:00
Andras Bacsai
77400bbbb0 fix: Truncate git clone errors 2022-02-14 09:48:46 +01:00
Andras Bacsai
3c3333d3df fix: Validate secrets 2022-02-14 09:47:09 +01:00
Andras Bacsai
4963bd4144 - Bump version
- Fix type
2022-02-14 09:28:56 +01:00
Andras Bacsai
b4a418dded - Rename error handler.
- Truncate errors.
- Better error tags, release version etc.
2022-02-14 09:28:37 +01:00
Yuri Habib
a724b0daee Allow Docker Apache write permissions
I had a permission problem using PHP scripts, 
Running ` chown -R www-data /var/www/html ` after SSHing into the docker container helped fixing the problem.
2022-02-13 14:58:13 -08:00
Andras Bacsai
88aa620cb4 Merge pull request #121 from coollabsio/next
v2.0.7
2022-02-13 23:45:49 +01:00
Andras Bacsai
70d3448110 fix: New secret should have default values 2022-02-13 23:31:52 +01:00
Andras Bacsai
09a1a406a6 Bump version 2022-02-13 23:19:08 +01:00
Andras Bacsai
40939d0b7f fix: Build secrets should be visible in runtime 2022-02-13 23:17:50 +01:00
Andras Bacsai
aec1d184c8 feat: www <-> non-www redirection 2022-02-13 22:56:37 +01:00
Andras Bacsai
69d3cb5dd8 feat: www <-> non-www redirection for apps 2022-02-13 15:04:00 +01:00
Andras Bacsai
3deff162bb code cleanup 2022-02-13 13:46:51 +01:00
Andras Bacsai
4ed54568d3 fix: package.json 2022-02-12 15:34:55 +01:00
Andras Bacsai
004724da55 Merge pull request #119 from coollabsio/next
Unique secrets by applications
2022-02-12 15:31:53 +01:00
Andras Bacsai
97e9b5ffe3 Merge branch 'main' into next 2022-02-12 15:31:45 +01:00
Andras Bacsai
45f920f802 fix: unique secret by application
css: redesign secret page
2022-02-12 15:23:58 +01:00
Andras Bacsai
2b31532d19 Update README.md 2022-02-11 23:04:50 +01:00
Andras Bacsai
e7a6ecf95b fix: Typo 2022-02-11 21:50:47 +01:00
Andras Bacsai
545c98cee0 Merge pull request #117 from coollabsio/next
Update README.md
2022-02-11 21:50:19 +01:00
Andras Bacsai
d29ccbfe37 Update README.md 2022-02-11 21:49:30 +01:00
Andras Bacsai
d0807862e6 Merge pull request #116 from coollabsio/next
v2.0.5
2022-02-11 21:37:01 +01:00
Andras Bacsai
b92616dc14 chore: Version 2022-02-11 21:29:35 +01:00
Andras Bacsai
a1a436300d fix: Check sentry 2022-02-11 21:27:28 +01:00
Andras Bacsai
16a5aeb1ba chore: Version 2022-02-11 21:23:16 +01:00
Andras Bacsai
872095ff7a fix: Local static assets 2022-02-11 21:22:41 +01:00
Andras Bacsai
d88f2ea4c3 fix: More error handling in proxy configuration + cleanups 2022-02-11 21:14:47 +01:00
Andras Bacsai
02e0385ab8 Preserve build image as well 2022-02-11 21:07:31 +01:00
Andras Bacsai
c9751d4cd9 More images to tag 2022-02-11 21:06:48 +01:00
Andras Bacsai
162b637992 fix: Cleanup images 2022-02-11 21:04:48 +01:00
Andras Bacsai
a10ddd4063 fix: Delete all build files 2022-02-11 20:28:56 +01:00
Andras Bacsai
f46ccc63a7 Update staging release (final, I promise) 2022-02-11 15:46:17 +01:00
Andras Bacsai
fc04a45744 Update staging script (again) 2022-02-11 15:35:01 +01:00
Andras Bacsai
90c2b59a51 Update staging script 2022-02-11 15:34:45 +01:00
Andras Bacsai
d6bee99c1b update releast script 2022-02-11 15:31:53 +01:00
Andras Bacsai
0871d47568 feat: VaultWarden service 2022-02-11 15:31:25 +01:00
Andras Bacsai
5c646c1898 fix: Haproxy check should not throw error 2022-02-11 15:11:10 +01:00
Andras Bacsai
8974de165f fix: PreventDefault on a button, thats all 2022-02-11 13:43:45 +01:00
Andras Bacsai
e622294b87 feat: New update process (#115) 2022-02-11 11:46:47 +01:00
Andras Bacsai
cf9d32b556 Merge pull request #114 from coollabsio/next
fix: Docker Engine bugs
2022-02-11 09:22:28 +01:00
Andras Bacsai
e2d6b5bf64 fix: version 2022-02-11 09:13:51 +01:00
Andras Bacsai
dec58fd6d1 feat: Use tags in update 2022-02-11 09:00:45 +01:00
Andras Bacsai
dbb2241213 fix: Docker Engine bug related to live-restore and IPs 2022-02-11 08:42:47 +01:00
Andras Bacsai
3bd8ac5820 Merge pull request #112 from coollabsio/next
v2.0.3
2022-02-10 22:12:45 +01:00
Andras Bacsai
f514aa676d fix: Status is not available yet 2022-02-10 22:10:02 +01:00
Andras Bacsai
73fc9755dd fix: Only delete id.rsa in case of it exists 2022-02-10 22:06:22 +01:00
Andras Bacsai
5089c843b6 chore: Version bump 2022-02-10 21:56:44 +01:00
Andras Bacsai
cd527f2bce fix: Capture non-error as error 2022-02-10 21:56:19 +01:00
Andras Bacsai
82de234f21 fix: ENV variables set differently 2022-02-10 21:43:54 +01:00
Andras Bacsai
ae6f325c0a fix: Secrets join 2022-02-10 18:41:30 +01:00
Andras Bacsai
c64bbbe426 Update README.md 2022-02-10 15:48:16 +01:00
Andras Bacsai
eafd882a06 Update README.md 2022-02-10 15:48:03 +01:00
Andras Bacsai
460ae85226 V2 (#111)
Just v2
2022-02-10 15:47:44 +01:00
Andras Bacsai
a64b095c13 Update FUNDING.yml 2022-01-10 10:25:15 +01:00
Andras Bacsai
7ea0de3fb8 Depency bug causing errors (#80)
* bump version

* Bug causing problems in some of the dependencies
2021-08-07 13:22:17 +02:00
Andras Bacsai
b4c836afbd v1.0.23 (#68)
# Features 
- Build environment variables for NodeJS builds
- Initial monorepo support (more tests needed!)

# Fixes
- Fix wrong redirects
- Logout fix for the session manager
2021-07-16 23:42:14 +02:00
Andras Bacsai
2d0f22b379 v1.0.22 (#67) 2021-06-24 23:31:08 +02:00
Andras Bacsai
a8e9668c2b Haha 2021-06-22 12:19:12 +02:00
Andras Bacsai
425feba0e2 It's working! 2021-06-22 12:12:11 +02:00
Andras Bacsai
c09b8d888f Hmm, it should work now, right? (Please... work..) 2021-06-22 12:07:51 +02:00
Andras Bacsai
748e691a58 Hmm, ok 2021-06-22 12:02:06 +02:00
Andras Bacsai
f8c81ff95f Nooo 2021-06-22 11:54:19 +02:00
Andras Bacsai
d11c4a3cd7 Fix the fix of fix 2021-06-22 11:45:46 +02:00
Andras Bacsai
3f3ea151ef Fixes are not fixing 2021-06-22 11:40:02 +02:00
Andras Bacsai
7e2f68870c Hm, soemthing is not working 2021-06-22 11:20:21 +02:00
Andras Bacsai
df41cf14da Fix login again 2021-06-22 11:12:30 +02:00
Andras Bacsai
111370c025 Fix email login 2021-06-22 10:56:38 +02:00
Andras Bacsai
bcb2ba0b1b Fix Get Started button 2021-06-22 10:44:08 +02:00
Andras Bacsai
807d526ffa v1.0.21 (#66) 2021-06-22 10:19:20 +02:00
Andras Bacsai
2ff9c5fed5 v1.0.20 (#65) 2021-06-18 21:16:05 +02:00
Andras Bacsai
d43cd663d2 v1.0.19 (#64) 2021-06-17 20:47:09 +02:00
Andras Bacsai
dae91267e8 Corrected package.json dependencies 2021-06-16 11:14:10 +02:00
Andras Bacsai
b2d6317a23 SvelteKit package updates 2021-06-16 10:56:53 +02:00
Andras Bacsai
c49b412e69 Fix sveltekit/adapter-node version 2021-06-11 11:20:12 +02:00
Andras Bacsai
05e5d73556 v1.0.18 (#60)
* Removed nocodb image

* Quick fix for no installations
2021-06-10 11:55:02 +02:00
Andras Bacsai
53620f4b1a Update README.md 2021-06-07 23:57:31 +02:00
Andras Bacsai
9d14b03eb1 v1.0.17 (#59) 2021-06-07 23:44:36 +02:00
Andras Bacsai
04a5b1bd4f Fix for PR 2021-06-07 21:49:52 +02:00
Andras Bacsai
31b3f58b2c v1.0.16 (#51) 2021-06-07 21:33:11 +02:00
Andras Bacsai
9c173d1de0 bump version 2021-05-22 15:33:13 +02:00
Andras Bacsai
e11b6d74ed v1.0.15 (#49)
Webhook quickfix.
2021-05-22 15:28:22 +02:00
Andras Bacsai
c7efe899fa v1.0.14 (#48)
# Features
- Basic Python support

# Fixes
- Fix default start command
2021-05-22 15:18:58 +02:00
Andras Bacsai
adcd68c1ab v1.0.13 (#46) 2021-05-16 21:54:44 +02:00
Andras Bacsai
23a4ebb74a v1.0.12 - Sveltekit migration (#44)
Changed the whole tech stack to SvelteKit which means:
- Typescript 
- SSR
- No fastify :(
- Beta, but it's fine!

Other changes:
- Tailwind -> Tailwind JIT
- A lot more
2021-05-14 21:51:14 +02:00
Andras Bacsai
cccb9a5fec v1.0.11 (#41)
Features: 
- Build packs for popular frontend frameworks. It will help to understand which build packs should be chosen.

Fixes:
- Github queries optimized.
- Save repositories to store (faster navigation).
- Remove unnecessary data on dashboard requests.
- Speed up static site builds with a lot.

UI:
- Redesign of the application deployment page.
- Redesign of database deployments page.
2021-04-30 22:43:21 +02:00
Andras Bacsai
b416e3ab3e v1.0.10 (#39)
Fixes: 
- Default Nuxt port changed to 3000 (thanks to @yurgeman).
- Cleanup old images effectively.
- More attempts on container startups (3->6).
- Always clean up server logs on restart/redeploy.
2021-04-26 11:45:04 +02:00
Andras Bacsai
e16b7d65d4 Update README.md 2021-04-23 13:55:40 +02:00
Andras Bacsai
3744c64459 v1.0.9 (#37)
Features:
- Integrated the first service: [Plausible Analytics](https://plausible.io)!

Fixes:
- UI/UX fixes and new designs
2021-04-22 23:48:29 +02:00
Andras Bacsai
f742c2a3e2 Quick fix for Docker files 2021-04-19 13:08:17 +02:00
Andras Bacsai
142b83cc13 v1.0.7 (#32)
New features:
- Automatic error reporting (enabled by default)
- Increase build times by leveraging docker build caches
- 
Fixes:
- Fix error handling
- Fix vue autodetect
- Custom dockerfile is not the default

Others:
- Cleanup `logs-servers` collection, because old errors are not standardized
- New Traefik proxy version
- Standardized directory configurations
2021-04-19 09:46:05 +02:00
Andras Bacsai
bad84289c4 v1.0.6 (#30)
Features:
- Rust support 🦀 (Thanks to @pepoviola)
- Add a default rewrite rule to PHP apps (to index.php)
- Able to control upgrades in a straightforward way

Fixes:
- Improved upgrade scripts
- Simplified prechecks before deployment
- Fixed path deployments
- Fixed already defined apps redirections
- Better error handling - still needs a lot of improvement here!
2021-04-15 22:40:44 +02:00
Andras Bacsai
166a573392 New script.. again.. :) 2021-04-10 21:54:45 +02:00
Andras Bacsai
3585e365e7 Update README.md 2021-04-07 18:02:55 +02:00
Andras Bacsai
5114ac7721 Bump version 2021-04-06 23:24:44 +02:00
Andras Bacsai
703d941f23 v1.0.5 (#25)
- Update sequence a bit optimized.
- Dependency updates.
- Edge case on repo/branch selection handled.
- More default templates. Thanks to @SaraVieira
2021-04-06 23:22:48 +02:00
Andras Bacsai
c691c52751 Add support link and corrected README a bit. 2021-04-05 14:56:39 +02:00
Andras Bacsai
69f050b864 v1.0.4 (#21)
- Search in repositories (thanks to @SaraVieira).
- Custom Dockerfile - you be able to deploy ANY applications! 🎉 
- Basic repository scanner for Nextjs and React. It will setup the default commands and buildpack if it detects some defined parameters.
- UI/UX fixes:
  - Github loading screen instead of standard loading screen. 
  - Info tooltips which provide some explanations of the input fields.
2021-04-04 14:57:42 +02:00
Andras Bacsai
3af1fd4d1b Correcting my mistake :) (#17)
Get all user repositorties
2021-04-02 21:36:31 +02:00
Andras Bacsai
bdbf356910 Delete yarn.lock 2021-04-02 15:07:49 +02:00
Andras Bacsai
5573187d43 v1.0.3 - Simple PHP support! 🎉 (#15)
- Basic PHP support.
- Cosmetic things here and there.
- Fix publish directory option.
2021-04-02 15:05:23 +02:00
Andras Bacsai
767c65ab10 v1.0.2 (#10)
- Fix restart_policy in Service config.
- Tweaked the upgrade process a bit. REVERTED.
- Refactor and cosmetic surgery here and there.
- Track Service config changes and allow redeploy if it changes.
2021-03-30 23:35:22 +02:00
Andras Bacsai
a1cccd479e Revert "v1.0.2 (#8)" (#9)
This reverts commit b91bfa21b3.
2021-03-30 22:15:37 +02:00
Andras Bacsai
73d3d43215 Update package.json 2021-03-30 22:08:10 +02:00
Andras Bacsai
b91bfa21b3 v1.0.2 (#8)
- Fix restart_policy in Service config.
- Tweaked the upgrade process a bit.
- Refactor and cosmetic surgery here and there.
- Track Service config changes and allow redeploy if it changes.
2021-03-30 21:49:46 +02:00
Andras
4e69c56bd3 Bugfixes:
- Loading screen on Github reconfiguration.
- Fix Github App name in case on space is in the name.
2021-03-25 23:25:49 +01:00
Andras Bacsai
3162336fcc Update README.md 2021-03-24 22:32:54 +01:00
387 changed files with 33766 additions and 10675 deletions

16
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/javascript-node/.devcontainer/base.Dockerfile
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT="16-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
# [Optional] Uncomment if you want to install more global node modules
RUN su node -c "npm install -g pnpm"

View File

@@ -0,0 +1,28 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/javascript-node
{
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 18, 16, 14.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": {
"VARIANT": "16-bullseye"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["dbaeumer.vscode-eslint", "svelte.svelte-vscode"],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "cp .env.template .env && pnpm install && pnpm db:push && pnpm db:seed",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
"docker-in-docker": "20.10",
"github-cli": "latest"
}
}

View File

@@ -1,3 +1,11 @@
.DS_Store
node_modules
build
.svelte-kit
package
.env
.env.*
!.env.example
dist
.routify
client
apps/api/db/*.db

View File

@@ -1,35 +0,0 @@
####################################
# Domain where your Coolify instance will be available and reachable.
# It's the same as you set in Github OAuth App and Github App as <domain>.
DOMAIN=
## Let's Encrypt contact email required
EMAIL=
# JWT Token Sign Key for logging you in to Coolify's frontend
JWT_SIGN_KEY=
# Encryption key for SECRETS - do NOT share it with others!
SECRETS_ENCRYPTION_KEY=
# Docker Engine
DOCKER_ENGINE=/var/run/docker.sock
# Docker network to use internally between the proxy and your apps
DOCKER_NETWORK=coollabs
# Mongodb
# Values in case if you are using our Mongodb installation - CHANGE user and password fields!
MONGODB_HOST=coollabs-mongodb
MONGODB_PORT=27017
MONGODB_USER=supercooldbuser
MONGODB_PASSWORD=developmentPassword4db
MONGODB_DB=coolLabs-prod
# Frontend only variables
VITE_GITHUB_APP_CLIENTID=
VITE_GITHUB_APP_NAME=
# Github OAuth & App secrets and private key - you can get it from Github.
GITHUB_APP_CLIENT_SECRET=
GITHUP_APP_WEBHOOK_SECRET=
# It should look like this. Newlines breaks with \n
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA7Y+Uwkd8FINSwFktWGdtwCaOAazTDYR8ucEzGyR9r+ooJZhF\nOc32qgDSps6Q5DsqPOzvfhiviqU+et9VF+bJhfdzwJ+Le86QZH1RgsDMoY049XvI\nKSwP........"

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
open_collective: coollabsio

View File

@@ -0,0 +1,47 @@
name: 🐞 Bug report
description: Create a bug report to help us improve coolify
title: "[Bug]: "
labels: [Bug]
assignees:
- andrasbacsai
- vasani-arpit
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please fill the form in English
- type: checkboxes
attributes:
label: Is there an existing issue for this?
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Description
description: A concise description of what you're experiencing and what you expect.
placeholder: |
When I do <X>, <Y> happens and I see the error message attached below:
```...```
What I expect is <Z>
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Add steps to reproduce this behaviour, include console / network logs & videos
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: "The version of your coolify Instance"
placeholder: "2.5.2"
validations:
required: true

View File

@@ -0,0 +1,31 @@
name: 🛠️ Feature request
description: Suggest an idea to improve coolify
title: '[Feature]: '
labels: [Enhancement]
assignees:
- andrasbacsai
- vasani-arpit
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to request a feature for coolify! Please also add your request here to get feedback from the community: https://feedback.coolify.io/!
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue related to this feature request already exists.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Summary
description: One paragraph description of the feature.
validations:
required: true
- type: textarea
attributes:
label: Why should this be worked on?
description: A concise description of the problems or use cases for this feature request.
validations:
required: true

20
.github/ISSUE_TEMPLATE/--task.yaml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: 📝 Task
description: Create a task for the team to work on
title: "[Task]: "
labels: [Task]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue related to this already exists.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: SubTasks
placeholder: |
- Sub Task 1
- Sub Task 2
validations:
required: false

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: 🤔 Questions and Help
url: https://discord.com/invite/6rDM4fkymF
about: Reach out to us on discord or our github discussions page.
- name: 🙋‍♂️ service request
url: https://feedback.coolify.io/
about: want to request a new service? for e.g wordpress, hasura, appwrite etc...

39
.github/workflows/github-actions.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: release-coolify
on:
release:
types: published
jobs:
make-it-coolifyed:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Get current package version
uses: martinbeentjes/npm-get-version-action@v1.2.3
id: package-version
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: coollabsio/coolify:latest,coollabsio/coolify:${{steps.package-version.outputs.current-version}}
cache-from: type=registry,ref=coollabsio/coolify:buildcache
cache-to: type=registry,ref=coollabsio/coolify:buildcache,mode=max

17
.gitignore vendored
View File

@@ -1,10 +1,11 @@
.vscode
.idea
.DS_Store
node_modules
dist
dist-ssr
.routify
build
.svelte-kit
package
.env
yarn-error.log
api/development/console.log
.pnpm-debug.log
.env.*
!.env.example
dist
client
apps/api/db/*.db

9
.gitpod.yml Normal file
View File

@@ -0,0 +1,9 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.
tasks:
- init: npm install && npm run build
command: npm run start

View File

@@ -1,14 +0,0 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"printWidth": 80,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"svelteSortOrder" : "styles-scripts-markup",
"svelteStrictMode": true,
"svelteBracketNewLine": true,
"svelteAllowShorthand": true,
"plugins": ["prettier-plugin-svelte"]
}

11
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,11 @@
{
"i18n-ally.localesPaths": ["src/lib/locales"],
"i18n-ally.keystyle": "nested",
"i18n-ally.extract.ignoredByFiles": {
"src\\routes\\__layout.svelte": ["Coolify", "coolLabs logo"]
},
"i18n-ally.sourceLanguage": "en",
"i18n-ally.enabledFrameworks": ["svelte"],
"i18n-ally.enabledParsers": ["js", "ts", "json"],
"i18n-ally.extract.autoDetect": true
}

281
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,281 @@
# 👋 Welcome
First of all, thank you for considering contributing to my project! It means a lot 💜.
Contribution guide is for v2, not applicable for v3
## 🙋 Want to help?
If you begin in GitHub contribution, you can find the [first contribution](https://github.com/firstcontributions/first-contributions) and follow this guide.
Follow the [introduction](#introduction) to get started then start contributing!
This is a little list of what you can do to help the project:
- [🧑‍💻 Develop your own ideas](#developer-contribution)
- [🌐 Translate the project](#translation)
## 👋 Introduction
### Setup with github codespaces
If you have github codespaces enabled then you can just create a codespace and run `pnpm dev` to run your the dev environment. All the required dependencies and packages has been configured for you already.
### Setup locally in your machine
> 🔴 At the moment, Coolify **doesn't support Windows**. You must use Linux or MacOS. 💡 Although windows users can use github codespaces for development
#### Recommended Pull Request Guideline
- Fork the project
- Clone your fork repo to local
- Create a new branch
- Push to your fork repo
- Create a pull request: https://github.com/coollabsio/compare
- Write a proper description
- Open the pull request to review against `next` branch
---
# How to start after you set up your local fork?
Due to the lock file, this repository is best with [pnpm](https://pnpm.io). I recommend you try and use `pnpm` because it is cool and efficient!
You need to have [Docker Engine](https://docs.docker.com/engine/install/) installed locally.
#### Steps for local setup
1. Copy `.env.template` to `.env` and set the `COOLIFY_APP_ID` environment variable to something cool.
2. Install dependencies with `pnpm install`.
3. Need to create a local SQlite database with `pnpm db:push`.
This will apply all migrations at `db/dev.db`.
4. Seed the database with base entities with `pnpm db:seed`
5. You can start coding after starting `pnpm dev`.
## 🧑‍💻 Developer contribution
### Technical skills required
- **Languages**: Node.js / Javascript / Typescript
- **Framework JS/TS**: Svelte / SvelteKit
- **Database ORM**: Prisma.io
- **Docker Engine**
### Database migrations
During development, if you change the database layout, you need to run `pnpm db:push` to migrate the database and create types for Prisma. You also need to restart the development process.
If the schema is finalized, you need to create a migration file with `pnpm db:migrate <nameOfMigration>` where `nameOfMigration` is given by you. Make it sense. :)
### Tricky parts
- BullMQ, the queue system Coolify uses, cannot be hot reloaded. So if you change anything in the files related to it, you need to restart the development process. I'm actively looking for a different queue/scheduler library. I'm open to discussion!
---
# How to add new services
You can add any open-source and self-hostable software (service/application) to Coolify if the following statements are true:
- Self-hostable (obviously)
- Open-source
- Maintained (I do not want to add software full of bugs)
## Backend
There are 5 steps you should make on the backend side.
1. Create Prisma / database schema for the new service.
2. Add supported versions of the service.
3. Update global functions.
4. Create API endpoints.
5. Define automatically generated variables.
> I will use [Umami](https://umami.is/) as an example service.
### Create Prisma / database schema for the new service.
You only need to do this if you store passwords or any persistent configuration. Mostly it is required by all services, but there are some exceptions, like NocoDB.
Update Prisma schema in [prisma/schema.prisma](prisma/schema.prisma).
- Add new model with the new service name.
- Make a relationshup with `Service` model.
- In the `Service` model, the name of the new field should be with low-capital.
- If the service needs a database, define a `publicPort` field to be able to make it's database public, example field name in case of PostgreSQL: `postgresqlPublicPort`. It should be a optional field.
If you are finished with the Prisma schema, you should update the database schema with `pnpm db:push` command.
> You must restart the running development environment to be able to use the new model
> If you use VSCode, you probably need to restart the `Typescript Language Server` to get the new types loaded in the running VSCode.
### Add supported versions
Supported versions are hardcoded into Coolify (for now).
You need to update `supportedServiceTypesAndVersions` function at [src/lib/components/common.ts](src/lib/components/common.ts). Example JSON:
```js
{
// Name used to identify the service internally
name: 'umami',
// Fancier name to show to the user
fancyName: 'Umami',
// Docker base image for the service
baseImage: 'ghcr.io/mikecao/umami',
// Optional: If there is any dependent image, you should list it here
images: [],
// Usable tags
versions: ['postgresql-latest'],
// Which tag is the recommended
recommendedVersion: 'postgresql-latest',
// Application's default port, Umami listens on 3000
ports: {
main: 3000
}
}
```
### Update global functions
1. Add the new service to the `include` variable in [src/lib/database/services.ts](src/lib/database/services.ts), so it will be included in all places in the database queries where it is required.
```js
const include: Prisma.ServiceInclude = {
destinationDocker: true,
persistentStorage: true,
serviceSecret: true,
minio: true,
plausibleAnalytics: true,
vscodeserver: true,
wordpress: true,
ghost: true,
meiliSearch: true,
umami: true // This line!
};
```
2. Update the database update query with the new service type to `configureServiceType` function in [src/lib/database/services.ts](src/lib/database/services.ts). This function defines the automatically generated variables (passwords, users, etc.) and it's encryption process (if applicable).
```js
[...]
else if (type === 'umami') {
const postgresqlUser = cuid();
const postgresqlPassword = encrypt(generatePassword());
const postgresqlDatabase = 'umami';
const hashSalt = encrypt(generatePassword(64));
await prisma.service.update({
where: { id },
data: {
type,
umami: {
create: {
postgresqlDatabase,
postgresqlPassword,
postgresqlUser,
hashSalt,
}
}
}
});
}
```
3. Add decryption process for configurations and passwords to `getService` function in [src/lib/database/services.ts](src/lib/database/services.ts)
```js
if (body.umami?.postgresqlPassword)
body.umami.postgresqlPassword = decrypt(body.umami.postgresqlPassword);
if (body.umami?.hashSalt) body.umami.hashSalt = decrypt(body.umami.hashSalt);
```
4. Add service deletion query to `removeService` function in [src/lib/database/services.ts](src/lib/database/services.ts)
### Create API endpoints.
You need to add a new folder under [src/routes/services/[id]](src/routes/services/[id]) with the low-capital name of the service. You need 3 default files in that folder.
#### `index.json.ts`:
It has a POST endpoint that updates the service details in Coolify's database, such as name, url, other configurations, like passwords. It should look something like this:
```js
import { getUserDetails } from '$lib/common';
import * as db from '$lib/database';
import { ErrorHandler } from '$lib/database';
import type { RequestHandler } from '@sveltejs/kit';
export const post: RequestHandler = async (event) => {
const { status, body } = await getUserDetails(event);
if (status === 401) return { status, body };
const { id } = event.params;
let { name, fqdn } = await event.request.json();
if (fqdn) fqdn = fqdn.toLowerCase();
try {
await db.updateService({ id, fqdn, name });
return { status: 201 };
} catch (error) {
return ErrorHandler(error);
}
};
```
If it's necessary, you can create your own database update function, specifically for the new service.
#### `start.json.ts`
It has a POST endpoint that sets all the required secrets, persistent volumes, `docker-compose.yaml` file and sends a request to the specified docker engine.
You could also define an `HTTP` or `TCP` proxy for every other port that should be proxied to your server. (See `startHttpProxy` and `startTcpProxy` functions in [src/lib/haproxy/index.ts](src/lib/haproxy/index.ts))
#### `stop.json.ts`
It has a POST endpoint that stops the service and all dependent (TCP/HTTP proxies) containers. If publicPort is specified it also needs to cleanup it from the database.
## Frontend
1. You need to add a custom logo at [src/lib/components/svg/services/](src/lib/components/svg/services/) as a svelte component.
SVG is recommended, but you can use PNG as well. It should have the `isAbsolute` variable with the suitable CSS classes, primarily for sizing and positioning.
2. You need to include it the logo at
- [src/routes/services/index.svelte](src/routes/services/index.svelte) with `isAbsolute` in two places,
- [src/lib/components/ServiceLinks.svelte](src/lib/components/ServiceLinks.svelte) with `isAbsolute` and a link to the docs/main site of the service
- [src/routes/services/[id]/configuration/type.svelte](src/routes/services/[id]/configuration/type.svelte) with `isAbsolute`.
3. By default the URL and the name frontend forms are included in [src/routes/services/[id]/\_Services/\_Services.svelte](src/routes/services/[id]/_Services/_Services.svelte).
If you need to show more details on the frontend, such as users/passwords, you need to add Svelte component to [src/routes/services/[id]/\_Services](src/routes/services/[id]/_Services) with an underscore. For example, see other files in that folder.
You also need to add the new inputs to the `index.json.ts` file of the specific service, like for MinIO here: [src/routes/services/[id]/minio/index.json.ts](src/routes/services/[id]/minio/index.json.ts)
## 🌐 Translate the project
The project use [sveltekit-i18n](https://github.com/sveltekit-i18n/lib) to translate the project.
It follows the [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) to name languages.
### Installation
You must have gone throw all the [intro](#introduction) steps before you can start translating.
It's only an advice, but I recommend you to use:
- Visual Studio Code
- [i18n Ally for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=Lokalise.i18n-ally): ideal to see the progress of the translation.
- [Svelte for VS Code](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode): to get the syntax color for the project
### Adding a language
If your language doesn't appear in the [locales folder list](src/lib/locales/), follow the step below:
1. In `src/lib/locales/`, Copy paste `en.json` and rename it with your language (eg: `cz.json`).
2. In the [lang.json](src/lib/lang.json) file, add a line after the first bracket (`{`) with `"ISO of your language": "Language",` (eg: `"cz": "Czech",`).
3. Have fun translating!

43
Dockerfile Normal file
View File

@@ -0,0 +1,43 @@
FROM node:18-alpine as build
WORKDIR /app
RUN apk add --no-cache curl
RUN curl -sL https://unpkg.com/@pnpm/self-installer | node
COPY . .
RUN pnpm install
RUN pnpm build
# Production build
FROM node:18-alpine
WORKDIR /app
ENV NODE_ENV production
ARG TARGETPLATFORM
ENV PRISMA_QUERY_ENGINE_BINARY=/app/prisma-engines/query-engine \
PRISMA_MIGRATION_ENGINE_BINARY=/app/prisma-engines/migration-engine \
PRISMA_INTROSPECTION_ENGINE_BINARY=/app/prisma-engines/introspection-engine \
PRISMA_FMT_BINARY=/app/prisma-engines/prisma-fmt \
PRISMA_CLI_QUERY_ENGINE_TYPE=binary \
PRISMA_CLIENT_ENGINE_TYPE=binary
COPY --from=coollabsio/prisma-engine:3.15 /prisma-engines/query-engine /prisma-engines/migration-engine /prisma-engines/introspection-engine /prisma-engines/prisma-fmt /app/prisma-engines/
RUN apk add --no-cache git git-lfs openssh-client curl jq cmake sqlite openssl
RUN curl -sL https://unpkg.com/@pnpm/self-installer | node
RUN mkdir -p ~/.docker/cli-plugins/
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-20.10.9 -o /usr/bin/docker
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-compose-linux-2.3.4 -o ~/.docker/cli-plugins/docker-compose
RUN chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker
COPY --from=build /app/apps/api/build/ .
COPY --from=build /app/apps/ui/build/ ./public
COPY --from=build /app/apps/api/prisma/ ./prisma
COPY --from=build /app/apps/api/package.json .
COPY --from=build /app/docker-compose.yaml .
RUN pnpm install -p
EXPOSE 3000
CMD pnpm start

146
README.md
View File

@@ -1,97 +1,117 @@
# About
# Coolify
https://andrasbacsai.com/farewell-netlify-and-heroku-after-3-days-of-coding
An open-source & self-hostable Heroku / Netlify alternative.
# Features
- Deploy your Node.js and static sites just by pushing code to git.
- Hassle-free installation and upgrade process.
- One-click MongoDB, MySQL, PostgreSQL, CouchDB deployments!
## Live Demo
# Upcoming features
- Backups & monitoring.
- User analytics with privacy in mind.
- And much more (see [Roadmap](https://github.com/coollabsio/coolify/projects/1)).
https://demo.coolify.io/
(If it is unresponsive, that means someone overloaded the server. 😄)
# FAQ
Q: What does Buildpack means?
## Feedback
A: It defines your application's final form. Static means that it will be hosted as a static site in the end. (see next question below 👇)
If you have a new service / build pack you would like to add, raise an idea [here](https://feedback.coolify.io/) to get feedback from the community!
---
## How to install
Q: How can I build a static site, like Next.js, Sapper (prerendered), etc ?
Installation is automated with the following command:
A: Use `static` builder and set your `Build command`.
```bash
wget -q https://get.coollabs.io/coolify/install.sh -O install.sh; sudo bash ./install.sh
```
# Screenshots
If you would like no questions during installation:
[Login](https://coollabs.io/coolify/login.jpg)
```bash
wget -q https://get.coollabs.io/coolify/install.sh -O install.sh; sudo bash ./install.sh -f
```
[Applications](https://coollabs.io/coolify/applications.jpg)
For more details goto the [docs](https://docs.coollabs.io/coolify/installation).
[Databases](https://coollabs.io/coolify/databases.jpg)
## Features
[Configuration](https://coollabs.io/coolify/configuration.jpg)
ARM support is in beta!
[Settings](https://coollabs.io/coolify/settings.jpg)
### Git Sources
[Logs](https://coollabs.io/coolify/logs.jpg)
You can use the following Git Sources to be auto-deployed to your Coolifyt instance! (Self-hosted versions are also supported.)
# Getting Started
- Github
- GitLab
- Bitbucket (WIP)
Automatically: `sh <(curl -fsSL https://get.coollabs.io/install.sh) coolify`
### Destinations
Manually:
### Requirements before installation
- [Docker](https://docs.docker.com/engine/install/) version 20+
- Docker in [swarm mode enabled](https://docs.docker.com/engine/reference/commandline/swarm_init/) (should be set manually before installation)
- A [MongoDB](https://docs.mongodb.com/manual/installation/) instance.
- We have a [simple installation](https://github.com/coollabsio/infrastructure/tree/main/mongo) if you need one
- A configured DNS entry (see `.env.template`)
- [Github App](https://docs.github.com/en/developers/apps/creating-a-github-app)
You can deploy your applications to the following destinations:
- GitHub App name: could be anything weird
- Homepage URL: https://yourdomain
- Local Docker Engine
- Remote Docker Engine (WIP)
- Kubernetes (WIP)
Identifying and authorizing users:
- Callback URL: https://yourdomain/api/v1/login/github/app
- Request user authorization (OAuth) during installation -> Check!
### Applications
Webhook:
- Active -> Check!
- Webhook URL: https://yourdomain/api/v1/webhooks/deploy
- Webhook Secret: it should be super secret
These are the predefined build packs, but with the Docker build pack, you can host anything that is hostable with a single Dockerfile.
Repository permissions:
- Contents: Read-only
- Metadata: Read-only
User permissions:
- Email: Read-only
- Static sites
- NodeJS
- VueJS
- NuxtJS
- NextJS
- React/Preact
- Gatsby
- Svelte
- PHP
- Laravel
- Rust
- Docker
- Python
- Deno
Subscribe to events:
- Push -> Check!
### Databases
### Installation
- Clone this repository: `git clone git@github.com:coollabsio/coolify.git`
- Set `.env` (see `.env.template`)
- Installation: `bash install.sh all`
One-click database is ready to be used internally or shared over the internet:
## Updating process
### Update everything (proxy+coolify)
- `bash install.sh all`
- MongoDB
- MariaDB
- MySQL
- PostgreSQL
- CouchDB
- Redis
### Update coolify only
- `bash install.sh coolify`
### One-click services
### Update proxy only
- `bash install.sh proxy`
You can host cool open-source services as well:
- [WordPress](https://docs.coollabs.io/coolify/services/wordpress)
- [Ghost](https://ghost.org)
- [Plausible Analytics](https://docs.coollabs.io/coolify/services/plausible-analytics)
- [NocoDB](https://nocodb.com)
- [VSCode Server](https://github.com/cdr/code-server)
- [MinIO](https://min.io)
- [VaultWarden](https://github.com/dani-garcia/vaultwarden)
- [LanguageTool](https://languagetool.org)
- [n8n](https://n8n.io)
- [Uptime Kuma](https://github.com/louislam/uptime-kuma)
- [MeiliSearch](https://github.com/meilisearch/meilisearch)
- [Umami](https://github.com/mikecao/umami)
- [Fider](https://fider.io)
- [Hasura](https://hasura.io)
## Migration from v1
A fresh installation is necessary. v2 and v3 are not compatible with v1.
## Support
# Contact
- Twitter: [@andrasbacsai](https://twitter.com/andrasbacsai)
- Telegram: [@andrasbacsai](https://t.me/andrasbacsai)
- Email: [andras@coollabs.io](mailto:andras@coollabs.io)
- Discord: [Invitation](https://discord.gg/xhBCC7eGKw)
## Contribute
See [our contribution guide](./CONTRIBUTING.md).
## License
# License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Please see the [LICENSE](/LICENSE) file in our repository for the full text.

View File

@@ -1,27 +0,0 @@
module.exports = async function (fastify, opts) {
// Private routes
fastify.register(async function (server) {
if (process.env.NODE_ENV === 'production') server.register(require('./plugins/authentication'))
server.register(require('./routes/v1/upgrade'), { prefix: '/upgrade' })
server.register(require('./routes/v1/settings'), { prefix: '/settings' })
server.register(require('./routes/v1/dashboard'), { prefix: '/dashboard' })
server.register(require('./routes/v1/config'), { prefix: '/config' })
server.register(require('./routes/v1/application/remove'), { prefix: '/application/remove' })
server.register(require('./routes/v1/application/logs'), { prefix: '/application/logs' })
server.register(require('./routes/v1/application/check'), { prefix: '/application/check' })
server.register(require('./routes/v1/application/deploy'), { prefix: '/application/deploy' })
server.register(require('./routes/v1/application/deploy/logs'), { prefix: '/application/deploy/logs' })
server.register(require('./routes/v1/databases'), { prefix: '/databases' })
})
// Public routes
fastify.register(require('./routes/v1/verify'), { prefix: '/verify' })
fastify.register(require('./routes/v1/login/github'), {
prefix: '/login/github'
})
fastify.register(require('./routes/v1/webhooks/deploy'), {
prefix: '/webhooks/deploy'
})
fastify.register(require('./routes/v1/undead'), {
prefix: '/undead'
})
}

View File

@@ -1,36 +0,0 @@
const mongoose = require('mongoose')
const { MongoMemoryServer } = require('mongodb-memory-server-core')
const mongoServer = new MongoMemoryServer({
instance: {
port: 27017,
dbName: 'coolify',
storageEngine: 'wiredTiger'
},
binary: {
version: '4.4.3'
}
})
mongoose.Promise = Promise
mongoServer.getUri().then((mongoUri) => {
const mongooseOpts = {
useNewUrlParser: true,
useUnifiedTopology: true
}
mongoose.connect(mongoUri, mongooseOpts)
mongoose.connection.on('error', (e) => {
if (e.message.code === 'ETIMEDOUT') {
console.log(e)
mongoose.connect(mongoUri, mongooseOpts)
}
console.log(e)
})
mongoose.connection.once('open', () => {
console.log(`Started in-memory mongodb ${mongoUri}`)
})
})

View File

@@ -1,34 +0,0 @@
const packs = require('../../../packs')
const { saveAppLog } = require('../../logging')
const Deployment = require('../../../models/Deployment')
module.exports = async function (configuration) {
const { id, organization, name, branch } = configuration.repository
const { domain } = configuration.publish
const deployId = configuration.general.deployId
const execute = packs[configuration.build.pack]
if (execute) {
try {
await Deployment.findOneAndUpdate(
{ repoId: id, branch, deployId, organization, name, domain },
{ repoId: id, branch, deployId, organization, name, domain, progress: 'inprogress' })
await saveAppLog('### Building application.', configuration)
await execute(configuration)
await saveAppLog('### Building done.', configuration)
} catch (error) {
await Deployment.findOneAndUpdate(
{ repoId: id, branch, deployId, organization, name, domain },
{ repoId: id, branch, deployId, organization, name, domain, progress: 'failed' })
if (error.stack) throw { error: error.stack, type: 'server' }
throw { error, type: 'app' }
}
} else {
await Deployment.findOneAndUpdate(
{ repoId: id, branch, deployId, organization, name, domain },
{ repoId: id, branch, deployId, organization, name, domain, progress: 'failed' })
throw { error: 'No buildpack found.', type: 'app' }
}
}

View File

@@ -1,41 +0,0 @@
const { docker } = require('../../docker')
const { execShellAsync, delay } = require('../../common')
const Deployment = require('../../../models/Deployment')
async function purgeOldThings () {
try {
await docker.engine.pruneImages()
await docker.engine.pruneContainers()
} catch (error) {
throw { error, type: 'server' }
}
}
async function cleanup (configuration) {
const { id } = configuration.repository
const deployId = configuration.general.deployId
try {
// Cleanup stucked deployments.
const deployments = await Deployment.find({ repoId: id, deployId: { $ne: deployId }, progress: { $in: ['queued', 'inprogress'] } })
for (const deployment of deployments) {
await Deployment.findByIdAndUpdate(deployment._id, { $set: { progress: 'failed' } })
}
} catch (error) {
throw { error, type: 'server' }
}
}
async function deleteSameDeployments (configuration) {
try {
await (await docker.engine.listServices()).filter(r => r.Spec.Labels.managedBy === 'coolify' && r.Spec.Labels.type === 'application').map(async s => {
const running = JSON.parse(s.Spec.Labels.configuration)
if (running.repository.id === configuration.repository.id && running.repository.branch === configuration.repository.branch) {
await execShellAsync(`docker stack rm ${s.Spec.Labels['com.docker.stack.namespace']}`)
}
})
} catch (error) {
throw { error, type: 'server' }
}
}
module.exports = { cleanup, deleteSameDeployments, purgeOldThings }

View File

@@ -1,62 +0,0 @@
const { uniqueNamesGenerator, adjectives, colors, animals } = require('unique-names-generator')
const cuid = require('cuid')
const { execShellAsync } = require('../common')
const crypto = require('crypto')
function getUniq () {
return uniqueNamesGenerator({ dictionaries: [adjectives, animals, colors], length: 2 })
}
function setDefaultConfiguration (configuration) {
try {
const nickname = getUniq()
const deployId = cuid()
const shaBase = JSON.stringify({ repository: configuration.repository })
const sha256 = crypto.createHash('sha256').update(shaBase).digest('hex')
configuration.build.container.name = sha256.slice(0, 15)
configuration.general.nickname = nickname
configuration.general.deployId = deployId
configuration.general.workdir = `/tmp/${deployId}`
if (!configuration.publish.path) configuration.publish.path = '/'
if (!configuration.publish.port) configuration.publish.port = configuration.build.pack === 'static' ? 80 : 3000
if (configuration.build.pack === 'static') {
if (!configuration.build.command.installation) configuration.build.command.installation = 'yarn install'
if (!configuration.build.directory) configuration.build.directory = '/'
}
if (configuration.build.pack === 'nodejs') {
if (!configuration.build.command.installation) configuration.build.command.installation = 'yarn install'
if (!configuration.build.directory) configuration.build.directory = '/'
}
return configuration
} catch (error) {
throw { error, type: 'server' }
}
}
async function updateServiceLabels (configuration, services) {
// In case of any failure during deployment, still update the current configuration.
const found = services.find(s => {
const config = JSON.parse(s.Spec.Labels.configuration)
if (config.repository.id === configuration.repository.id && config.repository.branch === configuration.repository.branch) {
return config
}
return null
})
if (found) {
const { ID } = found
try {
const Labels = { ...JSON.parse(found.Spec.Labels.configuration), ...configuration }
execShellAsync(`docker service update --label-add configuration='${JSON.stringify(Labels)}' --label-add com.docker.stack.image='${configuration.build.container.name}:${configuration.build.container.tag}' ${ID}`)
} catch (error) {
console.log(error)
}
}
}
module.exports = { setDefaultConfiguration, updateServiceLabels }

View File

@@ -1,53 +0,0 @@
const fs = require('fs').promises
module.exports = async function (configuration) {
try {
// TODO: Do it better.
await fs.writeFile(`${configuration.general.workdir}/.dockerignore`, 'node_modules')
await fs.writeFile(
`${configuration.general.workdir}/nginx.conf`,
`user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
access_log off;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/index.html $uri/ /index.html =404;
}
error_page 404 /50x.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}
`
)
} catch (error) {
throw { error, type: 'server' }
}
}

View File

@@ -1,97 +0,0 @@
const yaml = require('js-yaml')
const { execShellAsync } = require('../../common')
const { docker } = require('../../docker')
const { saveAppLog } = require('../../logging')
const { deleteSameDeployments } = require('../cleanup')
const fs = require('fs').promises
module.exports = async function (configuration, configChanged, imageChanged) {
try {
const generateEnvs = {}
for (const secret of configuration.publish.secrets) {
generateEnvs[secret.name] = secret.value
}
const containerName = configuration.build.container.name
const stack = {
version: '3.8',
services: {
[containerName]: {
image: `${configuration.build.container.name}:${configuration.build.container.tag}`,
networks: [`${docker.network}`],
environment: generateEnvs,
deploy: {
replicas: 1,
restart_policy: {
condition: 'on-failure',
delay: '5s',
max_attempts: 1,
window: '120s'
},
update_config: {
parallelism: 1,
delay: '10s',
order: 'start-first'
},
rollback_config: {
parallelism: 1,
delay: '10s',
order: 'start-first'
},
labels: [
'managedBy=coolify',
'type=application',
'configuration=' + JSON.stringify(configuration),
'traefik.enable=true',
'traefik.http.services.' +
configuration.build.container.name +
`.loadbalancer.server.port=${configuration.publish.port}`,
'traefik.http.routers.' +
configuration.build.container.name +
'.entrypoints=websecure',
'traefik.http.routers.' +
configuration.build.container.name +
'.rule=Host(`' +
configuration.publish.domain +
'`) && PathPrefix(`' +
configuration.publish.path +
'`)',
'traefik.http.routers.' +
configuration.build.container.name +
'.tls.certresolver=letsencrypt',
'traefik.http.routers.' +
configuration.build.container.name +
'.middlewares=global-compress'
]
}
}
},
networks: {
[`${docker.network}`]: {
external: true
}
}
}
await saveAppLog('### Publishing.', configuration)
await fs.writeFile(`${configuration.general.workdir}/stack.yml`, yaml.dump(stack))
if (configChanged) {
// console.log('configuration changed')
await execShellAsync(
`cat ${configuration.general.workdir}/stack.yml | docker stack deploy --prune -c - ${containerName}`
)
} else if (imageChanged) {
// console.log('image changed')
await execShellAsync(`docker service update --image ${configuration.build.container.name}:${configuration.build.container.tag} ${configuration.build.container.name}_${configuration.build.container.name}`)
} else {
// console.log('new deployment or force deployment')
await deleteSameDeployments(configuration)
await execShellAsync(
`cat ${configuration.general.workdir}/stack.yml | docker stack deploy --prune -c - ${containerName}`
)
}
await saveAppLog('### Published done!', configuration)
} catch (error) {
await saveAppLog(`Error occured during deployment: ${error.message}`, configuration)
throw { error, type: 'server' }
}
}

View File

@@ -1,44 +0,0 @@
const jwt = require('jsonwebtoken')
const axios = require('axios')
const { execShellAsync, cleanupTmp } = require('../../common')
module.exports = async function (configuration) {
const { workdir } = configuration.general
const { organization, name, branch } = configuration.repository
const github = configuration.github
const githubPrivateKey = process.env.GITHUB_APP_PRIVATE_KEY.replace(/\\n/g, '\n').replace(/"/g, '')
const payload = {
iat: Math.round(new Date().getTime() / 1000),
exp: Math.round(new Date().getTime() / 1000 + 60),
iss: parseInt(github.app.id)
}
try {
const jwtToken = jwt.sign(payload, githubPrivateKey, {
algorithm: 'RS256'
})
const accessToken = await axios({
method: 'POST',
url: `https://api.github.com/app/installations/${github.installation.id}/access_tokens`,
data: {},
headers: {
Authorization: 'Bearer ' + jwtToken,
Accept: 'application/vnd.github.machine-man-preview+json'
}
})
await execShellAsync(
`mkdir -p ${workdir} && git clone -q -b ${branch} https://x-access-token:${accessToken.data.token}@github.com/${organization}/${name}.git ${workdir}/`
)
configuration.build.container.tag = (
await execShellAsync(`cd ${configuration.general.workdir}/ && git rev-parse HEAD`)
)
.replace('\n', '')
.slice(0, 7)
} catch (error) {
cleanupTmp(workdir)
if (error.stack) console.log(error.stack)
throw { error, type: 'server' }
}
}

View File

@@ -1,44 +0,0 @@
const dayjs = require('dayjs')
const { saveServerLog } = require('../logging')
const { cleanupTmp } = require('../common')
const { saveAppLog } = require('../logging')
const copyFiles = require('./deploy/copyFiles')
const buildContainer = require('./build/container')
const deploy = require('./deploy/deploy')
const Deployment = require('../../models/Deployment')
const { cleanup, purgeOldThings } = require('./cleanup')
const { updateServiceLabels } = require('./configuration')
async function queueAndBuild (configuration, services, configChanged, imageChanged) {
const { id, organization, name, branch } = configuration.repository
const { domain } = configuration.publish
const { deployId, nickname, workdir } = configuration.general
try {
await new Deployment({
repoId: id, branch, deployId, domain, organization, name, nickname
}).save()
await saveAppLog(`${dayjs().format('YYYY-MM-DD HH:mm:ss.SSS')} Queued.`, configuration)
await copyFiles(configuration)
await buildContainer(configuration)
await deploy(configuration, configChanged, imageChanged)
await Deployment.findOneAndUpdate(
{ repoId: id, branch, deployId, organization, name, domain },
{ repoId: id, branch, deployId, organization, name, domain, progress: 'done' })
await updateServiceLabels(configuration, services)
cleanupTmp(workdir)
await purgeOldThings()
} catch (error) {
await cleanup(configuration)
cleanupTmp(workdir)
const { type } = error.error
if (type === 'app') {
await saveAppLog(error.error, configuration, true)
} else {
await saveServerLog({ event: error.error, configuration })
}
}
}
module.exports = { queueAndBuild }

View File

@@ -1,94 +0,0 @@
const crypto = require('crypto')
const shell = require('shelljs')
const jsonwebtoken = require('jsonwebtoken')
const { docker } = require('./docker')
const User = require('../models/User')
const algorithm = 'aes-256-cbc'
const key = process.env.SECRETS_ENCRYPTION_KEY
function delay (t) {
return new Promise(function (resolve) {
setTimeout(function () {
resolve('OK')
}, t)
})
}
async function verifyUserId (authorization) {
const token = authorization.split(' ')[1]
const verify = jsonwebtoken.verify(token, process.env.JWT_SIGN_KEY)
const found = await User.findOne({ uid: verify.jti })
if (found) {
return true
} else {
return false
}
}
function execShellAsync (cmd, opts = {}) {
try {
return new Promise(function (resolve, reject) {
shell.config.silent = true
shell.exec(cmd, opts, function (code, stdout, stderr) {
if (code !== 0) return reject(new Error(stderr))
return resolve(stdout)
})
})
} catch (error) {
return new Error('Oops')
}
}
function cleanupTmp (dir) {
if (dir !== '/') shell.rm('-fr', dir)
}
async function checkImageAvailable (name) {
let cacheAvailable = false
try {
await docker.engine.getImage(name).get()
cacheAvailable = true
} catch (e) {
// Cache image not found
}
return cacheAvailable
}
function encryptData (text) {
const iv = crypto.randomBytes(16)
const cipher = crypto.createCipheriv(algorithm, Buffer.from(key), iv)
let encrypted = cipher.update(text)
encrypted = Buffer.concat([encrypted, cipher.final()])
return { iv: iv.toString('hex'), encryptedData: encrypted.toString('hex') }
}
function decryptData (text) {
const iv = Buffer.from(text.iv, 'hex')
const encryptedText = Buffer.from(text.encryptedData, 'hex')
const decipher = crypto.createDecipheriv(algorithm, Buffer.from(key), iv)
let decrypted = decipher.update(encryptedText)
decrypted = Buffer.concat([decrypted, decipher.final()])
return decrypted.toString()
}
function createToken (payload) {
const { uuid } = payload
return jsonwebtoken.sign({}, process.env.JWT_SIGN_KEY, {
expiresIn: 15778800,
algorithm: 'HS256',
audience: 'coolify',
issuer: 'coolify',
jwtid: uuid,
subject: `User:${uuid}`,
notBefore: -1000
})
}
module.exports = {
delay,
createToken,
execShellAsync,
cleanupTmp,
checkImageAvailable,
encryptData,
decryptData,
verifyUserId
}

View File

@@ -1,31 +0,0 @@
const Dockerode = require('dockerode')
const { saveAppLog } = require('./logging')
const docker = {
engine: new Dockerode({
socketPath: process.env.DOCKER_ENGINE
}),
network: process.env.DOCKER_NETWORK
}
async function streamEvents (stream, configuration) {
try {
await new Promise((resolve, reject) => {
docker.engine.modem.followProgress(stream, onFinished, onProgress)
function onFinished (err, res) {
if (err) reject(err)
resolve(res)
}
function onProgress (event) {
if (event.error) {
reject(event.error)
return
}
saveAppLog(event.stream, configuration)
}
})
} catch (error) {
throw { error, type: 'app' }
}
}
module.exports = { streamEvents, docker }

View File

@@ -1,55 +0,0 @@
const ApplicationLog = require('../models/Logs/Application')
const ServerLog = require('../models/Logs/Server')
const dayjs = require('dayjs')
function generateTimestamp () {
return `${dayjs().format('YYYY-MM-DD HH:mm:ss.SSS')} `
}
async function saveAppLog (event, configuration, isError) {
try {
const deployId = configuration.general.deployId
const repoId = configuration.repository.id
const branch = configuration.repository.branch
if (isError) {
// console.log(event, config, isError)
let clearedEvent = null
if (event.error) clearedEvent = '[ERROR] ' + generateTimestamp() + event.error.replace(/(\r\n|\n|\r)/gm, '')
else if (event) clearedEvent = '[ERROR] ' + generateTimestamp() + event.replace(/(\r\n|\n|\r)/gm, '')
try {
await new ApplicationLog({ repoId, branch, deployId, event: clearedEvent }).save()
} catch (error) {
console.log(error)
}
} else {
if (event && event !== '\n') {
const clearedEvent = '[INFO] ' + generateTimestamp() + event.replace(/(\r\n|\n|\r)/gm, '')
try {
await new ApplicationLog({ repoId, branch, deployId, event: clearedEvent }).save()
} catch (error) {
console.log(error)
}
}
}
} catch (error) {
console.log(error)
return error
}
}
async function saveServerLog ({ event, configuration, type }) {
if (configuration) {
const deployId = configuration.general.deployId
const repoId = configuration.repository.id
const branch = configuration.repository.branch
await new ApplicationLog({ repoId, branch, deployId, event: `[SERVER ERROR 😖]: ${event}` }).save()
}
await new ServerLog({ event, type }).save()
}
module.exports = {
saveAppLog,
saveServerLog
}

View File

@@ -1,16 +0,0 @@
const mongoose = require('mongoose')
const deploymentSchema = mongoose.Schema(
{
deployId: { type: String, required: true },
nickname: { type: String, required: true },
repoId: { type: Number, required: true },
organization: { type: String, required: true },
name: { type: String, required: true },
branch: { type: String, required: true },
domain: { type: String, required: true },
progress: { type: String, require: true, default: 'queued' }
},
{ timestamps: true }
)
module.exports = mongoose.model('deployment', deploymentSchema)

View File

@@ -1,10 +0,0 @@
const mongoose = require('mongoose')
const logSchema = mongoose.Schema(
{
deployId: { type: String, required: true },
event: { type: String, required: true }
},
{ timestamps: { createdAt: 'createdAt', updatedAt: false } }
)
module.exports = mongoose.model('logs-application', logSchema)

View File

@@ -1,13 +0,0 @@
const mongoose = require('mongoose')
const { version } = require('../../../package.json')
const logSchema = mongoose.Schema(
{
version: { type: String, required: true, default: version },
type: { type: String, required: true, enum: ['API', 'UPGRADE-P-1', 'UPGRADE-P-2'], default: 'API' },
event: { type: String, required: true },
seen: { type: Boolean, required: true, default: false }
},
{ timestamps: { createdAt: 'createdAt', updatedAt: false } }
)
module.exports = mongoose.model('logs-server', logSchema)

View File

@@ -1,11 +0,0 @@
const mongoose = require('mongoose')
const settingsSchema = mongoose.Schema(
{
applicationName: { type: String, required: true, default: 'coolify' },
allowRegistration: { type: Boolean, required: true, default: false }
},
{ timestamps: true }
)
module.exports = mongoose.model('settings', settingsSchema)

View File

@@ -1,12 +0,0 @@
const mongoose = require('mongoose')
const userSchema = mongoose.Schema(
{
email: { type: String, required: true },
avatar: { type: String },
uid: { type: String, required: true }
},
{ timestamps: true }
)
module.exports = mongoose.model('user', userSchema)

View File

@@ -1,28 +0,0 @@
const fs = require('fs').promises
const { streamEvents, docker } = require('../libs/docker')
async function buildImage (configuration) {
let dockerFile = `
# build
FROM node:lts
WORKDIR /usr/src/app
COPY package*.json .
`
if (configuration.build.command.installation) {
dockerFile += `RUN ${configuration.build.command.installation}
`
}
dockerFile += `COPY . .
RUN ${configuration.build.command.build}`
await fs.writeFile(`${configuration.general.workdir}/Dockerfile`, dockerFile)
const stream = await docker.engine.buildImage(
{ src: ['.'], context: configuration.general.workdir },
{ t: `${configuration.build.container.name}:${configuration.build.container.tag}` }
)
await streamEvents(stream, configuration)
}
module.exports = {
buildImage
}

View File

@@ -1,4 +0,0 @@
const static = require('./static')
const nodejs = require('./nodejs')
module.exports = { static, nodejs }

View File

@@ -1,32 +0,0 @@
const fs = require('fs').promises
const { buildImage } = require('../helpers')
const { streamEvents, docker } = require('../../libs/docker')
module.exports = async function (configuration) {
if (configuration.build.command.build) await buildImage(configuration)
let dockerFile = `# production stage
FROM node:lts
WORKDIR /usr/src/app
`
if (configuration.build.command.build) {
dockerFile += `COPY --from=${configuration.build.container.name}:${configuration.build.container.tag} /usr/src/app/${configuration.build.directory} /usr/src/app`
} else {
dockerFile += 'COPY . ./'
}
if (configuration.build.command.installation) {
dockerFile += `
RUN ${configuration.build.command.installation}
`
}
dockerFile += `
EXPOSE ${configuration.publish.port}
CMD [ "yarn", "start" ]`
await fs.writeFile(`${configuration.general.workdir}/Dockerfile`, dockerFile)
const stream = await docker.engine.buildImage(
{ src: ['.'], context: configuration.general.workdir },
{ t: `${configuration.build.container.name}:${configuration.build.container.tag}` }
)
await streamEvents(stream, configuration)
}

View File

@@ -1,28 +0,0 @@
const fs = require('fs').promises
const { buildImage } = require('../helpers')
const { streamEvents, docker } = require('../../libs/docker')
module.exports = async function (configuration) {
if (configuration.build.command.build) await buildImage(configuration)
let dockerFile = `# production stage
FROM nginx:stable-alpine
COPY nginx.conf /etc/nginx/nginx.conf
`
if (configuration.build.command.build) {
dockerFile += `COPY --from=${configuration.build.container.name}:${configuration.build.container.tag} /usr/src/app/${configuration.build.directory} /usr/share/nginx/html`
} else {
dockerFile += 'COPY . /usr/share/nginx/html'
}
dockerFile += `
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]`
await fs.writeFile(`${configuration.general.workdir}/Dockerfile`, dockerFile)
const stream = await docker.engine.buildImage(
{ src: ['.'], context: configuration.general.workdir },
{ t: `${configuration.build.container.name}:${configuration.build.container.tag}` }
)
await streamEvents(stream, configuration)
}

View File

@@ -1,21 +0,0 @@
const fp = require('fastify-plugin')
const User = require('../models/User')
module.exports = fp(async function (fastify, options, next) {
fastify.register(require('fastify-jwt'), {
secret: fastify.config.JWT_SIGN_KEY
})
fastify.addHook('onRequest', async (request, reply) => {
try {
const { jti } = await request.jwtVerify()
const found = await User.findOne({ uid: jti })
if (found) {
return true
} else {
reply.code(401).send('Unauthorized')
}
} catch (err) {
reply.code(401).send('Unauthorized')
}
})
next()
})

View File

@@ -1,35 +0,0 @@
const { verifyUserId } = require('../../../libs/common')
const { setDefaultConfiguration } = require('../../../libs/applications/configuration')
const { docker } = require('../../../libs/docker')
module.exports = async function (fastify) {
fastify.post('/', async (request, reply) => {
if (!await verifyUserId(request.headers.authorization)) {
reply.code(500).send({ error: 'Invalid request' })
return
}
const configuration = setDefaultConfiguration(request.body)
const services = (await docker.engine.listServices()).filter(r => r.Spec.Labels.managedBy === 'coolify' && r.Spec.Labels.type === 'application')
let foundDomain = false
for (const service of services) {
const running = JSON.parse(service.Spec.Labels.configuration)
if (running) {
if (
running.publish.domain === configuration.publish.domain &&
running.repository.id !== configuration.repository.id
) {
foundDomain = true
}
}
}
if (fastify.config.DOMAIN === configuration.publish.domain) foundDomain = true
if (foundDomain) {
reply.code(500).send({ message: 'Domain already in use.' })
return
}
return { message: 'OK' }
})
}

View File

@@ -1,117 +0,0 @@
const { verifyUserId, cleanupTmp, execShellAsync } = require('../../../../libs/common')
const Deployment = require('../../../../models/Deployment')
const { queueAndBuild } = require('../../../../libs/applications')
const { setDefaultConfiguration } = require('../../../../libs/applications/configuration')
const { docker } = require('../../../../libs/docker')
const cloneRepository = require('../../../../libs/applications/github/cloneRepository')
module.exports = async function (fastify) {
// const postSchema = {
// body: {
// type: "object",
// properties: {
// ref: { type: "string" },
// repository: {
// type: "object",
// properties: {
// id: { type: "number" },
// full_name: { type: "string" },
// },
// required: ["id", "full_name"],
// },
// installation: {
// type: "object",
// properties: {
// id: { type: "number" },
// },
// required: ["id"],
// },
// },
// required: ["ref", "repository", "installation"],
// },
// };
fastify.post('/', async (request, reply) => {
if (!await verifyUserId(request.headers.authorization)) {
reply.code(500).send({ error: 'Invalid request' })
return
}
const configuration = setDefaultConfiguration(request.body)
const services = (await docker.engine.listServices()).filter(r => r.Spec.Labels.managedBy === 'coolify' && r.Spec.Labels.type === 'application')
await cloneRepository(configuration)
let foundService = false
let foundDomain = false
let configChanged = false
let imageChanged = false
let forceUpdate = false
for (const service of services) {
const running = JSON.parse(service.Spec.Labels.configuration)
if (running) {
if (
running.publish.domain === configuration.publish.domain &&
running.repository.id !== configuration.repository.id
) {
foundDomain = true
}
if (running.repository.id === configuration.repository.id && running.repository.branch === configuration.repository.branch) {
const state = await execShellAsync(`docker stack ps ${running.build.container.name} --format '{{ json . }}'`)
const isError = state.split('\n').filter(n => n).map(s => JSON.parse(s)).filter(n => n.DesiredState !== 'Running')
if (isError.length > 0) forceUpdate = true
foundService = true
const runningWithoutContainer = JSON.parse(JSON.stringify(running))
delete runningWithoutContainer.build.container
const configurationWithoutContainer = JSON.parse(JSON.stringify(configuration))
delete configurationWithoutContainer.build.container
// If only the configuration changed
if (JSON.stringify(runningWithoutContainer.build) !== JSON.stringify(configurationWithoutContainer.build) || JSON.stringify(runningWithoutContainer.publish) !== JSON.stringify(configurationWithoutContainer.publish)) configChanged = true
// If only the image changed
if (running.build.container.tag !== configuration.build.container.tag) imageChanged = true
// If build pack changed, forceUpdate the service
if (running.build.pack !== configuration.build.pack) forceUpdate = true
}
}
}
if (foundDomain) {
cleanupTmp(configuration.general.workdir)
reply.code(500).send({ message: 'Domain already in use.' })
return
}
if (forceUpdate) {
imageChanged = false
configChanged = false
} else {
if (foundService && !imageChanged && !configChanged) {
cleanupTmp(configuration.general.workdir)
reply.code(500).send({ message: 'Nothing changed, no need to redeploy.' })
return
}
}
const alreadyQueued = await Deployment.find({
repoId: configuration.repository.id,
branch: configuration.repository.branch,
organization: configuration.repository.organization,
name: configuration.repository.name,
domain: configuration.publish.domain,
progress: { $in: ['queued', 'inprogress'] }
})
if (alreadyQueued.length > 0) {
reply.code(200).send({ message: 'Already in the queue.' })
return
}
queueAndBuild(configuration, services, configChanged, imageChanged)
reply.code(201).send({ message: 'Deployment queued.', nickname: configuration.general.nickname, name: configuration.build.container.name })
})
}

View File

@@ -1,62 +0,0 @@
const ApplicationLog = require('../../../../models/Logs/Application')
const Deployment = require('../../../../models/Deployment')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
const relativeTime = require('dayjs/plugin/relativeTime')
dayjs.extend(utc)
dayjs.extend(relativeTime)
module.exports = async function (fastify) {
const getLogSchema = {
querystring: {
type: 'object',
properties: {
repoId: { type: 'string' },
branch: { type: 'string' }
},
required: ['repoId', 'branch']
}
}
fastify.get('/', { schema: getLogSchema }, async (request, reply) => {
const { repoId, branch, page } = request.query
const onePage = 5
const show = Number(page) * onePage || 5
const deploy = await Deployment.find({ repoId, branch })
.select('-_id -__v -repoId')
.sort({ createdAt: 'desc' })
.limit(show)
const finalLogs = deploy.map(d => {
const finalLogs = { ...d._doc }
const updatedAt = dayjs(d.updatedAt).utc()
finalLogs.took = updatedAt.diff(dayjs(d.createdAt)) / 1000
finalLogs.since = updatedAt.fromNow()
return finalLogs
})
return finalLogs
})
fastify.get('/:deployId', async (request, reply) => {
const { deployId } = request.params
try {
const logs = await ApplicationLog.find({ deployId })
.select('-_id -__v')
.sort({ createdAt: 'asc' })
const deploy = await Deployment.findOne({ deployId })
.select('-_id -__v')
.sort({ createdAt: 'desc' })
const finalLogs = {}
finalLogs.progress = deploy.progress
finalLogs.events = logs.map(log => log.event)
finalLogs.human = dayjs(deploy.updatedAt).from(dayjs(deploy.updatedAt))
return finalLogs
} catch (e) {
throw new Error('No logs found')
}
})
}

View File

@@ -1,10 +0,0 @@
const { docker } = require('../../../libs/docker')
module.exports = async function (fastify) {
fastify.get('/', async (request, reply) => {
const { name } = request.query
const service = await docker.engine.getService(`${name}_${name}`)
const logs = (await service.logs({ stdout: true, stderr: true, timestamps: true })).toString().split('\n').map(l => l.slice(8)).filter((a) => a)
return { logs }
})
}

View File

@@ -1,35 +0,0 @@
const { docker } = require('../../../libs/docker')
const { execShellAsync } = require('../../../libs/common')
const ApplicationLog = require('../../../models/Logs/Application')
const Deployment = require('../../../models/Deployment')
module.exports = async function (fastify) {
fastify.post('/', async (request, reply) => {
const { organization, name, branch } = request.body
let found = false
try {
(await docker.engine.listServices()).filter(r => r.Spec.Labels.managedBy === 'coolify' && r.Spec.Labels.type === 'application').map(s => {
const running = JSON.parse(s.Spec.Labels.configuration)
if (running.repository.organization === organization &&
running.repository.name === name &&
running.repository.branch === branch) {
found = running
}
return null
})
if (found) {
const deploys = await Deployment.find({ organization, branch, name })
for (const deploy of deploys) {
await ApplicationLog.deleteMany({ deployId: deploy.deployId })
await Deployment.deleteMany({ deployId: deploy.deployId })
}
await execShellAsync(`docker stack rm ${found.build.container.name}`)
reply.code(200).send({ organization, name, branch })
} else {
reply.code(500).send({ message: 'Nothing to do.' })
}
} catch (error) {
reply.code(500).send({ message: 'Nothing to do.' })
}
})
}

View File

@@ -1,103 +0,0 @@
const { docker } = require('../../libs/docker')
module.exports = async function (fastify) {
// const getConfig = {
// querystring: {
// type: 'object',
// properties: {
// repoId: { type: 'number' },
// branch: { type: 'string' }
// },
// required: ['repoId', 'branch']
// }
// }
// const saveConfig = {
// body: {
// type: 'object',
// properties: {
// build: {
// type: 'object',
// properties: {
// baseDir: { type: 'string' },
// installCmd: { type: 'string' },
// buildCmd: { type: 'string' }
// },
// required: ['baseDir', 'installCmd', 'buildCmd']
// },
// publish: {
// type: 'object',
// properties: {
// publishDir: { type: 'string' },
// domain: { type: 'string' },
// pathPrefix: { type: 'string' },
// port: { type: 'number' }
// },
// required: ['publishDir', 'domain', 'pathPrefix', 'port']
// },
// previewDeploy: { type: 'boolean' },
// branch: { type: 'string' },
// repoId: { type: 'number' },
// buildPack: { type: 'string' },
// fullName: { type: 'string' },
// installationId: { type: 'number' }
// },
// required: ['build', 'publish', 'previewDeploy', 'branch', 'repoId', 'buildPack', 'fullName', 'installationId']
// }
// }
// fastify.get("/all", async (request, reply) => {
// return await Config.find().select("-_id -__v");
// });
// fastify.get("/", { schema: getConfig }, async (request, reply) => {
// const { repoId, branch } = request.query;
// return await Config.findOne({ repoId, branch }).select("-_id -__v");
// });
fastify.post('/', async (request, reply) => {
const { name, organization, branch } = request.body
const services = await docker.engine.listServices()
const applications = services.filter(r => r.Spec.Labels.managedBy === 'coolify' && r.Spec.Labels.type === 'application')
const found = applications.find(r => {
const configuration = r.Spec.Labels.configuration ? JSON.parse(r.Spec.Labels.configuration) : null
if (branch) {
if (configuration.repository.name === name && configuration.repository.organization === organization && configuration.repository.branch === branch) {
return r
}
} else {
if (configuration.repository.name === name && configuration.repository.organization === organization) {
return r
}
}
return null
})
if (found) {
return JSON.parse(found.Spec.Labels.configuration)
} else {
reply.code(500).send({ message: 'No configuration found.' })
}
})
// fastify.delete("/", async (request, reply) => {
// const { repoId, branch } = request.body;
// const deploys = await Deployment.find({ repoId, branch })
// const found = deploys.filter(d => d.progress !== 'done' && d.progress !== 'failed')
// if (found.length > 0) {
// throw new Error('Deployment inprogress, cannot delete now.');
// }
// const config = await Config.findOneAndDelete({ repoId, branch })
// for (const deploy of deploys) {
// await ApplicationLog.findOneAndRemove({ deployId: deploy.deployId });
// }
// const secrets = await Secret.find({ repoId, branch });
// for (const secret of secrets) {
// await Secret.findByIdAndRemove(secret._id);
// }
// await execShellAsync(`docker stack rm ${config.containerName}`);
// return { message: 'Deleted application and related configurations.' };
// });
}

View File

@@ -1,55 +0,0 @@
const { docker } = require('../../../libs/docker')
const Deployment = require('../../../models/Deployment')
const ServerLog = require('../../../models/Logs/Server')
module.exports = async function (fastify) {
fastify.get('/', async (request, reply) => {
const latestDeployments = await Deployment.aggregate([
{
$sort: { createdAt: -1 }
},
{
$group:
{
_id: {
repoId: '$repoId',
branch: '$branch'
},
createdAt: { $last: '$createdAt' },
progress: { $first: '$progress' }
}
}
])
const serverLogs = await ServerLog.find()
const services = await docker.engine.listServices()
let applications = services.filter(r => r.Spec.Labels.managedBy === 'coolify' && r.Spec.Labels.type === 'application' && r.Spec.Labels.configuration)
let databases = services.filter(r => r.Spec.Labels.managedBy === 'coolify' && r.Spec.Labels.type === 'database' && r.Spec.Labels.configuration)
applications = applications.map(r => {
if (JSON.parse(r.Spec.Labels.configuration)) {
const configuration = JSON.parse(r.Spec.Labels.configuration)
const status = latestDeployments.find(l => configuration.repository.id === l._id.repoId && configuration.repository.branch === l._id.branch)
if (status && status.progress) r.progress = status.progress
r.Spec.Labels.configuration = configuration
return r
}
return {}
})
databases = databases.map(r => {
const configuration = r.Spec.Labels.configuration ? JSON.parse(r.Spec.Labels.configuration) : null
r.Spec.Labels.configuration = configuration
return r
})
applications = [...new Map(applications.map(item => [item.Spec.Labels.configuration.publish.domain, item])).values()]
return {
serverLogs,
applications: {
deployed: applications
},
databases: {
deployed: databases
}
}
})
}

View File

@@ -1,173 +0,0 @@
const yaml = require('js-yaml')
const fs = require('fs').promises
const cuid = require('cuid')
const { docker } = require('../../../libs/docker')
const { execShellAsync } = require('../../../libs/common')
const { uniqueNamesGenerator, adjectives, colors, animals } = require('unique-names-generator')
const generator = require('generate-password')
function getUniq () {
return uniqueNamesGenerator({ dictionaries: [adjectives, animals, colors], length: 2 })
}
module.exports = async function (fastify) {
fastify.get('/:deployId', async (request, reply) => {
const { deployId } = request.params
try {
const database = (await docker.engine.listServices()).find(r => r.Spec.Labels.managedBy === 'coolify' && r.Spec.Labels.type === 'database' && JSON.parse(r.Spec.Labels.configuration).general.deployId === deployId)
if (database) {
const jsonEnvs = {}
for (const d of database.Spec.TaskTemplate.ContainerSpec.Env) {
const s = d.split('=')
jsonEnvs[s[0]] = s[1]
}
const payload = {
config: JSON.parse(database.Spec.Labels.configuration),
envs: jsonEnvs
}
reply.code(200).send(payload)
} else {
throw new Error()
}
} catch (error) {
throw new Error('No database found?')
}
})
const postSchema = {
body: {
type: 'object',
properties: {
type: { type: 'string', enum: ['mongodb', 'postgresql', 'mysql', 'couchdb'] }
},
required: ['type']
}
}
fastify.post('/deploy', { schema: postSchema }, async (request, reply) => {
let { type, defaultDatabaseName } = request.body
const passwords = generator.generateMultiple(2, {
length: 24,
numbers: true,
strict: true
})
const usernames = generator.generateMultiple(2, {
length: 10,
numbers: true,
strict: true
})
// TODO: Query for existing db with the same name
const nickname = getUniq()
if (!defaultDatabaseName) defaultDatabaseName = nickname
reply.code(201).send({ message: 'Deploying.' })
// TODO: Persistent volume, custom inputs
const deployId = cuid()
const configuration = {
general: {
workdir: `/tmp/${deployId}`,
deployId,
nickname,
type
},
database: {
usernames,
passwords,
defaultDatabaseName
},
deploy: {
name: nickname
}
}
let generateEnvs = {}
let image = null
let volume = null
if (type === 'mongodb') {
generateEnvs = {
MONGODB_ROOT_PASSWORD: passwords[0],
MONGODB_USERNAME: usernames[0],
MONGODB_PASSWORD: passwords[1],
MONGODB_DATABASE: defaultDatabaseName
}
image = 'bitnami/mongodb:4.4'
volume = `${configuration.general.deployId}-${type}-data:/bitnami/mongodb`
} else if (type === 'postgresql') {
generateEnvs = {
POSTGRESQL_PASSWORD: passwords[0],
POSTGRESQL_USERNAME: usernames[0],
POSTGRESQL_DATABASE: defaultDatabaseName
}
image = 'bitnami/postgresql:13.2.0'
volume = `${configuration.general.deployId}-${type}-data:/bitnami/postgresql`
} else if (type === 'couchdb') {
generateEnvs = {
COUCHDB_PASSWORD: passwords[0],
COUCHDB_USER: usernames[0]
}
image = 'bitnami/couchdb:3'
volume = `${configuration.general.deployId}-${type}-data:/bitnami/couchdb`
} else if (type === 'mysql') {
generateEnvs = {
MYSQL_ROOT_PASSWORD: passwords[0],
MYSQL_ROOT_USER: usernames[0],
MYSQL_USER: usernames[1],
MYSQL_PASSWORD: passwords[1],
MYSQL_DATABASE: defaultDatabaseName
}
image = 'bitnami/mysql:8.0'
volume = `${configuration.general.deployId}-${type}-data:/bitnami/mysql/data`
}
const stack = {
version: '3.8',
services: {
[configuration.general.deployId]: {
image,
networks: [`${docker.network}`],
environment: generateEnvs,
volumes: [volume],
deploy: {
replicas: 1,
update_config: {
parallelism: 0,
delay: '10s',
order: 'start-first'
},
rollback_config: {
parallelism: 0,
delay: '10s',
order: 'start-first'
},
labels: [
'managedBy=coolify',
'type=database',
'configuration=' + JSON.stringify(configuration)
]
}
}
},
networks: {
[`${docker.network}`]: {
external: true
}
},
volumes: {
[`${configuration.general.deployId}-${type}-data`]: {
external: true
}
}
}
await execShellAsync(`mkdir -p ${configuration.general.workdir}`)
await fs.writeFile(`${configuration.general.workdir}/stack.yml`, yaml.dump(stack))
await execShellAsync(
`cat ${configuration.general.workdir}/stack.yml | docker stack deploy -c - ${configuration.general.deployId}`
)
})
fastify.delete('/:dbName', async (request, reply) => {
const { dbName } = request.params
await execShellAsync(`docker stack rm ${dbName}`)
reply.code(200).send({})
})
}

View File

@@ -1,121 +0,0 @@
const axios = require('axios')
const User = require('../../../models/User')
const Settings = require('../../../models/Settings')
const cuid = require('cuid')
const mongoose = require('mongoose')
const jwt = require('jsonwebtoken')
module.exports = async function (fastify) {
const githubCodeSchema = {
schema: {
querystring: {
type: 'object',
properties: {
code: { type: 'string' }
},
required: ['code']
}
}
}
fastify.get('/app', { schema: githubCodeSchema }, async (request, reply) => {
const { code } = request.query
try {
const { data } = await axios({
method: 'post',
url: `https://github.com/login/oauth/access_token?client_id=${fastify.config.VITE_GITHUB_APP_CLIENTID}&client_secret=${fastify.config.GITHUB_APP_CLIENT_SECRET}&code=${code}`,
headers: {
accept: 'application/json'
}
})
const token = data.access_token
const githubAxios = axios.create({
baseURL: 'https://api.github.com'
})
githubAxios.defaults.headers.common.Accept = 'Application/json'
githubAxios.defaults.headers.common.Authorization = `token ${token}`
try {
let uid = cuid()
const { avatar_url } = (await githubAxios.get('/user')).data // eslint-disable-line
const email = (await githubAxios.get('/user/emails')).data.filter(
(e) => e.primary
)[0].email
const settings = await Settings.findOne({ applicationName: 'coolify' })
const registeredUsers = await User.find().countDocuments()
const foundUser = await User.findOne({ email })
if (foundUser) {
await User.findOneAndUpdate(
{ email },
{ avatar: avatar_url },
{ upsert: true, new: true }
)
uid = foundUser.uid
} else {
if (registeredUsers === 0) {
const newUser = new User({
_id: new mongoose.Types.ObjectId(),
email,
avatar: avatar_url,
uid
})
try {
await newUser.save()
} catch (e) {
console.log(e)
reply.code(500).send({ success: false, error: e })
return
}
} else {
if (!settings && registeredUsers > 0) {
reply.code(500).send('Registration disabled, enable it in settings.')
} else {
if (!settings.allowRegistration) {
reply.code(500).send('You are not allowed here!')
} else {
const newUser = new User({
_id: new mongoose.Types.ObjectId(),
email,
avatar: avatar_url,
uid
})
try {
await newUser.save()
} catch (e) {
console.log(e)
reply.code(500).send({ success: false, error: e })
return
}
}
}
}
}
const jwtToken = jwt.sign({}, fastify.config.JWT_SIGN_KEY, {
expiresIn: 15778800,
algorithm: 'HS256',
audience: 'coolLabs',
issuer: 'coolLabs',
jwtid: uid,
subject: `User:${uid}`,
notBefore: -1000
})
reply
.code(200)
.redirect(
302,
`/api/v1/login/github/success?jwtToken=${jwtToken}&ghToken=${token}`
)
} catch (e) {
console.log(e)
reply.code(500).send({ success: false, error: e })
return
}
} catch (error) {
console.log(error)
reply.code(500).send({ success: false, error: error.message })
}
})
fastify.get('/success', async (request, reply) => {
return reply.sendFile('bye.html')
})
}

View File

@@ -1,44 +0,0 @@
const Settings = require('../../../models/Settings')
module.exports = async function (fastify) {
const applicationName = 'coolify'
const postSchema = {
body: {
type: 'object',
properties: {
allowRegistration: { type: 'boolean' }
},
required: ['allowRegistration']
}
}
fastify.get('/', async (request, reply) => {
try {
let settings = await Settings.findOne({ applicationName }).select('-_id -__v')
// TODO: Should do better
if (!settings) {
settings = {
applicationName,
allowRegistration: false
}
}
return {
settings
}
} catch (error) {
throw new Error(error)
}
})
fastify.post('/', { schema: postSchema }, async (request, reply) => {
try {
const settings = await Settings.findOneAndUpdate(
{ applicationName },
{ applicationName, ...request.body },
{ upsert: true, new: true }
).select('-_id -__v')
reply.code(201).send({ settings })
} catch (error) {
throw new Error(error)
}
})
}

View File

@@ -1,5 +0,0 @@
module.exports = async function (fastify) {
fastify.get('/', async (request, reply) => {
reply.code(200).send('NO')
})
}

View File

@@ -1,12 +0,0 @@
const { execShellAsync } = require('../../../libs/common')
const { saveServerLog } = require('../../../libs/logging')
module.exports = async function (fastify) {
fastify.get('/', async (request, reply) => {
const upgradeP1 = await execShellAsync('bash ./install.sh upgrade-phase-1')
await saveServerLog({ event: upgradeP1, type: 'UPGRADE-P-1' })
reply.code(200).send('I\'m trying, okay?')
const upgradeP2 = await execShellAsync('bash ./install.sh upgrade-phase-2')
await saveServerLog({ event: upgradeP2, type: 'UPGRADE-P-2' })
})
}

View File

@@ -1,16 +0,0 @@
const User = require('../../models/User')
const jwt = require('jsonwebtoken')
module.exports = async function (fastify) {
fastify.get('/', async (request, reply) => {
const { authorization } = request.headers
if (!authorization) {
reply.code(401).send({})
return
}
const token = authorization.split(' ')[1]
const verify = jwt.verify(token, fastify.config.JWT_SIGN_KEY)
const found = await User.findOne({ uid: verify.jti })
found ? reply.code(200).send({}) : reply.code(401).send({})
})
}

View File

@@ -1,142 +0,0 @@
const crypto = require('crypto')
const { cleanupTmp, execShellAsync } = require('../../../libs/common')
const Deployment = require('../../../models/Deployment')
const { queueAndBuild } = require('../../../libs/applications')
const { setDefaultConfiguration } = require('../../../libs/applications/configuration')
const { docker } = require('../../../libs/docker')
const cloneRepository = require('../../../libs/applications/github/cloneRepository')
module.exports = async function (fastify) {
// TODO: Add this to fastify plugin
const postSchema = {
body: {
type: 'object',
properties: {
ref: { type: 'string' },
repository: {
type: 'object',
properties: {
id: { type: 'number' },
full_name: { type: 'string' }
},
required: ['id', 'full_name']
},
installation: {
type: 'object',
properties: {
id: { type: 'number' }
},
required: ['id']
}
},
required: ['ref', 'repository', 'installation']
}
}
fastify.post('/', { schema: postSchema }, async (request, reply) => {
const hmac = crypto.createHmac('sha256', fastify.config.GITHUP_APP_WEBHOOK_SECRET)
const digest = Buffer.from('sha256=' + hmac.update(JSON.stringify(request.body)).digest('hex'), 'utf8')
const checksum = Buffer.from(request.headers['x-hub-signature-256'], 'utf8')
if (checksum.length !== digest.length || !crypto.timingSafeEqual(digest, checksum)) {
reply.code(500).send({ error: 'Invalid request' })
return
}
if (request.headers['x-github-event'] !== 'push') {
reply.code(500).send({ error: 'Not a push event.' })
return
}
const services = (await docker.engine.listServices()).filter(r => r.Spec.Labels.managedBy === 'coolify' && r.Spec.Labels.type === 'application')
let configuration = services.find(r => {
if (request.body.ref.startsWith('refs')) {
const branch = request.body.ref.split('/')[2]
if (
JSON.parse(r.Spec.Labels.configuration).repository.id === request.body.repository.id &&
JSON.parse(r.Spec.Labels.configuration).repository.branch === branch
) {
return r
}
}
return null
})
if (!configuration) {
reply.code(500).send({ error: 'No configuration found.' })
return
}
configuration = setDefaultConfiguration(JSON.parse(configuration.Spec.Labels.configuration))
await cloneRepository(configuration)
let foundService = false
let foundDomain = false
let configChanged = false
let imageChanged = false
let forceUpdate = false
for (const service of services) {
const running = JSON.parse(service.Spec.Labels.configuration)
if (running) {
if (
running.publish.domain === configuration.publish.domain &&
running.repository.id !== configuration.repository.id &&
running.repository.branch !== configuration.repository.branch
) {
foundDomain = true
}
if (running.repository.id === configuration.repository.id && running.repository.branch === configuration.repository.branch) {
const state = await execShellAsync(`docker stack ps ${running.build.container.name} --format '{{ json . }}'`)
const isError = state.split('\n').filter(n => n).map(s => JSON.parse(s)).filter(n => n.DesiredState !== 'Running')
if (isError.length > 0) forceUpdate = true
foundService = true
const runningWithoutContainer = JSON.parse(JSON.stringify(running))
delete runningWithoutContainer.build.container
const configurationWithoutContainer = JSON.parse(JSON.stringify(configuration))
delete configurationWithoutContainer.build.container
if (JSON.stringify(runningWithoutContainer.build) !== JSON.stringify(configurationWithoutContainer.build) || JSON.stringify(runningWithoutContainer.publish) !== JSON.stringify(configurationWithoutContainer.publish)) configChanged = true
if (running.build.container.tag !== configuration.build.container.tag) imageChanged = true
}
}
}
if (foundDomain) {
cleanupTmp(configuration.general.workdir)
reply.code(500).send({ message: 'Domain already used.' })
return
}
if (forceUpdate) {
imageChanged = false
configChanged = false
} else {
if (foundService && !imageChanged && !configChanged) {
cleanupTmp(configuration.general.workdir)
reply.code(500).send({ message: 'Nothing changed, no need to redeploy.' })
return
}
}
const alreadyQueued = await Deployment.find({
repoId: configuration.repository.id,
branch: configuration.repository.branch,
organization: configuration.repository.organization,
name: configuration.repository.name,
domain: configuration.publish.domain,
progress: { $in: ['queued', 'inprogress'] }
})
if (alreadyQueued.length > 0) {
reply.code(200).send({ message: 'Already in the queue.' })
return
}
queueAndBuild(configuration, services, configChanged, imageChanged)
reply.code(201).send({ message: 'Deployment queued.' })
})
}

View File

@@ -1,49 +0,0 @@
const schema = {
type: 'object',
required: [
'DOMAIN',
'EMAIL',
'VITE_GITHUB_APP_CLIENTID',
'GITHUB_APP_CLIENT_SECRET',
'GITHUB_APP_PRIVATE_KEY',
'GITHUP_APP_WEBHOOK_SECRET',
'JWT_SIGN_KEY',
'SECRETS_ENCRYPTION_KEY'
],
properties: {
DOMAIN: {
type: 'string'
},
EMAIL: {
type: 'string'
},
VITE_GITHUB_APP_CLIENTID: {
type: 'string'
},
GITHUB_APP_CLIENT_SECRET: {
type: 'string'
},
GITHUB_APP_PRIVATE_KEY: {
type: 'string'
},
GITHUP_APP_WEBHOOK_SECRET: {
type: 'string'
},
JWT_SIGN_KEY: {
type: 'string'
},
DOCKER_ENGINE: {
type: 'string',
default: '/var/run/docker.sock'
},
DOCKER_NETWORK: {
type: 'string',
default: 'coollabs'
},
SECRETS_ENCRYPTION_KEY: {
type: 'string'
}
}
}
module.exports = { schema }

View File

@@ -1,90 +0,0 @@
require('dotenv').config()
const fs = require('fs')
const util = require('util')
const { saveServerLog } = require('./libs/logging')
const Deployment = require('./models/Deployment')
const fastify = require('fastify')({
logger: { level: 'error' }
})
const mongoose = require('mongoose')
const path = require('path')
const { schema } = require('./schema')
fastify.register(require('fastify-env'), {
schema,
dotenv: true
})
if (process.env.NODE_ENV === 'production') {
fastify.register(require('fastify-static'), {
root: path.join(__dirname, '../dist/')
})
fastify.setNotFoundHandler(function (request, reply) {
reply.sendFile('index.html')
})
} else {
fastify.register(require('fastify-static'), {
root: path.join(__dirname, '../public/')
})
}
fastify.register(require('./app'), { prefix: '/api/v1' })
fastify.setErrorHandler(async (error, request, reply) => {
console.log(error)
if (error.statusCode) {
reply.status(error.statusCode).send({ message: error.message } || { message: 'Something is NOT okay. Are you okay?' })
} else {
reply.status(500).send({ message: error.message } || { message: 'Something is NOT okay. Are you okay?' })
}
await saveServerLog({ event: error })
})
if (process.env.NODE_ENV === 'production') {
mongoose.connect(
`mongodb://${process.env.MONGODB_USER}:${process.env.MONGODB_PASSWORD}@${process.env.MONGODB_HOST}:${process.env.MONGODB_PORT}/${process.env.MONGODB_DB}?authSource=${process.env.MONGODB_DB}&readPreference=primary&ssl=false`,
{ useNewUrlParser: true, useUnifiedTopology: true, useFindAndModify: false }
)
} else {
mongoose.connect(
'mongodb://localhost:27017/coolify?&readPreference=primary&ssl=false',
{ useNewUrlParser: true, useUnifiedTopology: true, useFindAndModify: false }
)
}
mongoose.connection.on(
'error',
console.error.bind(console, 'connection error:')
)
mongoose.connection.once('open', async function () {
if (process.env.NODE_ENV === 'production') {
fastify.listen(3000, '0.0.0.0')
console.log('Coolify API is up and running in production.')
} else {
const logFile = fs.createWriteStream('api/development/console.log', { flags: 'w' })
const logStdout = process.stdout
console.log = function (d) {
logFile.write(`[INFO]: ${util.format(d)}\n`)
logStdout.write(util.format(d) + '\n')
}
console.error = function (d) {
logFile.write(`[ERROR]: ${util.format(d)}\n`)
logStdout.write(util.format(d) + '\n')
}
console.warn = function (d) {
logFile.write(`[WARN]: ${util.format(d)}\n`)
logStdout.write(util.format(d) + '\n')
}
fastify.listen(3001)
console.log('Coolify API is up and running in development.')
}
// On start cleanup inprogress/queued deployments.
const deployments = await Deployment.find({ progress: { $in: ['queued', 'inprogress'] } })
for (const deployment of deployments) {
await Deployment.findByIdAndUpdate(deployment._id, { $set: { progress: 'failed' } })
}
})

9
apps/api/.eslintignore Normal file
View File

@@ -0,0 +1,9 @@
seed.js
.DS_Store
node_modules
build
.env
.env.*
!.env.example
dist
dev.db

11
apps/api/.eslintrc Normal file
View File

@@ -0,0 +1,11 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
]
}

11
apps/api/.gitignore vendored Normal file
View File

@@ -0,0 +1,11 @@
.DS_Store
node_modules
build
.svelte-kit
package
.env
.env.*
!.env.example
dist
dev.db
client

0
apps/api/.prettierignore Normal file
View File

6
apps/api/.prettierrc Normal file
View File

@@ -0,0 +1,6 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
}

0
apps/api/db/.gitkeep Normal file
View File

7
apps/api/nodemon.json Normal file
View File

@@ -0,0 +1,7 @@
{
"watch": ["src"],
"ignore": ["src/**/*.test.ts"],
"ext": "ts,mjs,json,graphql",
"exec": "rimraf build && esbuild `find src \\( -name '*.ts' \\) | grep -v client/` --platform=node --outdir=build --format=cjs && node build",
"legacyWatch": true
}

67
apps/api/package.json Normal file
View File

@@ -0,0 +1,67 @@
{
"name": "coolify-api",
"description": "Coolify's Fastify API",
"license": "AGPL-3.0",
"scripts": {
"db:push": "prisma db push && prisma generate",
"db:seed": "prisma db seed",
"db:studio": "prisma studio",
"dev": "nodemon",
"build": "rimraf build && esbuild `find src \\( -name '*.ts' \\)| grep -v client/` --platform=node --outdir=build --format=cjs",
"format": "prettier --write 'src/**/*.{js,ts,json,md}'",
"lint": "prettier --check 'src/**/*.{js,ts,json,md}' && eslint --ignore-path .eslintignore .",
"start": "NODE_ENV=production npx -y prisma migrate deploy && npx prisma generate && npx prisma db seed && node index.js"
},
"dependencies": {
"@breejs/ts-worker": "2.0.0",
"@fastify/autoload": "5.0.0",
"@fastify/cookie": "7.0.0",
"@fastify/cors": "8.0.0",
"@fastify/env": "4.0.0",
"@fastify/jwt": "6.2.0",
"@fastify/static": "6.4.0",
"@iarna/toml": "2.2.5",
"@prisma/client": "3.15.2",
"axios": "0.27.2",
"bcryptjs": "2.4.3",
"bree": "9.1.1",
"cabin": "9.1.2",
"compare-versions": "4.1.3",
"cuid": "2.1.8",
"dayjs": "1.11.3",
"dockerode": "3.3.2",
"dotenv-extended": "2.9.0",
"fastify": "4.2.0",
"fastify-plugin": "3.0.1",
"generate-password": "1.7.0",
"get-port": "6.1.2",
"got": "12.1.0",
"is-ip": "4.0.0",
"js-yaml": "4.1.0",
"jsonwebtoken": "8.5.1",
"node-forge": "1.3.1",
"node-os-utils": "1.3.7",
"p-queue": "7.2.0",
"strip-ansi": "7.0.1",
"unique-names-generator": "4.7.1"
},
"devDependencies": {
"@types/node": "18.0.3",
"@types/node-os-utils": "1.3.0",
"@typescript-eslint/eslint-plugin": "5.30.5",
"@typescript-eslint/parser": "5.30.5",
"esbuild": "0.14.48",
"eslint": "8.19.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.2.1",
"nodemon": "2.0.19",
"prettier": "2.7.1",
"prisma": "3.15.2",
"rimraf": "3.0.2",
"tsconfig-paths": "4.0.0",
"typescript": "4.7.4"
},
"prisma": {
"seed": "node prisma/seed.js"
}
}

View File

@@ -0,0 +1,443 @@
-- CreateTable
CREATE TABLE "Setting" (
"id" TEXT NOT NULL PRIMARY KEY,
"fqdn" TEXT,
"isRegistrationEnabled" BOOLEAN NOT NULL DEFAULT false,
"proxyPassword" TEXT NOT NULL,
"proxyUser" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL PRIMARY KEY,
"email" TEXT NOT NULL,
"type" TEXT NOT NULL,
"password" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
-- CreateTable
CREATE TABLE "Permission" (
"id" TEXT NOT NULL PRIMARY KEY,
"userId" TEXT NOT NULL,
"teamId" TEXT NOT NULL,
"permission" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Permission_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT "Permission_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Team" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"databaseId" TEXT,
"serviceId" TEXT,
FOREIGN KEY ("databaseId") REFERENCES "Database" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "TeamInvitation" (
"id" TEXT NOT NULL PRIMARY KEY,
"uid" TEXT NOT NULL,
"email" TEXT NOT NULL,
"teamId" TEXT NOT NULL,
"teamName" TEXT NOT NULL,
"permission" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);
-- CreateTable
CREATE TABLE "Application" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"fqdn" TEXT,
"repository" TEXT,
"configHash" TEXT,
"branch" TEXT,
"buildPack" TEXT,
"projectId" INTEGER,
"port" INTEGER,
"installCommand" TEXT,
"buildCommand" TEXT,
"startCommand" TEXT,
"baseDirectory" TEXT,
"publishDirectory" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"destinationDockerId" TEXT,
"gitSourceId" TEXT,
CONSTRAINT "Application_destinationDockerId_fkey" FOREIGN KEY ("destinationDockerId") REFERENCES "DestinationDocker" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT "Application_gitSourceId_fkey" FOREIGN KEY ("gitSourceId") REFERENCES "GitSource" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "ApplicationSettings" (
"id" TEXT NOT NULL PRIMARY KEY,
"applicationId" TEXT NOT NULL,
"debug" BOOLEAN NOT NULL DEFAULT false,
"previews" BOOLEAN NOT NULL DEFAULT false,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "ApplicationSettings_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "Application" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Secret" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"value" TEXT NOT NULL,
"isBuildSecret" BOOLEAN NOT NULL DEFAULT false,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"applicationId" TEXT NOT NULL,
CONSTRAINT "Secret_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "Application" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "BuildLog" (
"id" TEXT NOT NULL PRIMARY KEY,
"applicationId" TEXT,
"buildId" TEXT NOT NULL,
"line" TEXT NOT NULL,
"time" INTEGER NOT NULL
);
-- CreateTable
CREATE TABLE "Build" (
"id" TEXT NOT NULL PRIMARY KEY,
"type" TEXT NOT NULL,
"applicationId" TEXT,
"destinationDockerId" TEXT,
"gitSourceId" TEXT,
"githubAppId" TEXT,
"gitlabAppId" TEXT,
"commit" TEXT,
"status" TEXT DEFAULT 'queued',
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
-- CreateTable
CREATE TABLE "DestinationDocker" (
"id" TEXT NOT NULL PRIMARY KEY,
"network" TEXT NOT NULL,
"name" TEXT NOT NULL,
"engine" TEXT NOT NULL,
"remoteEngine" BOOLEAN NOT NULL DEFAULT false,
"isCoolifyProxyUsed" BOOLEAN DEFAULT false,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
-- CreateTable
CREATE TABLE "GitSource" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"type" TEXT,
"apiUrl" TEXT,
"htmlUrl" TEXT,
"organization" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"githubAppId" TEXT,
"gitlabAppId" TEXT,
CONSTRAINT "GitSource_githubAppId_fkey" FOREIGN KEY ("githubAppId") REFERENCES "GithubApp" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT "GitSource_gitlabAppId_fkey" FOREIGN KEY ("gitlabAppId") REFERENCES "GitlabApp" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "GithubApp" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT,
"appId" INTEGER,
"installationId" INTEGER,
"clientId" TEXT,
"clientSecret" TEXT,
"webhookSecret" TEXT,
"privateKey" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
-- CreateTable
CREATE TABLE "GitlabApp" (
"id" TEXT NOT NULL PRIMARY KEY,
"oauthId" INTEGER NOT NULL,
"groupName" TEXT,
"deployKeyId" INTEGER,
"privateSshKey" TEXT,
"publicSshKey" TEXT,
"webhookToken" TEXT,
"appId" TEXT,
"appSecret" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
-- CreateTable
CREATE TABLE "Database" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"publicPort" INTEGER,
"defaultDatabase" TEXT,
"type" TEXT,
"version" TEXT,
"dbUser" TEXT,
"dbUserPassword" TEXT,
"rootUser" TEXT,
"rootUserPassword" TEXT,
"destinationDockerId" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Database_destinationDockerId_fkey" FOREIGN KEY ("destinationDockerId") REFERENCES "DestinationDocker" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "DatabaseSettings" (
"id" TEXT NOT NULL PRIMARY KEY,
"databaseId" TEXT NOT NULL,
"isPublic" BOOLEAN NOT NULL DEFAULT false,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "DatabaseSettings_databaseId_fkey" FOREIGN KEY ("databaseId") REFERENCES "Database" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Service" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"fqdn" TEXT,
"type" TEXT,
"version" TEXT,
"destinationDockerId" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Service_destinationDockerId_fkey" FOREIGN KEY ("destinationDockerId") REFERENCES "DestinationDocker" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "PlausibleAnalytics" (
"id" TEXT NOT NULL PRIMARY KEY,
"email" TEXT,
"username" TEXT,
"password" TEXT NOT NULL,
"postgresqlUser" TEXT NOT NULL,
"postgresqlPassword" TEXT NOT NULL,
"postgresqlDatabase" TEXT NOT NULL,
"postgresqlPublicPort" INTEGER,
"secretKeyBase" TEXT,
"serviceId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "PlausibleAnalytics_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Minio" (
"id" TEXT NOT NULL PRIMARY KEY,
"rootUser" TEXT NOT NULL,
"rootUserPassword" TEXT NOT NULL,
"publicPort" INTEGER,
"serviceId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Minio_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Vscodeserver" (
"id" TEXT NOT NULL PRIMARY KEY,
"password" TEXT NOT NULL,
"serviceId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Vscodeserver_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Wordpress" (
"id" TEXT NOT NULL PRIMARY KEY,
"extraConfig" TEXT,
"tablePrefix" TEXT,
"mysqlUser" TEXT NOT NULL,
"mysqlPassword" TEXT NOT NULL,
"mysqlRootUser" TEXT NOT NULL,
"mysqlRootUserPassword" TEXT NOT NULL,
"mysqlDatabase" TEXT,
"mysqlPublicPort" INTEGER,
"serviceId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Wordpress_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "_TeamToUser" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL,
FOREIGN KEY ("A") REFERENCES "Team" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY ("B") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "_ApplicationToTeam" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL,
FOREIGN KEY ("A") REFERENCES "Application" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY ("B") REFERENCES "Team" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "_GitSourceToTeam" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL,
FOREIGN KEY ("A") REFERENCES "GitSource" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY ("B") REFERENCES "Team" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "_GithubAppToTeam" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL,
FOREIGN KEY ("A") REFERENCES "GithubApp" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY ("B") REFERENCES "Team" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "_GitlabAppToTeam" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL,
FOREIGN KEY ("A") REFERENCES "GitlabApp" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY ("B") REFERENCES "Team" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "_DestinationDockerToTeam" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL,
FOREIGN KEY ("A") REFERENCES "DestinationDocker" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY ("B") REFERENCES "Team" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "_DatabaseToTeam" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL,
FOREIGN KEY ("A") REFERENCES "Database" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY ("B") REFERENCES "Team" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "_ServiceToTeam" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL,
FOREIGN KEY ("A") REFERENCES "Service" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY ("B") REFERENCES "Team" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "Setting_fqdn_key" ON "Setting"("fqdn");
-- CreateIndex
CREATE UNIQUE INDEX "User_id_key" ON "User"("id");
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
-- CreateIndex
CREATE UNIQUE INDEX "Application_fqdn_key" ON "Application"("fqdn");
-- CreateIndex
CREATE UNIQUE INDEX "ApplicationSettings_applicationId_key" ON "ApplicationSettings"("applicationId");
-- CreateIndex
CREATE UNIQUE INDEX "Secret_name_key" ON "Secret"("name");
-- CreateIndex
CREATE UNIQUE INDEX "DestinationDocker_network_key" ON "DestinationDocker"("network");
-- CreateIndex
CREATE UNIQUE INDEX "GitSource_githubAppId_key" ON "GitSource"("githubAppId");
-- CreateIndex
CREATE UNIQUE INDEX "GitSource_gitlabAppId_key" ON "GitSource"("gitlabAppId");
-- CreateIndex
CREATE UNIQUE INDEX "GithubApp_name_key" ON "GithubApp"("name");
-- CreateIndex
CREATE UNIQUE INDEX "GitlabApp_oauthId_key" ON "GitlabApp"("oauthId");
-- CreateIndex
CREATE UNIQUE INDEX "GitlabApp_groupName_key" ON "GitlabApp"("groupName");
-- CreateIndex
CREATE UNIQUE INDEX "DatabaseSettings_databaseId_key" ON "DatabaseSettings"("databaseId");
-- CreateIndex
CREATE UNIQUE INDEX "PlausibleAnalytics_serviceId_key" ON "PlausibleAnalytics"("serviceId");
-- CreateIndex
CREATE UNIQUE INDEX "Minio_serviceId_key" ON "Minio"("serviceId");
-- CreateIndex
CREATE UNIQUE INDEX "Vscodeserver_serviceId_key" ON "Vscodeserver"("serviceId");
-- CreateIndex
CREATE UNIQUE INDEX "Wordpress_serviceId_key" ON "Wordpress"("serviceId");
-- CreateIndex
CREATE UNIQUE INDEX "_TeamToUser_AB_unique" ON "_TeamToUser"("A", "B");
-- CreateIndex
CREATE INDEX "_TeamToUser_B_index" ON "_TeamToUser"("B");
-- CreateIndex
CREATE UNIQUE INDEX "_ApplicationToTeam_AB_unique" ON "_ApplicationToTeam"("A", "B");
-- CreateIndex
CREATE INDEX "_ApplicationToTeam_B_index" ON "_ApplicationToTeam"("B");
-- CreateIndex
CREATE UNIQUE INDEX "_GitSourceToTeam_AB_unique" ON "_GitSourceToTeam"("A", "B");
-- CreateIndex
CREATE INDEX "_GitSourceToTeam_B_index" ON "_GitSourceToTeam"("B");
-- CreateIndex
CREATE UNIQUE INDEX "_GithubAppToTeam_AB_unique" ON "_GithubAppToTeam"("A", "B");
-- CreateIndex
CREATE INDEX "_GithubAppToTeam_B_index" ON "_GithubAppToTeam"("B");
-- CreateIndex
CREATE UNIQUE INDEX "_GitlabAppToTeam_AB_unique" ON "_GitlabAppToTeam"("A", "B");
-- CreateIndex
CREATE INDEX "_GitlabAppToTeam_B_index" ON "_GitlabAppToTeam"("B");
-- CreateIndex
CREATE UNIQUE INDEX "_DestinationDockerToTeam_AB_unique" ON "_DestinationDockerToTeam"("A", "B");
-- CreateIndex
CREATE INDEX "_DestinationDockerToTeam_B_index" ON "_DestinationDockerToTeam"("B");
-- CreateIndex
CREATE UNIQUE INDEX "_DatabaseToTeam_AB_unique" ON "_DatabaseToTeam"("A", "B");
-- CreateIndex
CREATE INDEX "_DatabaseToTeam_B_index" ON "_DatabaseToTeam"("B");
-- CreateIndex
CREATE UNIQUE INDEX "_ServiceToTeam_AB_unique" ON "_ServiceToTeam"("A", "B");
-- CreateIndex
CREATE INDEX "_ServiceToTeam_B_index" ON "_ServiceToTeam"("B");

View File

@@ -0,0 +1,28 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Team" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"databaseId" TEXT,
"serviceId" TEXT
);
INSERT INTO "new_Team" ("createdAt", "databaseId", "id", "name", "serviceId", "updatedAt") SELECT "createdAt", "databaseId", "id", "name", "serviceId", "updatedAt" FROM "Team";
DROP TABLE "Team";
ALTER TABLE "new_Team" RENAME TO "Team";
CREATE TABLE "new_DatabaseSettings" (
"id" TEXT NOT NULL PRIMARY KEY,
"databaseId" TEXT NOT NULL,
"isPublic" BOOLEAN NOT NULL DEFAULT false,
"appendOnly" BOOLEAN NOT NULL DEFAULT true,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "DatabaseSettings_databaseId_fkey" FOREIGN KEY ("databaseId") REFERENCES "Database" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
INSERT INTO "new_DatabaseSettings" ("createdAt", "databaseId", "id", "isPublic", "updatedAt") SELECT "createdAt", "databaseId", "id", "isPublic", "updatedAt" FROM "DatabaseSettings";
DROP TABLE "DatabaseSettings";
ALTER TABLE "new_DatabaseSettings" RENAME TO "DatabaseSettings";
CREATE UNIQUE INDEX "DatabaseSettings_databaseId_key" ON "DatabaseSettings"("databaseId");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,11 @@
/*
Warnings:
- A unique constraint covering the columns `[name,applicationId]` on the table `Secret` will be added. If there are existing duplicate values, this will fail.
*/
-- DropIndex
DROP INDEX "Secret_name_key";
-- CreateIndex
CREATE UNIQUE INDEX "Secret_name_applicationId_key" ON "Secret"("name", "applicationId");

View File

@@ -0,0 +1,47 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Setting" (
"id" TEXT NOT NULL PRIMARY KEY,
"fqdn" TEXT,
"isRegistrationEnabled" BOOLEAN NOT NULL DEFAULT false,
"dualCerts" BOOLEAN NOT NULL DEFAULT false,
"proxyPassword" TEXT NOT NULL,
"proxyUser" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Setting" ("createdAt", "fqdn", "id", "isRegistrationEnabled", "proxyPassword", "proxyUser", "updatedAt") SELECT "createdAt", "fqdn", "id", "isRegistrationEnabled", "proxyPassword", "proxyUser", "updatedAt" FROM "Setting";
DROP TABLE "Setting";
ALTER TABLE "new_Setting" RENAME TO "Setting";
CREATE UNIQUE INDEX "Setting_fqdn_key" ON "Setting"("fqdn");
CREATE TABLE "new_ApplicationSettings" (
"id" TEXT NOT NULL PRIMARY KEY,
"applicationId" TEXT NOT NULL,
"dualCerts" BOOLEAN NOT NULL DEFAULT false,
"debug" BOOLEAN NOT NULL DEFAULT false,
"previews" BOOLEAN NOT NULL DEFAULT false,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "ApplicationSettings_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "Application" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
INSERT INTO "new_ApplicationSettings" ("applicationId", "createdAt", "debug", "id", "previews", "updatedAt") SELECT "applicationId", "createdAt", "debug", "id", "previews", "updatedAt" FROM "ApplicationSettings";
DROP TABLE "ApplicationSettings";
ALTER TABLE "new_ApplicationSettings" RENAME TO "ApplicationSettings";
CREATE UNIQUE INDEX "ApplicationSettings_applicationId_key" ON "ApplicationSettings"("applicationId");
CREATE TABLE "new_Service" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"fqdn" TEXT,
"dualCerts" BOOLEAN NOT NULL DEFAULT false,
"type" TEXT,
"version" TEXT,
"destinationDockerId" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Service_destinationDockerId_fkey" FOREIGN KEY ("destinationDockerId") REFERENCES "DestinationDocker" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);
INSERT INTO "new_Service" ("createdAt", "destinationDockerId", "fqdn", "id", "name", "type", "updatedAt", "version") SELECT "createdAt", "destinationDockerId", "fqdn", "id", "name", "type", "updatedAt", "version" FROM "Service";
DROP TABLE "Service";
ALTER TABLE "new_Service" RENAME TO "Service";
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,19 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Secret" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"value" TEXT NOT NULL,
"isPRMRSecret" BOOLEAN NOT NULL DEFAULT false,
"isBuildSecret" BOOLEAN NOT NULL DEFAULT false,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"applicationId" TEXT NOT NULL,
CONSTRAINT "Secret_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "Application" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
INSERT INTO "new_Secret" ("applicationId", "createdAt", "id", "isBuildSecret", "name", "updatedAt", "value") SELECT "applicationId", "createdAt", "id", "isBuildSecret", "name", "updatedAt", "value" FROM "Secret";
DROP TABLE "Secret";
ALTER TABLE "new_Secret" RENAME TO "Secret";
CREATE UNIQUE INDEX "Secret_name_applicationId_isPRMRSecret_key" ON "Secret"("name", "applicationId", "isPRMRSecret");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,20 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Setting" (
"id" TEXT NOT NULL PRIMARY KEY,
"fqdn" TEXT,
"isRegistrationEnabled" BOOLEAN NOT NULL DEFAULT false,
"dualCerts" BOOLEAN NOT NULL DEFAULT false,
"minPort" INTEGER NOT NULL DEFAULT 9000,
"maxPort" INTEGER NOT NULL DEFAULT 9100,
"proxyPassword" TEXT NOT NULL,
"proxyUser" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Setting" ("createdAt", "dualCerts", "fqdn", "id", "isRegistrationEnabled", "proxyPassword", "proxyUser", "updatedAt") SELECT "createdAt", "dualCerts", "fqdn", "id", "isRegistrationEnabled", "proxyPassword", "proxyUser", "updatedAt" FROM "Setting";
DROP TABLE "Setting";
ALTER TABLE "new_Setting" RENAME TO "Setting";
CREATE UNIQUE INDEX "Setting_fqdn_key" ON "Setting"("fqdn");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Setting" ADD COLUMN "proxyHash" TEXT;

View File

@@ -0,0 +1,13 @@
-- CreateTable
CREATE TABLE "ServiceSecret" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"value" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"serviceId" TEXT NOT NULL,
CONSTRAINT "ServiceSecret_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "ServiceSecret_name_serviceId_key" ON "ServiceSecret"("name", "serviceId");

View File

@@ -0,0 +1,19 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_ApplicationSettings" (
"id" TEXT NOT NULL PRIMARY KEY,
"applicationId" TEXT NOT NULL,
"dualCerts" BOOLEAN NOT NULL DEFAULT false,
"debug" BOOLEAN NOT NULL DEFAULT false,
"previews" BOOLEAN NOT NULL DEFAULT false,
"autodeploy" BOOLEAN NOT NULL DEFAULT true,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "ApplicationSettings_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "Application" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
INSERT INTO "new_ApplicationSettings" ("applicationId", "createdAt", "debug", "dualCerts", "id", "previews", "updatedAt") SELECT "applicationId", "createdAt", "debug", "dualCerts", "id", "previews", "updatedAt" FROM "ApplicationSettings";
DROP TABLE "ApplicationSettings";
ALTER TABLE "new_ApplicationSettings" RENAME TO "ApplicationSettings";
CREATE UNIQUE INDEX "ApplicationSettings_applicationId_key" ON "ApplicationSettings"("applicationId");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Application" ADD COLUMN "phpModules" TEXT;

View File

@@ -0,0 +1,18 @@
-- CreateTable
CREATE TABLE "ApplicationPersistentStorage" (
"id" TEXT NOT NULL PRIMARY KEY,
"applicationId" TEXT NOT NULL,
"path" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "ApplicationPersistentStorage_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "Application" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "ApplicationPersistentStorage_applicationId_key" ON "ApplicationPersistentStorage"("applicationId");
-- CreateIndex
CREATE UNIQUE INDEX "ApplicationPersistentStorage_path_key" ON "ApplicationPersistentStorage"("path");
-- CreateIndex
CREATE UNIQUE INDEX "ApplicationPersistentStorage_applicationId_path_key" ON "ApplicationPersistentStorage"("applicationId", "path");

View File

@@ -0,0 +1,19 @@
-- CreateTable
CREATE TABLE "Ghost" (
"id" TEXT NOT NULL PRIMARY KEY,
"defaultEmail" TEXT NOT NULL,
"defaultPassword" TEXT NOT NULL,
"mariadbUser" TEXT NOT NULL,
"mariadbPassword" TEXT NOT NULL,
"mariadbRootUser" TEXT NOT NULL,
"mariadbRootUserPassword" TEXT NOT NULL,
"mariadbDatabase" TEXT,
"mariadbPublicPort" INTEGER,
"serviceId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Ghost_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "Ghost_serviceId_key" ON "Ghost"("serviceId");

View File

@@ -0,0 +1,4 @@
-- AlterTable
ALTER TABLE "Application" ADD COLUMN "pythonModule" TEXT;
ALTER TABLE "Application" ADD COLUMN "pythonVariable" TEXT;
ALTER TABLE "Application" ADD COLUMN "pythonWSGI" TEXT;

View File

@@ -0,0 +1,12 @@
-- CreateTable
CREATE TABLE "MeiliSearch" (
"id" TEXT NOT NULL PRIMARY KEY,
"masterKey" TEXT NOT NULL,
"serviceId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "MeiliSearch_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "MeiliSearch_serviceId_key" ON "MeiliSearch"("serviceId");

View File

@@ -0,0 +1,29 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Wordpress" (
"id" TEXT NOT NULL PRIMARY KEY,
"extraConfig" TEXT,
"tablePrefix" TEXT,
"mysqlUser" TEXT NOT NULL,
"mysqlPassword" TEXT NOT NULL,
"mysqlRootUser" TEXT NOT NULL,
"mysqlRootUserPassword" TEXT NOT NULL,
"mysqlDatabase" TEXT,
"mysqlPublicPort" INTEGER,
"ftpEnabled" BOOLEAN NOT NULL DEFAULT false,
"ftpUser" TEXT,
"ftpPassword" TEXT,
"ftpPublicPort" INTEGER,
"ftpHostKey" TEXT,
"ftpHostKeyPrivate" TEXT,
"serviceId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Wordpress_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
INSERT INTO "new_Wordpress" ("createdAt", "extraConfig", "id", "mysqlDatabase", "mysqlPassword", "mysqlPublicPort", "mysqlRootUser", "mysqlRootUserPassword", "mysqlUser", "serviceId", "tablePrefix", "updatedAt") SELECT "createdAt", "extraConfig", "id", "mysqlDatabase", "mysqlPassword", "mysqlPublicPort", "mysqlRootUser", "mysqlRootUserPassword", "mysqlUser", "serviceId", "tablePrefix", "updatedAt" FROM "Wordpress";
DROP TABLE "Wordpress";
ALTER TABLE "new_Wordpress" RENAME TO "Wordpress";
CREATE UNIQUE INDEX "Wordpress_serviceId_key" ON "Wordpress"("serviceId");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,5 @@
-- DropIndex
DROP INDEX "ApplicationPersistentStorage_path_key";
-- DropIndex
DROP INDEX "ApplicationPersistentStorage_applicationId_key";

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Application" ADD COLUMN "exposePort" INTEGER;

View File

@@ -0,0 +1,12 @@
-- CreateTable
CREATE TABLE "ServicePersistentStorage" (
"id" TEXT NOT NULL PRIMARY KEY,
"serviceId" TEXT NOT NULL,
"path" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "ServicePersistentStorage_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "ServicePersistentStorage_serviceId_path_key" ON "ServicePersistentStorage"("serviceId", "path");

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Application" ADD COLUMN "dockerFileLocation" TEXT;

View File

@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "Application" ADD COLUMN "denoMainFile" TEXT;
ALTER TABLE "Application" ADD COLUMN "denoOptions" TEXT;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Build" ADD COLUMN "branch" TEXT;

View File

@@ -0,0 +1,17 @@
-- CreateTable
CREATE TABLE "Umami" (
"id" TEXT NOT NULL PRIMARY KEY,
"serviceId" TEXT NOT NULL,
"postgresqlUser" TEXT NOT NULL,
"postgresqlPassword" TEXT NOT NULL,
"postgresqlDatabase" TEXT NOT NULL,
"postgresqlPublicPort" INTEGER,
"umamiAdminPassword" TEXT NOT NULL,
"hashSalt" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Umami_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "Umami_serviceId_key" ON "Umami"("serviceId");

View File

@@ -0,0 +1,22 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Setting" (
"id" TEXT NOT NULL PRIMARY KEY,
"fqdn" TEXT,
"isRegistrationEnabled" BOOLEAN NOT NULL DEFAULT false,
"dualCerts" BOOLEAN NOT NULL DEFAULT false,
"minPort" INTEGER NOT NULL DEFAULT 9000,
"maxPort" INTEGER NOT NULL DEFAULT 9100,
"proxyPassword" TEXT NOT NULL,
"proxyUser" TEXT NOT NULL,
"proxyHash" TEXT,
"isAutoUpdateEnabled" BOOLEAN NOT NULL DEFAULT false,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Setting" ("createdAt", "dualCerts", "fqdn", "id", "isRegistrationEnabled", "maxPort", "minPort", "proxyHash", "proxyPassword", "proxyUser", "updatedAt") SELECT "createdAt", "dualCerts", "fqdn", "id", "isRegistrationEnabled", "maxPort", "minPort", "proxyHash", "proxyPassword", "proxyUser", "updatedAt" FROM "Setting";
DROP TABLE "Setting";
ALTER TABLE "new_Setting" RENAME TO "Setting";
CREATE UNIQUE INDEX "Setting_fqdn_key" ON "Setting"("fqdn");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "Application" ADD COLUMN "baseBuildImage" TEXT;
ALTER TABLE "Application" ADD COLUMN "baseImage" TEXT;

View File

@@ -0,0 +1,16 @@
-- CreateTable
CREATE TABLE "Hasura" (
"id" TEXT NOT NULL PRIMARY KEY,
"serviceId" TEXT NOT NULL,
"postgresqlUser" TEXT NOT NULL,
"postgresqlPassword" TEXT NOT NULL,
"postgresqlDatabase" TEXT NOT NULL,
"postgresqlPublicPort" INTEGER,
"graphQLAdminPassword" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Hasura_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "Hasura_serviceId_key" ON "Hasura"("serviceId");

View File

@@ -0,0 +1,25 @@
-- CreateTable
CREATE TABLE "Fider" (
"id" TEXT NOT NULL PRIMARY KEY,
"serviceId" TEXT NOT NULL,
"postgresqlUser" TEXT NOT NULL,
"postgresqlPassword" TEXT NOT NULL,
"postgresqlDatabase" TEXT NOT NULL,
"postgresqlPublicPort" INTEGER,
"jwtSecret" TEXT NOT NULL,
"emailNoreply" TEXT,
"emailMailgunApiKey" TEXT,
"emailMailgunDomain" TEXT,
"emailMailgunRegion" TEXT,
"emailSmtpHost" TEXT,
"emailSmtpPort" INTEGER,
"emailSmtpUser" TEXT,
"emailSmtpPassword" TEXT,
"emailSmtpEnableStartTls" BOOLEAN NOT NULL DEFAULT false,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Fider_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "Fider_serviceId_key" ON "Fider"("serviceId");

View File

@@ -0,0 +1,29 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Fider" (
"id" TEXT NOT NULL PRIMARY KEY,
"serviceId" TEXT NOT NULL,
"postgresqlUser" TEXT NOT NULL,
"postgresqlPassword" TEXT NOT NULL,
"postgresqlDatabase" TEXT NOT NULL,
"postgresqlPublicPort" INTEGER,
"jwtSecret" TEXT NOT NULL,
"emailNoreply" TEXT,
"emailMailgunApiKey" TEXT,
"emailMailgunDomain" TEXT,
"emailMailgunRegion" TEXT NOT NULL DEFAULT 'EU',
"emailSmtpHost" TEXT,
"emailSmtpPort" INTEGER,
"emailSmtpUser" TEXT,
"emailSmtpPassword" TEXT,
"emailSmtpEnableStartTls" BOOLEAN NOT NULL DEFAULT false,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Fider_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
INSERT INTO "new_Fider" ("createdAt", "emailMailgunApiKey", "emailMailgunDomain", "emailMailgunRegion", "emailNoreply", "emailSmtpEnableStartTls", "emailSmtpHost", "emailSmtpPassword", "emailSmtpPort", "emailSmtpUser", "id", "jwtSecret", "postgresqlDatabase", "postgresqlPassword", "postgresqlPublicPort", "postgresqlUser", "serviceId", "updatedAt") SELECT "createdAt", "emailMailgunApiKey", "emailMailgunDomain", coalesce("emailMailgunRegion", 'EU') AS "emailMailgunRegion", "emailNoreply", "emailSmtpEnableStartTls", "emailSmtpHost", "emailSmtpPassword", "emailSmtpPort", "emailSmtpUser", "id", "jwtSecret", "postgresqlDatabase", "postgresqlPassword", "postgresqlPublicPort", "postgresqlUser", "serviceId", "updatedAt" FROM "Fider";
DROP TABLE "Fider";
ALTER TABLE "new_Fider" RENAME TO "Fider";
CREATE UNIQUE INDEX "Fider_serviceId_key" ON "Fider"("serviceId");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,23 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Setting" (
"id" TEXT NOT NULL PRIMARY KEY,
"fqdn" TEXT,
"isRegistrationEnabled" BOOLEAN NOT NULL DEFAULT false,
"dualCerts" BOOLEAN NOT NULL DEFAULT false,
"minPort" INTEGER NOT NULL DEFAULT 9000,
"maxPort" INTEGER NOT NULL DEFAULT 9100,
"proxyPassword" TEXT NOT NULL,
"proxyUser" TEXT NOT NULL,
"proxyHash" TEXT,
"isAutoUpdateEnabled" BOOLEAN NOT NULL DEFAULT false,
"isDNSCheckEnabled" BOOLEAN NOT NULL DEFAULT true,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Setting" ("createdAt", "dualCerts", "fqdn", "id", "isAutoUpdateEnabled", "isRegistrationEnabled", "maxPort", "minPort", "proxyHash", "proxyPassword", "proxyUser", "updatedAt") SELECT "createdAt", "dualCerts", "fqdn", "id", "isAutoUpdateEnabled", "isRegistrationEnabled", "maxPort", "minPort", "proxyHash", "proxyPassword", "proxyUser", "updatedAt" FROM "Setting";
DROP TABLE "Setting";
ALTER TABLE "new_Setting" RENAME TO "Setting";
CREATE UNIQUE INDEX "Setting_fqdn_key" ON "Setting"("fqdn");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Service" ADD COLUMN "exposePort" INTEGER;

View File

@@ -0,0 +1,24 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_PlausibleAnalytics" (
"id" TEXT NOT NULL PRIMARY KEY,
"email" TEXT,
"username" TEXT,
"password" TEXT NOT NULL,
"postgresqlUser" TEXT NOT NULL,
"postgresqlPassword" TEXT NOT NULL,
"postgresqlDatabase" TEXT NOT NULL,
"postgresqlPublicPort" INTEGER,
"secretKeyBase" TEXT,
"scriptName" TEXT NOT NULL DEFAULT 'plausible.js',
"serviceId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "PlausibleAnalytics_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
INSERT INTO "new_PlausibleAnalytics" ("createdAt", "email", "id", "password", "postgresqlDatabase", "postgresqlPassword", "postgresqlPublicPort", "postgresqlUser", "secretKeyBase", "serviceId", "updatedAt", "username") SELECT "createdAt", "email", "id", "password", "postgresqlDatabase", "postgresqlPassword", "postgresqlPublicPort", "postgresqlUser", "secretKeyBase", "serviceId", "updatedAt", "username" FROM "PlausibleAnalytics";
DROP TABLE "PlausibleAnalytics";
ALTER TABLE "new_PlausibleAnalytics" RENAME TO "PlausibleAnalytics";
CREATE UNIQUE INDEX "PlausibleAnalytics_serviceId_key" ON "PlausibleAnalytics"("serviceId");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,32 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Wordpress" (
"id" TEXT NOT NULL PRIMARY KEY,
"extraConfig" TEXT,
"tablePrefix" TEXT,
"ownMysql" BOOLEAN NOT NULL DEFAULT false,
"mysqlHost" TEXT,
"mysqlPort" INTEGER,
"mysqlUser" TEXT NOT NULL,
"mysqlPassword" TEXT NOT NULL,
"mysqlRootUser" TEXT NOT NULL,
"mysqlRootUserPassword" TEXT NOT NULL,
"mysqlDatabase" TEXT,
"mysqlPublicPort" INTEGER,
"ftpEnabled" BOOLEAN NOT NULL DEFAULT false,
"ftpUser" TEXT,
"ftpPassword" TEXT,
"ftpPublicPort" INTEGER,
"ftpHostKey" TEXT,
"ftpHostKeyPrivate" TEXT,
"serviceId" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Wordpress_serviceId_fkey" FOREIGN KEY ("serviceId") REFERENCES "Service" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
INSERT INTO "new_Wordpress" ("createdAt", "extraConfig", "ftpEnabled", "ftpHostKey", "ftpHostKeyPrivate", "ftpPassword", "ftpPublicPort", "ftpUser", "id", "mysqlDatabase", "mysqlPassword", "mysqlPublicPort", "mysqlRootUser", "mysqlRootUserPassword", "mysqlUser", "serviceId", "tablePrefix", "updatedAt") SELECT "createdAt", "extraConfig", "ftpEnabled", "ftpHostKey", "ftpHostKeyPrivate", "ftpPassword", "ftpPublicPort", "ftpUser", "id", "mysqlDatabase", "mysqlPassword", "mysqlPublicPort", "mysqlRootUser", "mysqlRootUserPassword", "mysqlUser", "serviceId", "tablePrefix", "updatedAt" FROM "Wordpress";
DROP TABLE "Wordpress";
ALTER TABLE "new_Wordpress" RENAME TO "Wordpress";
CREATE UNIQUE INDEX "Wordpress_serviceId_key" ON "Wordpress"("serviceId");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,24 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Setting" (
"id" TEXT NOT NULL PRIMARY KEY,
"fqdn" TEXT,
"isRegistrationEnabled" BOOLEAN NOT NULL DEFAULT false,
"dualCerts" BOOLEAN NOT NULL DEFAULT false,
"minPort" INTEGER NOT NULL DEFAULT 9000,
"maxPort" INTEGER NOT NULL DEFAULT 9100,
"proxyPassword" TEXT NOT NULL,
"proxyUser" TEXT NOT NULL,
"proxyHash" TEXT,
"isAutoUpdateEnabled" BOOLEAN NOT NULL DEFAULT false,
"isDNSCheckEnabled" BOOLEAN NOT NULL DEFAULT true,
"isTraefikUsed" BOOLEAN NOT NULL DEFAULT true,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Setting" ("createdAt", "dualCerts", "fqdn", "id", "isAutoUpdateEnabled", "isDNSCheckEnabled", "isRegistrationEnabled", "maxPort", "minPort", "proxyHash", "proxyPassword", "proxyUser", "updatedAt") SELECT "createdAt", "dualCerts", "fqdn", "id", "isAutoUpdateEnabled", "isDNSCheckEnabled", "isRegistrationEnabled", "maxPort", "minPort", "proxyHash", "proxyPassword", "proxyUser", "updatedAt" FROM "Setting";
DROP TABLE "Setting";
ALTER TABLE "new_Setting" RENAME TO "Setting";
CREATE UNIQUE INDEX "Setting_fqdn_key" ON "Setting"("fqdn");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Minio" ADD COLUMN "apiFqdn" TEXT;

View File

@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "sqlite"

View File

@@ -0,0 +1,451 @@
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl"]
}
datasource db {
provider = "sqlite"
url = env("COOLIFY_DATABASE_URL")
}
model Setting {
id String @id @default(cuid())
fqdn String? @unique
isRegistrationEnabled Boolean @default(false)
dualCerts Boolean @default(false)
minPort Int @default(9000)
maxPort Int @default(9100)
proxyPassword String
proxyUser String
proxyHash String?
isAutoUpdateEnabled Boolean @default(false)
isDNSCheckEnabled Boolean @default(true)
isTraefikUsed Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model User {
id String @id @unique @default(cuid())
email String @unique
type String
password String?
teams Team[]
permission Permission[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Permission {
id String @id @default(cuid())
user User @relation(fields: [userId], references: [id])
userId String
team Team @relation(fields: [teamId], references: [id])
teamId String
permission String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Team {
id String @id @default(cuid())
users User[]
name String?
applications Application[]
gitSources GitSource[]
gitHubApps GithubApp[]
gitLabApps GitlabApp[]
destinationDocker DestinationDocker[]
permissions Permission[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
database Database[] @relation(references: [id])
databaseId String?
service Service[] @relation(references: [id])
serviceId String?
}
model TeamInvitation {
id String @id @default(cuid())
uid String
email String
teamId String
teamName String
permission String
createdAt DateTime @default(now())
}
model Application {
id String @id @default(cuid())
name String
fqdn String? @unique
repository String?
configHash String?
branch String?
buildPack String?
projectId Int?
port Int?
exposePort Int?
installCommand String?
buildCommand String?
startCommand String?
baseDirectory String?
publishDirectory String?
phpModules String?
pythonWSGI String?
pythonModule String?
pythonVariable String?
dockerFileLocation String?
denoMainFile String?
denoOptions String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
settings ApplicationSettings?
teams Team[]
destinationDockerId String?
destinationDocker DestinationDocker? @relation(fields: [destinationDockerId], references: [id])
gitSourceId String?
gitSource GitSource? @relation(fields: [gitSourceId], references: [id])
secrets Secret[]
persistentStorage ApplicationPersistentStorage[]
baseImage String?
baseBuildImage String?
}
model ApplicationSettings {
id String @id @default(cuid())
application Application @relation(fields: [applicationId], references: [id])
applicationId String @unique
dualCerts Boolean @default(false)
debug Boolean @default(false)
previews Boolean @default(false)
autodeploy Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model ApplicationPersistentStorage {
id String @id @default(cuid())
application Application @relation(fields: [applicationId], references: [id])
applicationId String
path String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([applicationId, path])
}
model ServicePersistentStorage {
id String @id @default(cuid())
service Service @relation(fields: [serviceId], references: [id])
serviceId String
path String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([serviceId, path])
}
model Secret {
id String @id @default(cuid())
name String
value String
isPRMRSecret Boolean @default(false)
isBuildSecret Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
application Application @relation(fields: [applicationId], references: [id])
applicationId String
@@unique([name, applicationId, isPRMRSecret])
}
model ServiceSecret {
id String @id @default(cuid())
name String
value String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
service Service @relation(fields: [serviceId], references: [id])
serviceId String
@@unique([name, serviceId])
}
model BuildLog {
id String @id @default(cuid())
applicationId String?
buildId String
line String
time Int
}
model Build {
id String @id @default(cuid())
type String
applicationId String?
destinationDockerId String?
gitSourceId String?
githubAppId String?
gitlabAppId String?
commit String?
branch String?
status String? @default("queued")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model DestinationDocker {
id String @id @default(cuid())
network String @unique
name String
engine String
remoteEngine Boolean @default(false)
isCoolifyProxyUsed Boolean? @default(false)
teams Team[]
application Application[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
database Database[]
service Service[]
}
model GitSource {
id String @id @default(cuid())
name String
teams Team[]
type String?
apiUrl String?
htmlUrl String?
organization String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
githubAppId String? @unique
githubApp GithubApp? @relation(fields: [githubAppId], references: [id])
application Application[]
gitlabAppId String? @unique
gitlabApp GitlabApp? @relation(fields: [gitlabAppId], references: [id])
}
model GithubApp {
id String @id @default(cuid())
name String? @unique
teams Team[]
appId Int?
installationId Int?
clientId String?
clientSecret String?
webhookSecret String?
privateKey String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
gitSource GitSource?
}
model GitlabApp {
id String @id @default(cuid())
oauthId Int @unique
groupName String? @unique
teams Team[]
deployKeyId Int?
privateSshKey String?
publicSshKey String?
webhookToken String?
appId String?
appSecret String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
gitSource GitSource?
}
model Database {
id String @id @default(cuid())
name String
publicPort Int?
defaultDatabase String?
type String?
version String?
dbUser String?
dbUserPassword String?
rootUser String?
rootUserPassword String?
settings DatabaseSettings?
destinationDocker DestinationDocker? @relation(fields: [destinationDockerId], references: [id])
destinationDockerId String?
teams Team[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model DatabaseSettings {
id String @id @default(cuid())
database Database @relation(fields: [databaseId], references: [id])
databaseId String @unique
isPublic Boolean @default(false)
appendOnly Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Service {
id String @id @default(cuid())
name String
fqdn String?
exposePort Int?
dualCerts Boolean @default(false)
type String?
version String?
teams Team[]
destinationDockerId String?
destinationDocker DestinationDocker? @relation(fields: [destinationDockerId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
plausibleAnalytics PlausibleAnalytics?
minio Minio?
vscodeserver Vscodeserver?
wordpress Wordpress?
ghost Ghost?
serviceSecret ServiceSecret[]
meiliSearch MeiliSearch?
persistentStorage ServicePersistentStorage[]
umami Umami?
hasura Hasura?
fider Fider?
}
model PlausibleAnalytics {
id String @id @default(cuid())
email String?
username String?
password String
postgresqlUser String
postgresqlPassword String
postgresqlDatabase String
postgresqlPublicPort Int?
secretKeyBase String?
scriptName String @default("plausible.js")
serviceId String @unique
service Service @relation(fields: [serviceId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Minio {
id String @id @default(cuid())
rootUser String
rootUserPassword String
publicPort Int?
apiFqdn String?
serviceId String @unique
service Service @relation(fields: [serviceId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Vscodeserver {
id String @id @default(cuid())
password String
serviceId String @unique
service Service @relation(fields: [serviceId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Wordpress {
id String @id @default(cuid())
extraConfig String?
tablePrefix String?
ownMysql Boolean @default(false)
mysqlHost String?
mysqlPort Int?
mysqlUser String
mysqlPassword String
mysqlRootUser String
mysqlRootUserPassword String
mysqlDatabase String?
mysqlPublicPort Int?
ftpEnabled Boolean @default(false)
ftpUser String?
ftpPassword String?
ftpPublicPort Int?
ftpHostKey String?
ftpHostKeyPrivate String?
serviceId String @unique
service Service @relation(fields: [serviceId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Ghost {
id String @id @default(cuid())
defaultEmail String
defaultPassword String
mariadbUser String
mariadbPassword String
mariadbRootUser String
mariadbRootUserPassword String
mariadbDatabase String?
mariadbPublicPort Int?
serviceId String @unique
service Service @relation(fields: [serviceId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model MeiliSearch {
id String @id @default(cuid())
masterKey String
serviceId String @unique
service Service @relation(fields: [serviceId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Umami {
id String @id @default(cuid())
serviceId String @unique
postgresqlUser String
postgresqlPassword String
postgresqlDatabase String
postgresqlPublicPort Int?
umamiAdminPassword String
hashSalt String
service Service @relation(fields: [serviceId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Hasura {
id String @id @default(cuid())
serviceId String @unique
postgresqlUser String
postgresqlPassword String
postgresqlDatabase String
postgresqlPublicPort Int?
graphQLAdminPassword String
service Service @relation(fields: [serviceId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Fider {
id String @id @default(cuid())
serviceId String @unique
postgresqlUser String
postgresqlPassword String
postgresqlDatabase String
postgresqlPublicPort Int?
jwtSecret String
emailNoreply String?
emailMailgunApiKey String?
emailMailgunDomain String?
emailMailgunRegion String @default("EU")
emailSmtpHost String?
emailSmtpPort Int?
emailSmtpUser String?
emailSmtpPassword String?
emailSmtpEnableStartTls Boolean @default(false)
service Service @relation(fields: [serviceId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}

88
apps/api/prisma/seed.js Normal file
View File

@@ -0,0 +1,88 @@
const dotEnvExtended = require('dotenv-extended');
dotEnvExtended.load();
const crypto = require('crypto');
const generator = require('generate-password');
const cuid = require('cuid');
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
function generatePassword(length = 24) {
return generator.generate({
length,
numbers: true,
strict: true
});
}
const algorithm = 'aes-256-ctr';
async function main() {
// Enable registration for the first user
// Set initial HAProxy password
const settingsFound = await prisma.setting.findFirst({});
if (!settingsFound) {
await prisma.setting.create({
data: {
isRegistrationEnabled: true,
proxyPassword: encrypt(generatePassword()),
proxyUser: cuid()
}
});
} else {
await prisma.setting.update({
where: {
id: settingsFound.id
},
data: {
isTraefikUsed: true,
proxyHash: null
}
});
}
const localDocker = await prisma.destinationDocker.findFirst({
where: { engine: '/var/run/docker.sock' }
});
if (!localDocker) {
await prisma.destinationDocker.create({
data: {
engine: '/var/run/docker.sock',
name: 'Local Docker',
isCoolifyProxyUsed: true,
network: 'coolify'
}
});
}
// Set auto-update based on env variable
const isAutoUpdateEnabled = process.env['COOLIFY_AUTO_UPDATE'] === 'true';
const settings = await prisma.setting.findFirst({});
if (settings) {
await prisma.setting.update({
where: {
id: settings.id
},
data: {
isAutoUpdateEnabled
}
});
}
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});
const encrypt = (text) => {
if (text) {
const iv = crypto.randomBytes(16);
const cipher = crypto.createCipheriv(algorithm, process.env['COOLIFY_SECRET_KEY'], iv);
const encrypted = Buffer.concat([cipher.update(text), cipher.final()]);
return JSON.stringify({
iv: iv.toString('hex'),
content: encrypted.toString('hex')
});
}
};

132
apps/api/src/index.ts Normal file
View File

@@ -0,0 +1,132 @@
import Fastify from 'fastify';
import cors from '@fastify/cors';
import serve from '@fastify/static';
import env from '@fastify/env';
import cookie from '@fastify/cookie';
import path, { join } from 'path';
import autoLoad from '@fastify/autoload';
import { asyncExecShell, isDev, prisma } from './lib/common';
import { scheduler } from './lib/scheduler';
declare module 'fastify' {
interface FastifyInstance {
config: {
COOLIFY_APP_ID: string,
COOLIFY_SECRET_KEY: string,
COOLIFY_DATABASE_URL: string,
COOLIFY_SENTRY_DSN: string,
COOLIFY_IS_ON: string,
COOLIFY_WHITE_LABELED: boolean,
COOLIFY_WHITE_LABELED_ICON: string | null,
COOLIFY_AUTO_UPDATE: boolean,
};
}
}
const port = isDev ? 3001 : 3000;
const host = '0.0.0.0';
const fastify = Fastify({
logger: false
});
const schema = {
type: 'object',
required: ['COOLIFY_SECRET_KEY', 'COOLIFY_DATABASE_URL', 'COOLIFY_IS_ON'],
properties: {
COOLIFY_APP_ID: {
type: 'string',
},
COOLIFY_SECRET_KEY: {
type: 'string',
},
COOLIFY_DATABASE_URL: {
type: 'string',
default: 'file:../db/dev.db'
},
COOLIFY_SENTRY_DSN: {
type: 'string',
default: null
},
COOLIFY_IS_ON: {
type: 'string',
default: 'docker'
},
COOLIFY_WHITE_LABELED: {
type: 'boolean',
default: false
},
COOLIFY_WHITE_LABELED_ICON: {
type: 'string',
default: null
},
COOLIFY_AUTO_UPDATE: {
type: 'boolean',
default: false
},
}
};
const options = {
schema
};
fastify.register(env, options);
if (!isDev) {
fastify.register(serve, {
root: path.join(__dirname, './public'),
preCompressed: true
});
fastify.setNotFoundHandler(function (request, reply) {
if (request.raw.url && request.raw.url.startsWith('/api')) {
return reply.status(404).send({
success: false
});
}
return reply.status(200).sendFile('index.html');
});
}
fastify.register(autoLoad, {
dir: join(__dirname, 'plugins')
});
fastify.register(autoLoad, {
dir: join(__dirname, 'routes')
});
fastify.register(cookie)
fastify.register(cors);
fastify.listen({ port, host }, async (err: any, address: any) => {
if (err) {
console.error(err);
process.exit(1);
}
console.log(`Coolify's API is listening on ${host}:${port}`);
await initServer()
await scheduler.start('deployApplication');
await scheduler.start('cleanupStorage');
await scheduler.start('checkProxies')
// Check if no build is running, try to autoupdate.
setInterval(async () => {
const { isAutoUpdateEnabled } = await prisma.setting.findFirst();
if (isAutoUpdateEnabled) {
if (scheduler.workers.has('deployApplication')) {
scheduler.workers.get('deployApplication').postMessage("status");
}
}
}, 30000 * 10)
scheduler.on('worker deleted', async (name) => {
if (name === 'autoUpdater') {
await scheduler.start('deployApplication');
}
});
});
async function initServer() {
try {
await asyncExecShell(`docker network create --attachable coolify`);
} catch (error) { }
}

Some files were not shown because too many files have changed in this diff Show More