Compare commits

..

225 Commits

Author SHA1 Message Date
Mauricio Siu
572579af91 Merge pull request #785 from Dokploy/canary
v0.13.1
2024-11-28 23:44:33 -06:00
Mauricio Siu
63998f71ec chore: bump version 2024-11-28 23:37:35 -06:00
Mauricio Siu
45fd2d149c Merge pull request #784 from Dokploy/754-dokploy-ui-duplicate-deployments
fix: add missing server flag boolean
2024-11-28 23:35:53 -06:00
Mauricio Siu
9a35c85277 refactor: upgrade biome 2024-11-28 23:29:24 -06:00
Mauricio Siu
0cf21cf3f7 refactor: add missing flag 2024-11-28 23:20:50 -06:00
Mauricio Siu
7400913646 fix: add missing server flag boolean 2024-11-28 23:19:27 -06:00
Mauricio Siu
e78d354d0d fix: add missing server flag boolean 2024-11-28 23:17:21 -06:00
Mauricio Siu
bec3ad6bb5 Merge pull request #783 from Dokploy/725-the-logo-does-not-appear-on-the-notification-email
fix: update img url
2024-11-28 22:57:10 -06:00
Mauricio Siu
5846e429e5 Merge pull request #782 from Dokploy/733-project-env-ux-improvements
refactor: apply suggested changes
2024-11-28 22:56:58 -06:00
Mauricio Siu
0f7652d02c fix: update img url 2024-11-28 22:56:31 -06:00
Mauricio Siu
fef19056fa Merge pull request #781 from Dokploy/remove-husky
Remove husky
2024-11-28 22:49:45 -06:00
Mauricio Siu
b07d9939a6 refactor: apply suggested changes 2024-11-28 22:49:35 -06:00
Mauricio Siu
301e3480e4 test: add missing prop 2024-11-28 22:33:18 -06:00
Mauricio Siu
976ac053f7 fix: linter 2024-11-28 22:32:37 -06:00
Mauricio Siu
f102bae5d5 refactor: remove biome ci 2024-11-28 22:21:31 -06:00
Mauricio Siu
00883dde11 refactor: remove husky 2024-11-28 22:14:01 -06:00
Mauricio Siu
e194f3c454 chore: add lefthook 2024-11-28 22:09:42 -06:00
Mauricio Siu
cdd39670f5 Merge pull request #780 from Dokploy/766-registry-with-ghcrio-failed-error-500
fix: add registry url and use spawnAsync
2024-11-28 22:02:58 -06:00
Mauricio Siu
88f7cf2546 fix: add registry url and use spawnAsync 2024-11-28 21:54:20 -06:00
Mauricio Siu
34ea7ad8c9 Merge pull request #779 from Dokploy/678-requests-made-to-stripe
fix: prevent to load stripe code when is not cloud
2024-11-28 20:57:20 -06:00
Mauricio Siu
081a2d8f69 fix: prevent to load stripe code when is not cloud 2024-11-28 20:56:35 -06:00
Mauricio Siu
a6368ee0b8 Merge pull request #771 from faeztgh/fa-locale
feat: add fa locale
2024-11-28 20:45:40 -06:00
Mauricio Siu
4132f714ae Merge branch 'canary' into fa-locale 2024-11-28 20:45:24 -06:00
Mauricio Siu
333776a5a1 Merge pull request #775 from 190km/i18n-french
feat(i18n): add french language support
2024-11-28 20:41:16 -06:00
Mauricio Siu
5853117e5f Merge branch 'canary' into i18n-french 2024-11-28 20:39:25 -06:00
Mauricio Siu
9e0e3540f5 Merge pull request #776 from 190km/status-tooltip-colors
fix: Add green color for done status tooltip, and lightens destructive colors
2024-11-28 20:37:05 -06:00
Mauricio Siu
7bd6e7fd9a Merge pull request #777 from 190km/delete-app-input-validation
feat: Add an input box to enter the project name for a second confirmation when deleting the application.
2024-11-28 20:36:40 -06:00
Mauricio Siu
95ab6af3ac Merge pull request #773 from edereagzi/feature/add-turkish-localization
feat(i18n): add turkish(tr) localization support
2024-11-28 20:28:03 -06:00
Mauricio Siu
69876029b1 Merge pull request #767 from chuyun/canary
feat: add optional Provider attribute to S3 Destinations
2024-11-28 20:20:57 -06:00
190km
d4fdf881cd feat: validating app name before delete 2024-11-29 02:06:25 +01:00
usopp
3b14ebcaa4 Delete et --soft HEAD~1 2024-11-28 22:14:13 +01:00
190km
22b8fa2c00 fix: added green color for done status tooltip, and lightens destructive color 2024-11-28 22:02:49 +01:00
usopp
714865730f feat(i18n): add french language support 2024-11-28 17:17:00 +01:00
Eray Dereağzı
7469c30992 feat(i18n): add turkish(tr) localization support 2024-11-28 13:38:40 +03:00
Mauricio Siu
b296b6bbf0 Merge pull request #772 from Dokploy/canary
v0.13.0
2024-11-27 23:28:40 -06:00
Mauricio Siu
37fa139a65 refactor: bump to 0.13.0 2024-11-27 23:20:32 -06:00
Mauricio Siu
a1cf597c2b Update package.json 2024-11-27 23:15:19 -06:00
F43Z
c8e9d9d169 feat: add fa locale 2024-11-27 23:40:42 +03:30
Mauricio Siu
d01928a878 refactor: add required 2024-11-27 02:38:54 -06:00
Mauricio Siu
30c19c5698 chore: update templates 2024-11-27 02:37:02 -06:00
Mauricio Siu
01dfa7feaf Merge pull request #768 from DanielGietmann/canary
feat: photoprism template
2024-11-26 22:30:27 -06:00
Mauricio Siu
58e6462ff1 Merge branch 'canary' into canary 2024-11-26 22:30:17 -06:00
Mauricio Siu
d18876d4fb Merge pull request #760 from henriklovhaug/canary
feat: add ontime template
2024-11-26 22:26:04 -06:00
Mauricio Siu
492c912c61 Update apps/dokploy/templates/ontime/docker-compose.yml 2024-11-26 22:25:58 -06:00
Mauricio Siu
6a283c8ee2 Merge pull request #759 from sao-coding/sao-coding/i18n-zh-Hant-TW
feat(i18n): add Traditional Chinese language support
2024-11-26 22:22:13 -06:00
Mauricio Siu
59dfdd6192 Merge pull request #761 from DerKorb/patch-1
fix compose.create not returning result
2024-11-26 22:21:58 -06:00
Mauricio Siu
3c072d7aa8 Merge pull request #746 from DrMxrcy/refactor/multiple-template-names
fix(templates): Multiple Templates Naming Schema
2024-11-26 22:21:47 -06:00
Daniel Gietmann
19d897f3ad added template 2024-11-27 03:44:18 +01:00
chuyun
0477329db7 feat: add optional Provider attribute to S3 Destinations 2024-11-27 02:14:45 +08:00
Mauricio Siu
fabe946526 Merge pull request #765 from airyland/patch-1
fix: improve English grammar in version check notice
2024-11-25 22:52:26 -06:00
Airyland
daa0c9d5d4 fix: improve English grammar in version check notice 2024-11-26 11:57:38 +08:00
ksollner
afe9b3c113 fix compose.create not returning result
when calling the compose create api, a empty result was returned
2024-11-25 14:42:05 +01:00
Henrik Tøn Løvhaug
cbfd09786a feat: add ontime template 2024-11-25 13:07:20 +01:00
sao-coding
54eb5544ac feat(i18n): add Traditional Chinese language support 2024-11-25 02:35:24 +00:00
Mauricio Siu
ac33b6b6a1 Merge pull request #739 from DrMxrcy/template/discourse
feat(add): Discourse
2024-11-22 00:46:14 -06:00
Mauricio Siu
653b1972ca Merge branch 'canary' into template/discourse 2024-11-22 00:46:01 -06:00
Mauricio Siu
7d7eb6a7a2 Merge pull request #743 from jujur10/canary
fix: stirling docker compose
2024-11-22 00:38:19 -06:00
Mauricio Siu
fab7e138b7 Merge pull request #744 from DrMxrcy/template/immich
feat(add): Immich
2024-11-22 00:36:17 -06:00
Mauricio Siu
62b635b2f0 Merge branch 'canary' into template/immich 2024-11-22 00:36:09 -06:00
Mauricio Siu
2dd352ee76 Merge pull request #740 from DrMxrcy/template/twenty
feat(add): Twenty CRM
2024-11-22 00:31:34 -06:00
Mauricio Siu
422b6eea82 Merge branch 'canary' into template/twenty 2024-11-22 00:31:25 -06:00
Mauricio Siu
4850305fb6 Merge pull request #736 from DrMxrcy/feat/YOURLS
feat(add): YOURLS Template
2024-11-22 00:25:02 -06:00
Mauricio Siu
97779f5686 Merge branch 'canary' into feat/YOURLS 2024-11-22 00:24:53 -06:00
DrMxrcy
d4b8985d71 fix(template): Twenty DB 2024-11-21 10:18:38 -05:00
Julien ROIRON
d5686063e0 fix: stirling docker compose 2024-11-21 08:16:09 +01:00
DrMxrcy
62ca8eec53 fix(templates): DiscordTickets Naming 2024-11-21 01:57:27 -05:00
DrMxrcy
204143648d fix(template): Slash Naming Schema 2024-11-21 01:56:22 -05:00
DrMxrcy
be8bd78bcc fix(template): Postiz Template 2024-11-21 01:55:40 -05:00
DrMxrcy
9003e43702 fix(template): InvoiceShelf Naming 2024-11-21 01:54:15 -05:00
DrMxrcy
55ac24ee8e fix(template): Windmill Naming 2024-11-21 01:53:36 -05:00
DrMxrcy
f3be56234b fix(template): Peppermint Naming 2024-11-21 01:52:39 -05:00
DrMxrcy
fd59beaff1 fix(add): ENV 2024-11-21 01:48:49 -05:00
Mauricio Siu
4a70d60aed Merge pull request #735 from mezotv/i18n-german
feat(i18n): add german language support
2024-11-21 00:31:45 -06:00
Mauricio Siu
f7533c88f6 Merge pull request #737 from DrMxrcy/template/ryot
feat(add): Ryot Template
2024-11-21 00:01:50 -06:00
DrMxrcy
ea8cae7815 feat(add): Immich 2024-11-20 22:20:58 -05:00
DrMxrcy
e9956a66da fix(add): template.ts 2024-11-20 11:18:33 -05:00
DrMxrcy
2eeb4017ac feat(add): Twenty CRM 2024-11-20 11:12:31 -05:00
DrMxrcy
28f0c9f162 feat(add): Discourse 2024-11-20 10:43:11 -05:00
DrMxrcy
4967d3bb31 feat(add): Ryot Logo 2024-11-20 10:09:05 -05:00
DrMxrcy
238fa5d02d feat(add): Ryot 2024-11-20 10:08:05 -05:00
DrMxrcy
d1436c992e feat(fix): Define Version 2024-11-20 09:56:40 -05:00
DrMxrcy
0654804821 feat(fix): YOURLS lint 2024-11-20 09:52:35 -05:00
DrMxrcy
c0876044b0 feat(add): YOURLS Template 2024-11-20 09:43:32 -05:00
Dominik Koch
6dff11af22 fix: formatting again 2024-11-20 11:35:57 +00:00
Dominik Koch
6d674a4c6b fix: code format 2024-11-20 11:34:13 +00:00
Dominik Koch
96b2579d69 feat(i18n): add german language support 2024-11-20 11:30:59 +00:00
Mauricio Siu
0708fa05b6 Merge pull request #721 from PaiJi/feat/add-gravatar-support
feat(Profile): support use Gravatar as avatar
2024-11-19 20:29:18 -06:00
Mauricio Siu
597842a99f Merge pull request #724 from iMuFeng/canary
feat: add HeyForm template
2024-11-19 20:26:47 -06:00
Mauricio Siu
105cf1014f Update templates.ts 2024-11-19 20:26:26 -06:00
Mauricio Siu
b93f36ae77 Merge branch 'canary' into canary 2024-11-19 20:24:40 -06:00
Mauricio Siu
bebb4b973c Update apps/dokploy/templates/heyform/index.ts 2024-11-19 20:23:43 -06:00
Mauricio Siu
f790530d4d Update apps/dokploy/templates/heyform/docker-compose.yml 2024-11-19 20:23:39 -06:00
Mauricio Siu
b7374549b8 Merge pull request #731 from DrMxrcy/feat/chatwoot-template
Add: Chatwoot Template
2024-11-19 20:19:11 -06:00
Mauricio Siu
366e881d72 Merge pull request #723 from WoWnik/canary
feat: add russian translation init
2024-11-19 20:12:14 -06:00
WoWnik
c2125d82b1 refactor: remove "ё" letter 2024-11-20 00:00:34 +03:00
DrMxrcy
32b3a76457 fix: Lint Issues 2024-11-19 12:30:36 -05:00
DrMxrcy
5cbdc8fad9 Fix: Linting issues 2024-11-19 11:56:23 -05:00
DrMxrcy
3698e8a827 Fix Chatwoot Schema 2024-11-19 11:19:33 -05:00
WoWnik
a83b62f62b refactor: sort alphabetically 2024-11-19 18:53:52 +03:00
DrMxrcy
ac033cea22 Add: Chatwoot 2024-11-19 03:06:54 -05:00
Mauricio Siu
58814239d9 Merge pull request #722 from henriklovhaug/canary
fix: postiz template pointing to wrong TLD
2024-11-18 08:57:54 -06:00
JiPai
6fc1ce2fbc chore(README): fix broken video thumbnail 2024-11-18 22:25:56 +08:00
mufeng
adde8126ab feat: add HeyForm template 2024-11-18 17:56:02 +08:00
WoWnik
cda66606ec feat: add russian translation init 2024-11-18 11:48:38 +03:00
Henrik Tøn Løvhaug
28f2c1a3c0 fix: template pointing to wrong TLD 2024-11-18 09:03:48 +01:00
JiPai
1c5fe8a283 feat(Profile): support use Gravatar as avatar 2024-11-18 14:09:42 +08:00
Mauricio Siu
da005bc511 chore: add startupfa.me sponsor 2024-11-17 22:25:03 -06:00
Mauricio Siu
5c8721406a Merge pull request #720 from Dokploy/canary
v0.12.0
2024-11-17 22:07:33 -06:00
Mauricio Siu
5db5336ec8 Merge pull request #716 from PaiJi/fix/storage-locale-setting-in-localstorage
fix(i18n): quick fix for locale cookie expire when browser close
2024-11-17 21:41:06 -06:00
Mauricio Siu
a6e7edd4d9 refactor: update share to project 2024-11-17 21:39:02 -06:00
Mauricio Siu
ddbb414225 chore(version): bump version 2024-11-17 18:53:52 -06:00
Mauricio Siu
b73889dd4f Merge pull request #719 from Dokploy/443-implement-coolifyio-like-support-of-envs-and-railwayapp-envs-shared-project-service-env
feat: add shared enviroment variables
2024-11-17 18:40:15 -06:00
Mauricio Siu
ce2dce3401 refactor: update shared to project 2024-11-17 18:33:14 -06:00
Mauricio Siu
173110a415 Merge pull request #714 from kdurek/feat/server-ip
feat: add update server ip
2024-11-17 18:28:29 -06:00
Mauricio Siu
2307346ae3 refactor: add validation to prevent run on cloud 2024-11-17 18:23:27 -06:00
Mauricio Siu
2f175f0e44 refactor: add missing types 2024-11-17 16:18:48 -06:00
Mauricio Siu
7003fe77c9 feat: add shared enviroment variables 2024-11-17 16:13:07 -06:00
Krzysztof Durek
04235fb6c9 Merge branch 'canary' of https://github.com/kdurek/dokploy into feat/server-ip 2024-11-17 22:08:00 +01:00
Krzysztof Durek
f138b0917f feat: add Polish language support to appearance settings and locale configuration 2024-11-17 22:05:52 +01:00
Krzysztof Durek
82367213ea feat: add ability for setting current public IP in server IP update form 2024-11-17 21:58:37 +01:00
Mauricio Siu
3c490ba2d0 Merge pull request #717 from Dokploy/712-redirect-feature-not-working
fix(dokploy): remove $ on presets redirect
2024-11-17 13:47:46 -06:00
Mauricio Siu
4bf5e5ca06 fix(dokploy): remove $ on presets redirect 2024-11-17 13:38:20 -06:00
JiPai
6af5742702 fix(i18n): quick fix for locale cookie expire when browser close 2024-11-18 03:37:26 +08:00
Krzysztof Durek
3015d69adc feat: add polish translation 2024-11-17 18:52:22 +01:00
Mauricio Siu
f7fa8e74af Merge pull request #713 from Dokploy/fix/build-i18n
refactor(dokploy): add missing next-18next to dockerfile
2024-11-17 11:50:12 -06:00
Krzysztof Durek
2835c997e9 feat: update to use multi language 2024-11-17 18:44:05 +01:00
Krzysztof Durek
bd55e3751f Merge branch 'canary' of https://github.com/kdurek/dokploy into feat/server-ip 2024-11-17 18:37:28 +01:00
Krzysztof Durek
74374bd643 feat: add update server ip 2024-11-17 18:18:00 +01:00
Mauricio Siu
4e929c12f2 chore: add missing next config to dockerfile 2024-11-17 11:13:55 -06:00
Mauricio Siu
56ea356723 refactor(dokploy): update i18next build 2024-11-17 11:04:15 -06:00
Mauricio Siu
b1f7d05743 Merge branch 'canary' into fix/build-i18n 2024-11-17 10:53:42 -06:00
Mauricio Siu
58338380ab Merge pull request #691 from DrMxrcy/feat/new-templates
feat: New Templates
2024-11-17 10:51:26 -06:00
Mauricio Siu
2487e3e062 Merge branch 'canary' into feat/new-templates 2024-11-17 10:51:17 -06:00
DrMxrcy
01a882497f Add: Discord Tickets Logo 2024-11-17 11:47:05 -05:00
Mauricio Siu
036313e3c3 chore: update dockerfile 2024-11-17 10:45:05 -06:00
Mauricio Siu
d3304052b0 chore: update dockerfile 2024-11-17 10:40:34 -06:00
Mauricio Siu
9efd2e3d5c chore: change build i18N 2024-11-17 10:26:22 -06:00
Mauricio Siu
1e7d9fc3aa refactor(dokploy): add missing next-18next to dockerfile 2024-11-17 10:22:47 -06:00
DrMxrcy
70ca219c0a Remove Chatwoot 2024-11-17 11:12:45 -05:00
Mauricio Siu
3a07d8de2e Merge pull request #665 from PaiJi/feat/i18n-support
feat(i18n): add i18n support
2024-11-17 09:54:59 -06:00
Mauricio Siu
f4f1fc28a0 Merge pull request #705 from seppulcro/feat/nextcloud-aio-template
feat: add nextcloud-aio template
2024-11-17 09:53:44 -06:00
Mauricio Siu
4c71d3a95f Merge branch 'canary' into feat/nextcloud-aio-template 2024-11-17 09:53:25 -06:00
Mauricio Siu
af84942d22 Merge pull request #590 from wish-oss/feature/gpu-support-blender-template
feat: Implement Remote server and Dokploy Server - GPU Support for Docker Swarm
2024-11-17 09:48:44 -06:00
seppulcro
1aaff0594d feat: add nextcloud-aio template; fix utils usage for envs 2024-11-15 09:06:19 +00:00
seppulcro
69a4a87079 feat: add nextcloud-aio template 2024-11-14 15:06:53 +00:00
vishalkadam47
3eef4aa016 refactor: removed sleep function and updated import 2024-11-14 17:41:32 +05:30
Vishal kadam
2492581bde Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-11-14 17:38:11 +05:30
Mauricio Siu
be934065d9 Merge pull request #702 from Dokploy/canary
v0.11.2
2024-11-13 23:48:47 -06:00
Mauricio Siu
82fc9897d2 Merge pull request #701 from Dokploy/fix/stripe-payments
fix(stripe): attempt to fix the servers assignation when the user pay
2024-11-13 23:39:49 -06:00
Mauricio Siu
8162dcfb71 Merge pull request #697 from limichange/patch-1
Update plausible docker-compose.yml
2024-11-13 23:34:57 -06:00
Mauricio Siu
b6ab653ef3 chore(version): bump version 2024-11-13 23:30:33 -06:00
Mauricio Siu
17e9a1a497 fix(stripe): attempt to fix the servers assignation when the user pay 2024-11-13 23:29:24 -06:00
limichange
46f7d43595 Update templates.ts 2024-11-14 09:37:20 +08:00
vishalkadam47
6961ee1fc0 refactor: removed console logs and error handling 2024-11-14 04:00:05 +05:30
Vishal kadam
8e532d5a60 Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-11-13 22:23:37 +05:30
DrMxrcy
fa791706a0 fix: chatwoot DB 2024-11-13 05:49:07 -05:00
DrMxrcy
a5c1f8ef49 fix: AP Env Testing 2024-11-13 05:45:16 -05:00
DrMxrcy
6866c3b116 fix: Envs 2024-11-13 05:40:19 -05:00
DrMxrcy
444302e7b9 fix: chatwoot ENV 2024-11-13 05:33:37 -05:00
DrMxrcy
9b77573269 fix: ENV Testing 2024-11-13 05:32:05 -05:00
DrMxrcy
8157dd9eaa fix: More Config Fixes 2024-11-13 05:21:07 -05:00
DrMxrcy
f1fc3f161a Update index.ts 2024-11-13 05:07:15 -05:00
DrMxrcy
06af2042ee fix: Testing ENV Variables 2024-11-13 05:06:42 -05:00
DrMxrcy
8900e30ae7 fix: Update Chatwoot Compose 2024-11-13 04:49:23 -05:00
DrMxrcy
b5fa411093 Add: Redis Password to AP 2024-11-13 04:48:11 -05:00
DrMxrcy
cab9443d25 fix: Remove LinkStack
Removed due to https://docs.linkstack.org/docker/reverse-proxies/#traefik
2024-11-13 04:44:13 -05:00
DrMxrcy
de315124c3 fix: Multiple Tests 2024-11-13 04:38:27 -05:00
DrMxrcy
7bef3a0c29 fix: ActivePieces ENV 2024-11-13 04:26:21 -05:00
DrMxrcy
82afd486da fix: Chatwoot Setup Service 2024-11-13 04:21:16 -05:00
DrMxrcy
69c9e86a13 fix: Windmill Caddyfile 2024-11-13 04:19:34 -05:00
DrMxrcy
3d59e289be fix: ENV Variables in LinkStack 2024-11-13 04:13:58 -05:00
limichange
59bb59ee24 Update docker-compose.yml 2024-11-13 16:30:11 +08:00
DrMxrcy
8d33ff5fb5 fix: Change Windmill Volume Path 2024-11-13 03:20:20 -05:00
DrMxrcy
46219e1b3d fix: Caddyfile for Windmill 2024-11-13 02:52:22 -05:00
DrMxrcy
3457de4f36 fix: Chatwoot SSL Termination 2024-11-13 02:48:36 -05:00
DrMxrcy
e57efa2e31 fix: AP Ports 2024-11-13 02:47:30 -05:00
JiPai
fb0308fd60 chore(config): add defaultI18nConfig to avoid state issue 2024-11-13 13:54:36 +08:00
JiPai
b376ead7b5 feat(i18n): use flat translation key 2024-11-13 13:54:11 +08:00
Mauricio Siu
d081d477ef Merge pull request #695 from sokhuong-uon/canary
fix(signin-page): fix a broken link to password reset docs
2024-11-12 21:34:06 -06:00
Sokhuong Uon
cf73f1f764 fix(signin): fix broken link to password reset docs 2024-11-13 09:47:22 +07:00
DrMxrcy
deeea11428 Add: Discord Tickets 2024-11-12 16:37:51 -05:00
DrMxrcy
5c17797749 Add: Chatwoot 2024-11-12 16:19:14 -05:00
DrMxrcy
7b06fd47b8 Add: Linkstack 2024-11-12 13:34:37 -05:00
DrMxrcy
faceed12b0 Add: Slash Template 2024-11-12 13:27:08 -05:00
DrMxrcy
814580ff2c Add: Postiz 2024-11-12 13:21:17 -05:00
DrMxrcy
4f092b2fb3 Add: InvoiceShelf 2024-11-12 13:12:31 -05:00
DrMxrcy
0799f8e04c Fix: Windmill Path 2024-11-12 13:05:56 -05:00
DrMxrcy
59c050b519 Add: Activepieces 2024-11-12 13:05:21 -05:00
DrMxrcy
88f969917f Add: Windmill.dev 2024-11-12 12:50:08 -05:00
DrMxrcy
ed470ee827 Add: Peppermint.sh 2024-11-12 12:33:34 -05:00
Mauricio Siu
96584e5b32 Update CONTRIBUTING.md 2024-11-12 09:39:35 -06:00
Mauricio Siu
a7165bef20 chore: set pull 665 2024-11-12 09:38:35 -06:00
Mauricio Siu
b0f5e7dad3 Update CONTRIBUTING.md 2024-11-12 09:29:43 -06:00
JiPai
fa083257f1 Merge branch 'Dokploy:canary' into feat/i18n-support 2024-11-12 23:22:21 +08:00
Mauricio Siu
5cf12e51d1 chore: remove name 2024-11-12 09:02:44 -06:00
Mauricio Siu
b6fd410af2 chore: add tag feature 2024-11-12 09:01:49 -06:00
Vishal kadam
c5c3ca39cd Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-11-12 13:20:27 +05:30
Mauricio Siu
0e433a3d36 Merge pull request #689 from Dokploy/canary
v0.11.1
2024-11-12 01:04:36 -06:00
Mauricio Siu
b08a2f54f0 Merge pull request #688 from Dokploy/687-all-custom-domains-are-routed-to-one-application
fix(compose): add path prefix inside Host rule
2024-11-12 00:55:06 -06:00
Mauricio Siu
29ffdf2c71 chore(version): bump version 2024-11-12 00:53:34 -06:00
Mauricio Siu
58b185f6dd fix(compose): add path prefix inside Host rule 2024-11-12 00:52:10 -06:00
Vishal kadam
5f6d041248 Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-11-12 01:01:46 +05:30
vishalkadam47
b817b4b6ee refactor: gpu support and docker setup improvements
- Add gpu status refresh with useEffect
- Update docker-compose.yml configuration
- Modify gpu setup scripts
- Improve gpu support checks
2024-11-11 23:18:24 +05:30
JiPai
c09ff25360 feat(i18n): add translation for server tab 2024-11-09 18:16:06 +08:00
JiPai
046f0a5c20 feat(i18n): replace translation in Appearance 2024-11-08 12:40:31 +08:00
vishalkadam47
66c4d8f118 refactor: gpu setup and status checks, extract functions, and improve error handling 2024-11-08 03:32:33 +05:30
JiPai
7f0a92f224 feat(i18n): add language select into appearance tab 2024-11-08 02:16:15 +08:00
JiPai
0ca8ee17be feat(i18n): add i18n support 2024-11-08 01:32:46 +08:00
Vishal kadam
c765d7d9eb Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-11-07 16:36:50 +05:30
Vishal kadam
a331020bf8 Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-11-07 03:09:31 +05:30
vishalkadam47
2e6d9c34c0 feat: add dokploy server gpu setup 2024-11-07 02:52:41 +05:30
vishalkadam47
b53da82204 refactor: gpu support component and related api routers; update template environment variables 2024-11-05 12:07:35 +05:30
Vishal kadam
3b5e8921d0 Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-11-05 12:01:54 +05:30
vishalkadam47
7306d8c513 feat: Add GPU configuration and Update import path for gpu-setup functions 2024-11-03 21:34:03 +05:30
vishalkadam47
bc097c7667 fix: resolve merge conflicts with upstream/canary 2024-11-03 05:16:55 +05:30
vishalkadam47
ed7150fac1 fix: Remove unused imports and interfaces from gpu-setup.ts 2024-11-03 04:16:51 +05:30
vishalkadam47
1b6d8d803b feat: Added GPU support feature for Remote Server with setup and status checks, including API endpoints and utility functions 2024-11-02 15:15:58 +05:30
vishalkadam47
3e467959c9 refactor: Update docker-compose.yml to remove port mapping and remove GPU constants from index.ts 2024-10-27 22:00:08 +05:30
Vishal kadam
b3092691b7 Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-10-25 02:33:17 +05:30
vishalkadam47
5a440d934d fix: Remove privileged mode and seccomp option, update runtime to nvidia 2024-10-25 02:32:50 +05:30
Vishal kadam
96c5176984 Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-10-24 19:26:21 +05:30
Vishal kadam
433430118f Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-10-23 17:58:19 +05:30
Vishal kadam
6d3ea8df59 Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template 2024-10-18 18:28:44 +05:30
vishalkadam47
e52a0fc9d4 feat: Added Blender template 2024-10-18 04:55:37 +05:30
vishalkadam47
15a76d2639 feat: Add server-level GPU support for Docker Swarm deployments and API endpoint for setup 2024-10-17 15:45:27 +05:30
208 changed files with 22264 additions and 927 deletions

View File

@@ -18,8 +18,10 @@ jobs:
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN
if [ "${CIRCLE_BRANCH}" == "main" ]; then
TAG="latest"
else
elif [ "${CIRCLE_BRANCH}" == "canary" ]; then
TAG="canary"
else
TAG="feature"
fi
docker build --platform linux/amd64 -t dokploy/dokploy:${TAG}-amd64 .
docker push dokploy/dokploy:${TAG}-amd64
@@ -41,8 +43,10 @@ jobs:
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN
if [ "${CIRCLE_BRANCH}" == "main" ]; then
TAG="latest"
else
elif [ "${CIRCLE_BRANCH}" == "canary" ]; then
TAG="canary"
else
TAG="feature"
fi
docker build --platform linux/arm64 -t dokploy/dokploy:${TAG}-arm64 .
docker push dokploy/dokploy:${TAG}-arm64
@@ -72,12 +76,18 @@ jobs:
dokploy/dokploy:${TAG}-amd64 \
dokploy/dokploy:${TAG}-arm64
docker manifest push dokploy/dokploy:${VERSION}
else
elif [ "${CIRCLE_BRANCH}" == "canary" ]; then
TAG="canary"
docker manifest create dokploy/dokploy:${TAG} \
dokploy/dokploy:${TAG}-amd64 \
dokploy/dokploy:${TAG}-arm64
docker manifest push dokploy/dokploy:${TAG}
else
TAG="feature"
docker manifest create dokploy/dokploy:${TAG} \
dokploy/dokploy:${TAG}-amd64 \
dokploy/dokploy:${TAG}-arm64
docker manifest push dokploy/dokploy:${TAG}
fi
workflows:
@@ -89,12 +99,14 @@ workflows:
only:
- main
- canary
- fix/build-i18n
- build-arm64:
filters:
branches:
only:
- main
- canary
- fix/build-i18n
- combine-manifests:
requires:
- build-amd64
@@ -104,3 +116,4 @@ workflows:
only:
- main
- canary
- fix/build-i18n

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpm commitlint --edit $1

View File

@@ -1,6 +0,0 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === "production" || process.env.CI === "true") {
process.exit(0);
}
const husky = (await import("husky")).default;
console.log(husky());

View File

@@ -1 +0,0 @@
pnpm lint-staged

View File

@@ -1,6 +1,6 @@
name: Bug Report
description: Create a bug report
labels: ['bug']
labels: ["bug"]
body:
- type: markdown
attributes:
@@ -11,18 +11,27 @@ body:
- type: textarea
attributes:
label: To Reproduce
description: A step-by-step description of how to reproduce the issue, or a link to the reproducible repository.
description: |
A detailed, step-by-step description of how to reproduce the issue is required.
Please ensure your report includes clear instructions using numbered lists.
If possible, provide a link to a repository or project where the issue can be reproduced.
placeholder: |
1. Create a application
2. Click X
3. Y will happen
Make sure to:
- Use numbered lists to outline steps clearly.
- Include all relevant commands and configurations.
- Provide a link to a reproducible repository if applicable.
validations:
required: true
- type: textarea
attributes:
label: Current vs. Expected behavior
description: A clear and concise description of what the bug is, and what you expected to happen.
placeholder: 'Following the steps from the previous section, I expected A to happen, but I observed B instead'
placeholder: "Following the steps from the previous section, I expected A to happen, but I observed B instead"
validations:
required: true
- type: textarea
@@ -45,12 +54,23 @@ body:
label: Which area(s) are affected? (Select all that apply)
multiple: true
options:
- 'Installation'
- 'Application'
- 'Databases'
- 'Docker Compose'
- 'Traefik'
- 'Docker'
- "Installation"
- "Application"
- "Databases"
- "Docker Compose"
- "Traefik"
- "Docker"
- "Remote server"
- "Local Development"
validations:
required: true
- type: dropdown
attributes:
label: Are you deploying the applications where Dokploy is installed or on a remote server?
options:
- "Same server where Dokploy is installed"
- "Remote server"
- "Both"
validations:
required: true
- type: textarea
@@ -59,4 +79,16 @@ body:
description: |
Any extra information that might help us investigate.
placeholder: |
I tested on a DigitalOcean VPS with Ubuntu 20.04 and Docker version 20.10.12.
I tested on a DigitalOcean VPS with Ubuntu 20.04 and Docker version 20.10.12.
- type: dropdown
attributes:
label: Will you send a PR to fix it?
description: Let us know if you are planning to submit a pull request to address this issue.
options:
- "Yes"
- "No"
- "Maybe, need help"
validations:
required: true

View File

@@ -1,6 +1,6 @@
name: Feature Request
description: Suggest a new feature or improvement to the project
labels: ['enhancement']
labels: ["enhancement"]
body:
- type: textarea
attributes:
@@ -30,4 +30,15 @@ body:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
required: false
- type: dropdown
attributes:
label: Will you send a PR to implement it?
description: Let us know if you are planning to submit a pull request to implement this feature.
options:
- "Yes"
- "No"
- "Maybe, need help"
validations:
required: true

BIN
.github/sponsors/startupfame.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -4,9 +4,6 @@ on:
pull_request:
branches: [main, canary]
env:
HUSKY: 0
jobs:
lint-and-typecheck:
runs-on: ubuntu-latest
@@ -18,8 +15,7 @@ jobs:
node-version: 18.18.0
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run server:build
- run: pnpm biome ci
- run: pnpm run server:build
- run: pnpm typecheck
build-and-test:
@@ -46,5 +42,5 @@ jobs:
node-version: 18.18.0
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run server:build
- run: pnpm run server:build
- run: pnpm test

View File

@@ -1 +0,0 @@
npx commitlint --edit "$1"

View File

@@ -1,6 +0,0 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === "production" || process.env.CI === "true") {
process.exit(0);
}
const husky = (await import("husky")).default;
console.log(husky());

View File

@@ -1,2 +0,0 @@
pnpm run check
git add .

View File

@@ -14,10 +14,12 @@ We have a few guidelines to follow when contributing to this project:
## Commit Convention
Before you create a Pull Request, please make sure your commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
### Commit Message Format
```
<type>[optional scope]: <description>
@@ -235,7 +237,7 @@ export function generate(schema: Schema): Template {
5. Add the logo or image of the template to `public/templates/plausible.svg`
### Recomendations
### Recommendations
- Use the same name of the folder as the id of the template.
- The logo should be in the public folder.

View File

@@ -35,6 +35,7 @@ RUN apt-get update && apt-get install -y curl unzip apache2-utils && rm -rf /var
COPY --from=build /prod/dokploy/.next ./.next
COPY --from=build /prod/dokploy/dist ./dist
COPY --from=build /prod/dokploy/next.config.mjs ./next.config.mjs
COPY --from=build /prod/dokploy/next-i18next.config.cjs ./next-i18next.config.cjs
COPY --from=build /prod/dokploy/public ./public
COPY --from=build /prod/dokploy/package.json ./package.json
COPY --from=build /prod/dokploy/drizzle ./drizzle

View File

@@ -44,6 +44,7 @@ RUN apt-get update && apt-get install -y curl unzip apache2-utils && rm -rf /var
COPY --from=build /prod/dokploy/.next ./.next
COPY --from=build /prod/dokploy/dist ./dist
COPY --from=build /prod/dokploy/next.config.mjs ./next.config.mjs
COPY --from=build /prod/dokploy/next-i18next.config.cjs ./next-i18next.config.cjs
COPY --from=build /prod/dokploy/public ./public
COPY --from=build /prod/dokploy/package.json ./package.json
COPY --from=build /prod/dokploy/drizzle ./drizzle

View File

@@ -87,7 +87,8 @@ For detailed documentation, visit [docs.dokploy.com](https://docs.dokploy.com).
<div style="display: flex; gap: 30px; flex-wrap: wrap;">
<a href="https://lightspeed.run/?ref=dokploy"><img src="https://github.com/lightspeedrun.png" width="60px" alt="Lightspeed.run"/></a>
<a href="https://cloudblast.io/?ref=dokploy "><img src="https://cloudblast.io/img/logo-icon.193cf13e.svg" width="250px" alt="Lightspeed.run"/></a>
<a href="https://cloudblast.io/?ref=dokploy "><img src="https://cloudblast.io/img/logo-icon.193cf13e.svg" width="250px" alt="Cloudblast.io"/></a>
<a href="https://startupfa.me/?ref=dokploy "><img src=".github/sponsors/startupfame.png" width="65px" alt="Startupfame"/></a>
</div>
### Community Backers 🤝
@@ -116,7 +117,7 @@ For detailed documentation, visit [docs.dokploy.com](https://docs.dokploy.com).
## Video Tutorial
<a href="https://youtu.be/mznYKPvhcfw">
<img src="https://dokploy.com/banner.webp" alt="Watch the video" width="400" style="border-radius:20px;"/>
<img src="https://dokploy.com/banner.png" alt="Watch the video" width="400" style="border-radius:20px;"/>
</a>
<!-- ## Supported OS

View File

@@ -26,7 +26,6 @@ describe("createDomainLabels", () => {
"traefik.http.routers.test-app-1-web.entrypoints=web",
"traefik.http.services.test-app-1-web.loadbalancer.server.port=8080",
"traefik.http.routers.test-app-1-web.service=test-app-1-web",
"traefik.http.routers.test-app-1-web.rule=PathPrefix(`/`)",
]);
});
@@ -37,21 +36,21 @@ describe("createDomainLabels", () => {
"traefik.http.routers.test-app-1-websecure.entrypoints=websecure",
"traefik.http.services.test-app-1-websecure.loadbalancer.server.port=8080",
"traefik.http.routers.test-app-1-websecure.service=test-app-1-websecure",
"traefik.http.routers.test-app-1-websecure.rule=PathPrefix(`/`)",
]);
});
it("shouldn't add the path prefix if is empty", async () => {
it("should add the path prefix if is different than / empty", async () => {
const labels = await createDomainLabels(
appName,
{
...baseDomain,
path: "",
path: "/hello",
},
"websecure",
);
expect(labels).toEqual([
"traefik.http.routers.test-app-1-websecure.rule=Host(`example.com`)",
"traefik.http.routers.test-app-1-websecure.rule=Host(`example.com`) && PathPrefix(`/hello`)",
"traefik.http.routers.test-app-1-websecure.entrypoints=websecure",
"traefik.http.services.test-app-1-websecure.loadbalancer.server.port=8080",
"traefik.http.routers.test-app-1-websecure.service=test-app-1-websecure",

View File

@@ -30,8 +30,17 @@ const baseApp: ApplicationNested = {
appName: "",
autoDeploy: true,
serverId: "",
registryUrl: "",
branch: null,
dockerBuildStage: "",
project: {
env: "",
adminId: "",
name: "",
description: "",
createdAt: "",
projectId: "",
},
buildArgs: null,
buildPath: "/",
gitlabPathNamespace: "",

179
apps/dokploy/__test__/env/shared.test.ts vendored Normal file
View File

@@ -0,0 +1,179 @@
import { prepareEnvironmentVariables } from "@dokploy/server/index";
import { describe, expect, it } from "vitest";
const projectEnv = `
ENVIRONMENT=staging
DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db
PORT=3000
`;
const serviceEnv = `
ENVIRONMENT=\${{project.ENVIRONMENT}}
DATABASE_URL=\${{project.DATABASE_URL}}
SERVICE_PORT=4000
`;
describe("prepareEnvironmentVariables", () => {
it("resolves project variables correctly", () => {
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);
expect(resolved).toEqual([
"ENVIRONMENT=staging",
"DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db",
"SERVICE_PORT=4000",
]);
});
it("handles undefined project variables", () => {
const incompleteProjectEnv = `
NODE_ENV=production
`;
const invalidServiceEnv = `
UNDEFINED_VAR=\${{project.UNDEFINED_VAR}}
`;
expect(
() =>
prepareEnvironmentVariables(invalidServiceEnv, incompleteProjectEnv), // Cambiado el orden
).toThrow("Invalid project environment variable: project.UNDEFINED_VAR");
});
it("allows service-specific variables to override project variables", () => {
const serviceSpecificEnv = `
ENVIRONMENT=production
DATABASE_URL=\${{project.DATABASE_URL}}
`;
const resolved = prepareEnvironmentVariables(
serviceSpecificEnv,
projectEnv,
);
expect(resolved).toEqual([
"ENVIRONMENT=production", // Overrides project variable
"DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db",
]);
});
it("resolves complex references for dynamic endpoints", () => {
const projectEnv = `
BASE_URL=https://api.example.com
API_VERSION=v1
PORT=8000
`;
const serviceEnv = `
API_ENDPOINT=\${{project.BASE_URL}}/\${{project.API_VERSION}}/endpoint
SERVICE_PORT=9000
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);
expect(resolved).toEqual([
"API_ENDPOINT=https://api.example.com/v1/endpoint",
"SERVICE_PORT=9000",
]);
});
it("handles missing project variables gracefully", () => {
const projectEnv = `
PORT=8080
`;
const serviceEnv = `
MISSING_VAR=\${{project.MISSING_KEY}}
SERVICE_PORT=3000
`;
expect(() => prepareEnvironmentVariables(serviceEnv, projectEnv)).toThrow(
"Invalid project environment variable: project.MISSING_KEY",
);
});
it("overrides project variables with service-specific values", () => {
const projectEnv = `
ENVIRONMENT=staging
DATABASE_URL=postgres://project:project@localhost:5432/project_db
`;
const serviceEnv = `
ENVIRONMENT=\${{project.ENVIRONMENT}}
DATABASE_URL=postgres://service:service@localhost:5432/service_db
SERVICE_NAME=my-service
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);
expect(resolved).toEqual([
"ENVIRONMENT=staging",
"DATABASE_URL=postgres://service:service@localhost:5432/service_db",
"SERVICE_NAME=my-service",
]);
});
it("handles project variables with normal and unusual characters", () => {
const projectEnv = `
ENVIRONMENT=PRODUCTION
`;
// Needs to be in quotes
const serviceEnv = `
NODE_ENV=\${{project.ENVIRONMENT}}
SPECIAL_VAR="$^@$^@#$^@!#$@#$-\${{project.ENVIRONMENT}}"
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);
expect(resolved).toEqual([
"NODE_ENV=PRODUCTION",
"SPECIAL_VAR=$^@$^@#$^@!#$@#$-PRODUCTION",
]);
});
it("handles complex cases with multiple references, special characters, and spaces", () => {
const projectEnv = `
ENVIRONMENT=STAGING
APP_NAME=MyApp
`;
const serviceEnv = `
NODE_ENV=\${{project.ENVIRONMENT}}
COMPLEX_VAR="Prefix-$#^!@-\${{project.ENVIRONMENT}}--\${{project.APP_NAME}} Suffix "
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);
expect(resolved).toEqual([
"NODE_ENV=STAGING",
"COMPLEX_VAR=Prefix-$#^!@-STAGING--MyApp Suffix ",
]);
});
it("handles references enclosed in single quotes", () => {
const projectEnv = `
ENVIRONMENT=STAGING
APP_NAME=MyApp
`;
const serviceEnv = `
NODE_ENV='\${{project.ENVIRONMENT}}'
COMPLEX_VAR='Prefix-$#^!@-\${{project.ENVIRONMENT}}--\${{project.APP_NAME}} Suffix'
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);
expect(resolved).toEqual([
"NODE_ENV=STAGING",
"COMPLEX_VAR=Prefix-$#^!@-STAGING--MyApp Suffix",
]);
});
it("handles double and single quotes combined", () => {
const projectEnv = `
ENVIRONMENT=PRODUCTION
APP_NAME=MyApp
`;
const serviceEnv = `
NODE_ENV="'\${{project.ENVIRONMENT}}'"
COMPLEX_VAR="'Prefix \"DoubleQuoted\" and \${{project.APP_NAME}}'"
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);
expect(resolved).toEqual([
"NODE_ENV='PRODUCTION'",
"COMPLEX_VAR='Prefix \"DoubleQuoted\" and MyApp'",
]);
});
});

View File

@@ -12,7 +12,16 @@ const baseApp: ApplicationNested = {
serverId: "",
branch: null,
dockerBuildStage: "",
registryUrl: "",
buildArgs: null,
project: {
env: "",
adminId: "",
name: "",
description: "",
createdAt: "",
projectId: "",
},
buildPath: "/",
gitlabPathNamespace: "",
buildType: "nixpacks",

View File

@@ -61,7 +61,7 @@ const redirectPresets = [
redirect: {
regex: "^https?://(?:www.)?(.+)",
permanent: true,
replacement: "https://www.$${1}",
replacement: "https://www.${1}",
},
},
{
@@ -70,7 +70,7 @@ const redirectPresets = [
redirect: {
regex: "^https?://www.(.+)",
permanent: true,
replacement: "https://$${1}",
replacement: "https://${1}",
},
},
];

View File

@@ -1,63 +1,143 @@
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { TrashIcon } from "lucide-react";
import { useRouter } from "next/router";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
const deleteApplicationSchema = z.object({
projectName: z.string().min(1, {
message: "Application name is required",
}),
});
type DeleteApplication = z.infer<typeof deleteApplicationSchema>;
interface Props {
applicationId: string;
}
export const DeleteApplication = ({ applicationId }: Props) => {
const [isOpen, setIsOpen] = useState(false);
const { mutateAsync, isLoading } = api.application.delete.useMutation();
const { data } = api.application.one.useQuery(
{ applicationId },
{ enabled: !!applicationId },
);
const { push } = useRouter();
const form = useForm<DeleteApplication>({
defaultValues: {
projectName: "",
},
resolver: zodResolver(deleteApplicationSchema),
});
const onSubmit = async (formData: DeleteApplication) => {
const expectedName = `${data?.name}/${data?.appName}`;
if (formData.projectName === expectedName) {
await mutateAsync({
applicationId,
})
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Application deleted successfully");
setIsOpen(false);
})
.catch(() => {
toast.error("Error deleting the application");
});
} else {
form.setError("projectName", {
message: "Project name does not match",
});
}
};
return (
<AlertDialog>
<AlertDialogTrigger asChild>
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<Button variant="ghost" isLoading={isLoading}>
<TrashIcon className="size-4 text-muted-foreground" />
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
</DialogTrigger>
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-lg">
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete the
application
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
onClick={async () => {
await mutateAsync({
applicationId,
})
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Application delete succesfully");
})
.catch(() => {
toast.error("Error to delete Application");
});
application. If you are sure please enter the application name to
delete this application.
</DialogDescription>
</DialogHeader>
<div className="grid gap-4">
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
id="hook-form-delete-application"
className="grid w-full gap-4"
>
<FormField
control={form.control}
name="projectName"
render={({ field }) => (
<FormItem>
<FormLabel>
To confirm, type "{data?.name}/{data?.appName}" in the box
below
</FormLabel>
<FormControl>
<Input
placeholder="Enter application name to confirm"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</form>
</Form>
</div>
<DialogFooter>
<Button
variant="secondary"
onClick={() => {
setIsOpen(false);
}}
>
Cancel
</Button>
<Button
isLoading={isLoading}
form="hook-form-delete-application"
type="submit"
variant="destructive"
>
Confirm
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
};

View File

@@ -202,7 +202,6 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
"w-full justify-between !bg-input",
!field.value && "text-muted-foreground",
@@ -281,7 +280,6 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
" w-full justify-between !bg-input",
!field.value && "text-muted-foreground",

View File

@@ -21,6 +21,7 @@ const DockerProviderSchema = z.object({
}),
username: z.string().optional(),
password: z.string().optional(),
registryURL: z.string().optional(),
});
type DockerProvider = z.infer<typeof DockerProviderSchema>;
@@ -33,12 +34,12 @@ export const SaveDockerProvider = ({ applicationId }: Props) => {
const { data, refetch } = api.application.one.useQuery({ applicationId });
const { mutateAsync } = api.application.saveDockerProvider.useMutation();
const form = useForm<DockerProvider>({
defaultValues: {
dockerImage: "",
password: "",
username: "",
registryURL: "",
},
resolver: zodResolver(DockerProviderSchema),
});
@@ -49,6 +50,7 @@ export const SaveDockerProvider = ({ applicationId }: Props) => {
dockerImage: data.dockerImage || "",
password: data.password || "",
username: data.username || "",
registryURL: data.registryUrl || "",
});
}
}, [form.reset, data, form]);
@@ -59,6 +61,7 @@ export const SaveDockerProvider = ({ applicationId }: Props) => {
password: values.password || null,
applicationId,
username: values.username || null,
registryUrl: values.registryURL || null,
})
.then(async () => {
toast.success("Docker Provider Saved");
@@ -76,7 +79,7 @@ export const SaveDockerProvider = ({ applicationId }: Props) => {
className="flex flex-col gap-4"
>
<div className="grid md:grid-cols-2 gap-4 ">
<div className="md:col-span-2 space-y-4">
<div className="space-y-4">
<FormField
control={form.control}
name="dockerImage"
@@ -91,6 +94,19 @@ export const SaveDockerProvider = ({ applicationId }: Props) => {
)}
/>
</div>
<FormField
control={form.control}
name="registryURL"
render={({ field }) => (
<FormItem>
<FormLabel>Registry URL</FormLabel>
<FormControl>
<Input placeholder="Registry URL" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<div className="space-y-4">
<FormField
control={form.control}

View File

@@ -193,7 +193,6 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
"w-full justify-between !bg-input",
!field.value && "text-muted-foreground",
@@ -272,7 +271,6 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
" w-full justify-between !bg-input",
!field.value && "text-muted-foreground",

View File

@@ -209,7 +209,6 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
"w-full justify-between !bg-input",
!field.value && "text-muted-foreground",
@@ -297,7 +296,6 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
" w-full justify-between !bg-input",
!field.value && "text-muted-foreground",

View File

@@ -1,63 +1,141 @@
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { TrashIcon } from "lucide-react";
import { useRouter } from "next/router";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
const deleteComposeSchema = z.object({
projectName: z.string().min(1, {
message: "Compose name is required",
}),
});
type DeleteCompose = z.infer<typeof deleteComposeSchema>;
interface Props {
composeId: string;
}
export const DeleteCompose = ({ composeId }: Props) => {
const [isOpen, setIsOpen] = useState(false);
const { mutateAsync, isLoading } = api.compose.delete.useMutation();
const { data } = api.compose.one.useQuery(
{ composeId },
{ enabled: !!composeId },
);
const { push } = useRouter();
const form = useForm<DeleteCompose>({
defaultValues: {
projectName: "",
},
resolver: zodResolver(deleteComposeSchema),
});
const onSubmit = async (formData: DeleteCompose) => {
const expectedName = `${data?.name}/${data?.appName}`;
if (formData.projectName === expectedName) {
await mutateAsync({ composeId })
.then((result) => {
push(`/dashboard/project/${result?.projectId}`);
toast.success("Compose deleted successfully");
setIsOpen(false);
})
.catch(() => {
toast.error("Error deleting the compose");
});
} else {
form.setError("projectName", {
message: `Project name must match "${expectedName}"`,
});
}
};
return (
<AlertDialog>
<AlertDialogTrigger asChild>
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<Button variant="ghost" isLoading={isLoading}>
<TrashIcon className="size-4 text-muted-foreground" />
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
</DialogTrigger>
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-lg">
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete the
compose and all its services.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
onClick={async () => {
await mutateAsync({
composeId,
})
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Compose delete succesfully");
})
.catch(() => {
toast.error("Error to delete the compose");
});
compose. If you are sure please enter the compose name to delete
this compose.
</DialogDescription>
</DialogHeader>
<div className="grid gap-4">
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
id="hook-form-delete-compose"
className="grid w-full gap-4"
>
<FormField
control={form.control}
name="projectName"
render={({ field }) => (
<FormItem>
<FormLabel>
To confirm, type "{data?.name}/{data?.appName}" in the box
below
</FormLabel>{" "}
<FormControl>
<Input
placeholder="Enter compose name to confirm"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</form>
</Form>
</div>
<DialogFooter>
<Button
variant="secondary"
onClick={() => {
setIsOpen(false);
}}
>
Cancel
</Button>
<Button
isLoading={isLoading}
form="hook-form-delete-compose"
type="submit"
variant="destructive"
>
Confirm
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
};

View File

@@ -204,7 +204,6 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
"w-full justify-between !bg-input",
!field.value && "text-muted-foreground",
@@ -283,7 +282,6 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
" w-full justify-between !bg-input",
!field.value && "text-muted-foreground",

View File

@@ -195,7 +195,6 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
"w-full justify-between !bg-input",
!field.value && "text-muted-foreground",
@@ -274,7 +273,6 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
" w-full justify-between !bg-input",
!field.value && "text-muted-foreground",

View File

@@ -211,7 +211,6 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
"w-full justify-between !bg-input",
!field.value && "text-muted-foreground",
@@ -299,7 +298,6 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
" w-full justify-between !bg-input",
!field.value && "text-muted-foreground",

View File

@@ -160,7 +160,6 @@ export const AddBackup = ({ databaseId, databaseType, refetch }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
"w-full justify-between !bg-input",
!field.value && "text-muted-foreground",

View File

@@ -144,7 +144,6 @@ export const UpdateBackup = ({ backupId, refetch }: Props) => {
<FormControl>
<Button
variant="outline"
role="combobox"
className={cn(
"w-full justify-between !bg-input",
!field.value && "text-muted-foreground",

View File

@@ -1,62 +1,140 @@
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { TrashIcon } from "lucide-react";
import { useRouter } from "next/router";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
const deleteMariadbSchema = z.object({
projectName: z.string().min(1, {
message: "Database name is required",
}),
});
type DeleteMariadb = z.infer<typeof deleteMariadbSchema>;
interface Props {
mariadbId: string;
}
export const DeleteMariadb = ({ mariadbId }: Props) => {
const [isOpen, setIsOpen] = useState(false);
const { mutateAsync, isLoading } = api.mariadb.remove.useMutation();
const { data } = api.mariadb.one.useQuery(
{ mariadbId },
{ enabled: !!mariadbId },
);
const { push } = useRouter();
const form = useForm<DeleteMariadb>({
defaultValues: {
projectName: "",
},
resolver: zodResolver(deleteMariadbSchema),
});
const onSubmit = async (formData: DeleteMariadb) => {
const expectedName = `${data?.name}/${data?.appName}`;
if (formData.projectName === expectedName) {
await mutateAsync({ mariadbId })
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Database deleted successfully");
setIsOpen(false);
})
.catch(() => {
toast.error("Error deleting the database");
});
} else {
form.setError("projectName", {
message: "Database name does not match",
});
}
};
return (
<AlertDialog>
<AlertDialogTrigger asChild>
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<Button variant="ghost" isLoading={isLoading}>
<TrashIcon className="size-4 text-muted-foreground " />
<TrashIcon className="size-4 text-muted-foreground" />
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
</DialogTrigger>
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-lg">
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete the
database
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
onClick={async () => {
await mutateAsync({
mariadbId,
})
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Database delete succesfully");
})
.catch(() => {
toast.error("Error to delete the database");
});
database. If you are sure please enter the database name to delete
this database.
</DialogDescription>
</DialogHeader>
<div className="grid gap-4">
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
id="hook-form-delete-mariadb"
className="grid w-full gap-4"
>
<FormField
control={form.control}
name="projectName"
render={({ field }) => (
<FormItem>
<FormLabel>
To confirm, type "{data?.name}/{data?.appName}" in the box
below
</FormLabel>
<FormControl>
<Input
placeholder="Enter database name to confirm"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</form>
</Form>
</div>
<DialogFooter>
<Button
variant="secondary"
onClick={() => {
setIsOpen(false);
}}
>
Cancel
</Button>
<Button
isLoading={isLoading}
form="hook-form-delete-mariadb"
type="submit"
variant="destructive"
>
Confirm
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
};

View File

@@ -1,62 +1,139 @@
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { TrashIcon } from "lucide-react";
import { useRouter } from "next/router";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
const deleteMongoSchema = z.object({
projectName: z.string().min(1, {
message: "Database name is required",
}),
});
type DeleteMongo = z.infer<typeof deleteMongoSchema>;
interface Props {
mongoId: string;
}
// commen
export const DeleteMongo = ({ mongoId }: Props) => {
const [isOpen, setIsOpen] = useState(false);
const { mutateAsync, isLoading } = api.mongo.remove.useMutation();
const { data } = api.mongo.one.useQuery({ mongoId }, { enabled: !!mongoId });
const { push } = useRouter();
const form = useForm<DeleteMongo>({
defaultValues: {
projectName: "",
},
resolver: zodResolver(deleteMongoSchema),
});
const onSubmit = async (formData: DeleteMongo) => {
const expectedName = `${data?.name}/${data?.appName}`;
if (formData.projectName === expectedName) {
await mutateAsync({ mongoId })
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Database deleted successfully");
setIsOpen(false);
})
.catch(() => {
toast.error("Error deleting the database");
});
} else {
form.setError("projectName", {
message: "Database name does not match",
});
}
};
return (
<AlertDialog>
<AlertDialogTrigger asChild>
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<Button variant="ghost" isLoading={isLoading}>
<TrashIcon className="size-4 text-muted-foreground " />
<TrashIcon className="size-4 text-muted-foreground" />
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
</DialogTrigger>
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-lg">
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete the
database
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
onClick={async () => {
await mutateAsync({
mongoId,
})
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Database delete succesfully");
})
.catch(() => {
toast.error("Error to delete the database");
});
database. If you are sure please enter the database name to delete
this database.
</DialogDescription>
</DialogHeader>
<div className="grid gap-4">
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
id="hook-form-delete-mongo"
className="grid w-full gap-4"
>
<FormField
control={form.control}
name="projectName"
render={({ field }) => (
<FormItem>
<FormLabel>
To confirm, type "{data?.name}/{data?.appName}" in the box
below
</FormLabel>
<FormControl>
<Input
placeholder="Enter database name to confirm"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</form>
</Form>
</div>
<DialogFooter>
<Button
variant="secondary"
onClick={() => {
setIsOpen(false);
}}
>
Cancel
</Button>
<Button
isLoading={isLoading}
form="hook-form-delete-mongo"
type="submit"
variant="destructive"
>
Confirm
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
};

View File

@@ -1,62 +1,138 @@
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { TrashIcon } from "lucide-react";
import { useRouter } from "next/router";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
const deleteMysqlSchema = z.object({
projectName: z.string().min(1, {
message: "Database name is required",
}),
});
type DeleteMysql = z.infer<typeof deleteMysqlSchema>;
interface Props {
mysqlId: string;
}
export const DeleteMysql = ({ mysqlId }: Props) => {
const [isOpen, setIsOpen] = useState(false);
const { mutateAsync, isLoading } = api.mysql.remove.useMutation();
const { data } = api.mysql.one.useQuery({ mysqlId }, { enabled: !!mysqlId });
const { push } = useRouter();
const form = useForm<DeleteMysql>({
defaultValues: {
projectName: "",
},
resolver: zodResolver(deleteMysqlSchema),
});
const onSubmit = async (formData: DeleteMysql) => {
const expectedName = `${data?.name}/${data?.appName}`;
if (formData.projectName === expectedName) {
await mutateAsync({ mysqlId })
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Database deleted successfully");
setIsOpen(false);
})
.catch(() => {
toast.error("Error deleting the database");
});
} else {
form.setError("projectName", {
message: "Database name does not match",
});
}
};
return (
<AlertDialog>
<AlertDialogTrigger asChild>
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<Button variant="ghost" isLoading={isLoading}>
<TrashIcon className="size-4 text-muted-foreground " />
<TrashIcon className="size-4 text-muted-foreground" />
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
</DialogTrigger>
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-lg">
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete the
database
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
onClick={async () => {
await mutateAsync({
mysqlId,
})
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Database delete succesfully");
})
.catch(() => {
toast.error("Error to delete the database");
});
database. If you are sure please enter the database name to delete
this database.
</DialogDescription>
</DialogHeader>
<div className="grid gap-4">
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
id="hook-form-delete-mysql"
className="grid w-full gap-4"
>
<FormField
control={form.control}
name="projectName"
render={({ field }) => (
<FormItem>
<FormLabel>
To confirm, type "{data?.name}/{data?.appName}" in the box
below
</FormLabel>
<FormControl>
<Input
placeholder="Enter database name to confirm"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</form>
</Form>
</div>
<DialogFooter>
<Button
variant="secondary"
onClick={() => {
setIsOpen(false);
}}
>
Cancel
</Button>
<Button
isLoading={isLoading}
form="hook-form-delete-mysql"
type="submit"
variant="destructive"
>
Confirm
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
};

View File

@@ -86,14 +86,12 @@ export const ShowVolumes = ({ mysqlId }: Props) => {
)}
{mount.type === "file" && (
<>
<div className="flex flex-col gap-1">
<span className="font-medium">Content</span>
<span className="text-sm text-muted-foreground">
{mount.content}
</span>
</div>
</>
<div className="flex flex-col gap-1">
<span className="font-medium">Content</span>
<span className="text-sm text-muted-foreground">
{mount.content}
</span>
</div>
)}
{mount.type === "bind" && (
<div className="flex flex-col gap-1">

View File

@@ -1,62 +1,141 @@
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { TrashIcon } from "lucide-react";
import { useRouter } from "next/router";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
const deletePostgresSchema = z.object({
projectName: z.string().min(1, {
message: "Database name is required",
}),
});
type DeletePostgres = z.infer<typeof deletePostgresSchema>;
interface Props {
postgresId: string;
}
export const DeletePostgres = ({ postgresId }: Props) => {
const [isOpen, setIsOpen] = useState(false);
const { mutateAsync, isLoading } = api.postgres.remove.useMutation();
const { data } = api.postgres.one.useQuery(
{ postgresId },
{ enabled: !!postgresId },
);
const { push } = useRouter();
const form = useForm<DeletePostgres>({
defaultValues: {
projectName: "",
},
resolver: zodResolver(deletePostgresSchema),
});
const onSubmit = async (formData: DeletePostgres) => {
const expectedName = `${data?.name}/${data?.appName}`;
if (formData.projectName === expectedName) {
await mutateAsync({ postgresId })
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Database deleted successfully");
setIsOpen(false);
})
.catch(() => {
toast.error("Error deleting the database");
});
} else {
form.setError("projectName", {
message: "Database name does not match",
});
}
};
return (
<AlertDialog>
<AlertDialogTrigger asChild>
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<Button variant="ghost" isLoading={isLoading}>
<TrashIcon className="size-4 text-muted-foreground " />
<TrashIcon className="size-4 text-muted-foreground" />
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
</DialogTrigger>
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-lg">
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete the
database
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
onClick={async () => {
await mutateAsync({
postgresId,
})
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Database delete succesfully");
})
.catch(() => {
toast.error("Error to delete the database");
});
database. If you are sure please enter the database name to delete
this database.
</DialogDescription>
</DialogHeader>
<div className="grid gap-4">
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
id="hook-form-delete-postgres"
className="grid w-full gap-4"
>
<FormField
control={form.control}
name="projectName"
render={({ field }) => (
<FormItem>
<FormLabel>
To confirm, type "{data?.name}/{data?.appName}" in the box
below
</FormLabel>
<FormControl>
<Input
placeholder="Enter database name to confirm"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</form>
</Form>
</div>
<DialogFooter>
<Button
variant="secondary"
onClick={() => {
setIsOpen(false);
}}
>
Cancel
</Button>
<Button
isLoading={isLoading}
form="hook-form-delete-postgres"
type="submit"
variant="destructive"
>
Confirm
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
};

View File

@@ -127,7 +127,6 @@ export const AddTemplate = ({ projectId }: Props) => {
<PopoverTrigger asChild>
<Button
variant="outline"
role="combobox"
className={cn(
"md:max-w-[15rem] w-full justify-between !bg-input",
)}

View File

@@ -0,0 +1,155 @@
import { AlertBlock } from "@/components/shared/alert-block";
import { CodeEditor } from "@/components/shared/code-editor";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { FileIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
const updateProjectSchema = z.object({
env: z.string().optional(),
});
type UpdateProject = z.infer<typeof updateProjectSchema>;
interface Props {
projectId: string;
children?: React.ReactNode;
}
export const ProjectEnviroment = ({ projectId, children }: Props) => {
const [isOpen, setIsOpen] = useState(false);
const utils = api.useUtils();
const { mutateAsync, error, isError, isLoading } =
api.project.update.useMutation();
const { data } = api.project.one.useQuery(
{
projectId,
},
{
enabled: !!projectId,
},
);
const form = useForm<UpdateProject>({
defaultValues: {
env: data?.env ?? "",
},
resolver: zodResolver(updateProjectSchema),
});
useEffect(() => {
if (data) {
form.reset({
env: data.env ?? "",
});
}
}, [data, form, form.reset]);
const onSubmit = async (formData: UpdateProject) => {
await mutateAsync({
env: formData.env || "",
projectId: projectId,
})
.then(() => {
toast.success("Project env updated succesfully");
utils.project.all.invalidate();
})
.catch(() => {
toast.error("Error to update the env");
})
.finally(() => {});
};
return (
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
{children ?? (
<DropdownMenuItem
className="w-full cursor-pointer space-x-3"
onSelect={(e) => e.preventDefault()}
>
<FileIcon className="size-4" />
<span>Project Enviroment</span>
</DropdownMenuItem>
)}
</DialogTrigger>
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-6xl">
<DialogHeader>
<DialogTitle>Project Enviroment</DialogTitle>
<DialogDescription>
Update the env Environment variables that are accessible to all
services of this project. Use this syntax to reference project-level
variables in your service environments:
</DialogDescription>
</DialogHeader>
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
<AlertBlock type="info">
Use this syntax to reference project-level variables in your service
environments: <code>DATABASE_URL=${"{{project.DATABASE_URL}}"}</code>
</AlertBlock>
<div className="grid gap-4">
<div className="grid items-center gap-4">
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="grid w-full gap-4 "
>
<FormField
control={form.control}
name="env"
render={({ field }) => (
<FormItem>
<FormLabel>Enviroment variables</FormLabel>
<FormControl>
<CodeEditor
lineWrapping
language="properties"
wrapperClassName="h-[35rem] font-mono"
placeholder={`NODE_ENV=production
PORT=3000
`}
{...field}
/>
</FormControl>
<pre>
<FormMessage />
</pre>
</FormItem>
)}
/>
<DialogFooter>
<Button isLoading={isLoading} type="submit">
Update
</Button>
</DialogFooter>
</form>
</Form>
</div>
</div>
</DialogContent>
</Dialog>
);
};

View File

@@ -25,7 +25,6 @@ import { api } from "@/utils/api";
import {
AlertTriangle,
BookIcon,
CircuitBoard,
ExternalLink,
ExternalLinkIcon,
FolderInput,
@@ -35,6 +34,7 @@ import {
import Link from "next/link";
import { Fragment } from "react";
import { toast } from "sonner";
import { ProjectEnviroment } from "./project-enviroment";
import { UpdateProject } from "./update";
export const ShowProjects = () => {
@@ -190,7 +190,11 @@ export const ShowProjects = () => {
<DropdownMenuLabel className="font-normal">
Actions
</DropdownMenuLabel>
<div onClick={(e) => e.stopPropagation()}>
<ProjectEnviroment
projectId={project.projectId}
/>
</div>
<div onClick={(e) => e.stopPropagation()}>
<UpdateProject projectId={project.projectId} />
</div>

View File

@@ -1,62 +1,138 @@
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { TrashIcon } from "lucide-react";
import { useRouter } from "next/router";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
const deleteRedisSchema = z.object({
projectName: z.string().min(1, {
message: "Database name is required",
}),
});
type DeleteRedis = z.infer<typeof deleteRedisSchema>;
interface Props {
redisId: string;
}
export const DeleteRedis = ({ redisId }: Props) => {
const [isOpen, setIsOpen] = useState(false);
const { mutateAsync, isLoading } = api.redis.remove.useMutation();
const { data } = api.redis.one.useQuery({ redisId }, { enabled: !!redisId });
const { push } = useRouter();
const form = useForm<DeleteRedis>({
defaultValues: {
projectName: "",
},
resolver: zodResolver(deleteRedisSchema),
});
const onSubmit = async (formData: DeleteRedis) => {
const expectedName = `${data?.name}/${data?.appName}`;
if (formData.projectName === expectedName) {
await mutateAsync({ redisId })
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Database deleted successfully");
setIsOpen(false);
})
.catch(() => {
toast.error("Error deleting the database");
});
} else {
form.setError("projectName", {
message: "Database name does not match",
});
}
};
return (
<AlertDialog>
<AlertDialogTrigger asChild>
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<Button variant="ghost" isLoading={isLoading}>
<TrashIcon className="size-4 text-muted-foreground " />
<TrashIcon className="size-4 text-muted-foreground" />
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
</DialogTrigger>
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-lg">
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete the
database
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
onClick={async () => {
await mutateAsync({
redisId,
})
.then((data) => {
push(`/dashboard/project/${data?.projectId}`);
toast.success("Database delete succesfully");
})
.catch(() => {
toast.error("Error to delete the database");
});
database. If you are sure please enter the database name to delete
this database.
</DialogDescription>
</DialogHeader>
<div className="grid gap-4">
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
id="hook-form-delete-redis"
className="grid w-full gap-4"
>
<FormField
control={form.control}
name="projectName"
render={({ field }) => (
<FormItem>
<FormLabel>
To confirm, type "{data?.name}/{data?.appName}" in the box
below
</FormLabel>
<FormControl>
<Input
placeholder="Enter database name to confirm"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</form>
</Form>
</div>
<DialogFooter>
<Button
variant="secondary"
onClick={() => {
setIsOpen(false);
}}
>
Cancel
</Button>
<Button
isLoading={isLoading}
form="hook-form-delete-redis"
type="submit"
variant="destructive"
>
Confirm
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
};

View File

@@ -20,6 +20,15 @@ import {
FormMessage,
} from "@/components/ui/form";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import useLocale from "@/utils/hooks/use-locale";
import { useTranslation } from "next-i18next";
import { useTheme } from "next-themes";
import { useEffect } from "react";
import { toast } from "sonner";
@@ -28,6 +37,12 @@ const appearanceFormSchema = z.object({
theme: z.enum(["light", "dark", "system"], {
required_error: "Please select a theme.",
}),
language: z.enum(
["en", "pl", "ru", "fr", "de", "tr", "zh-Hant", "zh-Hans", "fa"],
{
required_error: "Please select a language.",
},
),
});
type AppearanceFormValues = z.infer<typeof appearanceFormSchema>;
@@ -35,10 +50,14 @@ type AppearanceFormValues = z.infer<typeof appearanceFormSchema>;
// This can come from your database or API.
const defaultValues: Partial<AppearanceFormValues> = {
theme: "system",
language: "en",
};
export function AppearanceForm() {
const { setTheme, theme } = useTheme();
const { locale, setLocale } = useLocale();
const { t } = useTranslation("settings");
const form = useForm<AppearanceFormValues>({
resolver: zodResolver(appearanceFormSchema),
defaultValues,
@@ -47,19 +66,23 @@ export function AppearanceForm() {
useEffect(() => {
form.reset({
theme: (theme ?? "system") as AppearanceFormValues["theme"],
language: locale,
});
}, [form, theme]);
}, [form, theme, locale]);
function onSubmit(data: AppearanceFormValues) {
setTheme(data.theme);
setLocale(data.language);
toast.success("Preferences Updated");
}
return (
<Card className="bg-transparent">
<CardHeader>
<CardTitle className="text-xl">Appearance</CardTitle>
<CardTitle className="text-xl">
{t("settings.appearance.title")}
</CardTitle>
<CardDescription>
Customize the theme of your dashboard.
{t("settings.appearance.description")}
</CardDescription>
</CardHeader>
<CardContent className="space-y-2">
@@ -72,9 +95,9 @@ export function AppearanceForm() {
render={({ field }) => {
return (
<FormItem className="space-y-1 ">
<FormLabel>Theme</FormLabel>
<FormLabel>{t("settings.appearance.theme")}</FormLabel>
<FormDescription>
Select a theme for your dashboard
{t("settings.appearance.themeDescription")}
</FormDescription>
<FormMessage />
<RadioGroup
@@ -92,7 +115,7 @@ export function AppearanceForm() {
<img src="/images/theme-light.svg" alt="light" />
</div>
<span className="block w-full p-2 text-center font-normal">
Light
{t("settings.appearance.themes.light")}
</span>
</FormLabel>
</FormItem>
@@ -105,7 +128,7 @@ export function AppearanceForm() {
<img src="/images/theme-dark.svg" alt="dark" />
</div>
<span className="block w-full p-2 text-center font-normal">
Dark
{t("settings.appearance.themes.dark")}
</span>
</FormLabel>
</FormItem>
@@ -121,7 +144,7 @@ export function AppearanceForm() {
<img src="/images/theme-system.svg" alt="system" />
</div>
<span className="block w-full p-2 text-center font-normal">
System
{t("settings.appearance.themes.system")}
</span>
</FormLabel>
</FormItem>
@@ -131,7 +154,53 @@ export function AppearanceForm() {
}}
/>
<Button type="submit">Save</Button>
<FormField
control={form.control}
name="language"
defaultValue={form.control._defaultValues.language}
render={({ field }) => {
return (
<FormItem className="space-y-1">
<FormLabel>{t("settings.appearance.language")}</FormLabel>
<FormDescription>
{t("settings.appearance.languageDescription")}
</FormDescription>
<FormMessage />
<Select
onValueChange={field.onChange}
defaultValue={field.value}
value={field.value}
>
<SelectTrigger>
<SelectValue placeholder="No preset selected" />
</SelectTrigger>
<SelectContent>
{[
{ label: "English", value: "en" },
{ label: "Polski", value: "pl" },
{ label: "Русский", value: "ru" },
{ label: "Français", value: "fr" },
{ label: "Deutsch", value: "de" },
{ label: "繁體中文", value: "zh-Hant" },
{ label: "简体中文", value: "zh-Hans" },
{ label: "Türkçe", value: "tr" },
{
label: "Persian",
value: "fa",
},
].map((preset) => (
<SelectItem key={preset.label} value={preset.value}>
{preset.label}
</SelectItem>
))}
</SelectContent>
</Select>
</FormItem>
);
}}
/>
<Button type="submit">{t("settings.common.save")}</Button>
</form>
</Form>
</CardContent>

View File

@@ -89,18 +89,14 @@ export const ShowBilling = () => {
<div className="pb-5">
<Progress value={safePercentage} className="max-w-lg" />
</div>
{admin && (
<>
{admin.serversQuantity! <= servers?.length! && (
<div className="flex flex-row gap-4 p-2 bg-yellow-50 dark:bg-yellow-950 rounded-lg items-center">
<AlertTriangle className="text-yellow-600 dark:text-yellow-400" />
<span className="text-sm text-yellow-600 dark:text-yellow-400">
You have reached the maximum number of servers you can
create, please upgrade your plan to add more servers.
</span>
</div>
)}
</>
{admin && admin.serversQuantity! <= servers?.length! && (
<div className="flex flex-row gap-4 p-2 bg-yellow-50 dark:bg-yellow-950 rounded-lg items-center">
<AlertTriangle className="text-yellow-600 dark:text-yellow-400" />
<span className="text-sm text-yellow-600 dark:text-yellow-400">
You have reached the maximum number of servers you can create,
please upgrade your plan to add more servers.
</span>
</div>
)}
</div>
)}
@@ -188,7 +184,6 @@ export const ShowBilling = () => {
</p>
<ul
role="list"
className={clsx(
" mt-4 flex flex-col gap-y-2 text-sm",
featured ? "text-white" : "text-slate-200",

View File

@@ -28,11 +28,7 @@ export const ShowRegistry = () => {
</div>
<div className="flex flex-row gap-2">
{data && data?.length > 0 && (
<>
<AddRegistry />
</>
)}
{data && data?.length > 0 && <AddRegistry />}
</div>
</CardHeader>
<CardContent className="space-y-2 pt-4 h-full">

View File

@@ -34,9 +34,11 @@ import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
import { S3_PROVIDERS } from "./constants";
const addDestination = z.object({
name: z.string().min(1, "Name is required"),
provider: z.string().optional(),
accessKeyId: z.string(),
secretAccessKey: z.string(),
bucket: z.string(),
@@ -58,6 +60,7 @@ export const AddDestination = () => {
api.destination.testConnection.useMutation();
const form = useForm<AddDestination>({
defaultValues: {
provider: "",
accessKeyId: "",
bucket: "",
name: "",
@@ -73,6 +76,7 @@ export const AddDestination = () => {
const onSubmit = async (data: AddDestination) => {
await mutateAsync({
provider: data.provider || "",
accessKey: data.accessKeyId,
bucket: data.bucket,
endpoint: data.endpoint,
@@ -123,6 +127,40 @@ export const AddDestination = () => {
);
}}
/>
<FormField
control={form.control}
name="provider"
render={({ field }) => {
return (
<FormItem>
<FormLabel>Provider</FormLabel>
<FormControl>
<Select
onValueChange={field.onChange}
defaultValue={field.value}
>
<FormControl>
<SelectTrigger>
<SelectValue placeholder="Select a S3 Provider" />
</SelectTrigger>
</FormControl>
<SelectContent>
{S3_PROVIDERS.map((s3Provider) => (
<SelectItem
key={s3Provider.key}
value={s3Provider.key}
>
{s3Provider.name}
</SelectItem>
))}
</SelectContent>
</Select>
</FormControl>
<FormMessage />
</FormItem>
);
}}
/>
<FormField
control={form.control}
@@ -255,6 +293,7 @@ export const AddDestination = () => {
isLoading={isLoading}
onClick={async () => {
await testConnection({
provider: form.getValues("provider") || "",
accessKey: form.getValues("accessKeyId"),
bucket: form.getValues("bucket"),
endpoint: form.getValues("endpoint"),
@@ -283,6 +322,7 @@ export const AddDestination = () => {
variant="secondary"
onClick={async () => {
await testConnection({
provider: form.getValues("provider") || "",
accessKey: form.getValues("accessKeyId"),
bucket: form.getValues("bucket"),
endpoint: form.getValues("endpoint"),

View File

@@ -0,0 +1,133 @@
export const S3_PROVIDERS: Array<{
key: string;
name: string;
}> = [
{
key: "AWS",
name: "Amazon Web Services (AWS) S3",
},
{
key: "Alibaba",
name: "Alibaba Cloud Object Storage System (OSS) formerly Aliyun",
},
{
key: "ArvanCloud",
name: "Arvan Cloud Object Storage (AOS)",
},
{
key: "Ceph",
name: "Ceph Object Storage",
},
{
key: "ChinaMobile",
name: "China Mobile Ecloud Elastic Object Storage (EOS)",
},
{
key: "Cloudflare",
name: "Cloudflare R2 Storage",
},
{
key: "DigitalOcean",
name: "DigitalOcean Spaces",
},
{
key: "Dreamhost",
name: "Dreamhost DreamObjects",
},
{
key: "GCS",
name: "Google Cloud Storage",
},
{
key: "HuaweiOBS",
name: "Huawei Object Storage Service",
},
{
key: "IBMCOS",
name: "IBM COS S3",
},
{
key: "IDrive",
name: "IDrive e2",
},
{
key: "IONOS",
name: "IONOS Cloud",
},
{
key: "LyveCloud",
name: "Seagate Lyve Cloud",
},
{
key: "Leviia",
name: "Leviia Object Storage",
},
{
key: "Liara",
name: "Liara Object Storage",
},
{
key: "Linode",
name: "Linode Object Storage",
},
{
key: "Magalu",
name: "Magalu Object Storage",
},
{
key: "Minio",
name: "Minio Object Storage",
},
{
key: "Netease",
name: "Netease Object Storage (NOS)",
},
{
key: "Petabox",
name: "Petabox Object Storage",
},
{
key: "RackCorp",
name: "RackCorp Object Storage",
},
{
key: "Rclone",
name: "Rclone S3 Server",
},
{
key: "Scaleway",
name: "Scaleway Object Storage",
},
{
key: "SeaweedFS",
name: "SeaweedFS S3",
},
{
key: "StackPath",
name: "StackPath Object Storage",
},
{
key: "Storj",
name: "Storj (S3 Compatible Gateway)",
},
{
key: "Synology",
name: "Synology C2 Object Storage",
},
{
key: "TencentCOS",
name: "Tencent Cloud Object Storage (COS)",
},
{
key: "Wasabi",
name: "Wasabi Object Storage",
},
{
key: "Qiniu",
name: "Qiniu Object Storage (Kodo)",
},
{
key: "Other",
name: "Any other S3 compatible provider",
},
];

View File

@@ -35,9 +35,11 @@ import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
import { S3_PROVIDERS } from "./constants";
const updateDestination = z.object({
name: z.string().min(1, "Name is required"),
provider: z.string().optional(),
accessKeyId: z.string(),
secretAccessKey: z.string(),
bucket: z.string(),
@@ -70,6 +72,7 @@ export const UpdateDestination = ({ destinationId }: Props) => {
api.destination.testConnection.useMutation();
const form = useForm<UpdateDestination>({
defaultValues: {
provider: "",
accessKeyId: "",
bucket: "",
name: "",
@@ -152,6 +155,40 @@ export const UpdateDestination = ({ destinationId }: Props) => {
);
}}
/>
<FormField
control={form.control}
name="provider"
render={({ field }) => {
return (
<FormItem>
<FormLabel>Provider</FormLabel>
<FormControl>
<Select
onValueChange={field.onChange}
defaultValue={field.value}
>
<FormControl>
<SelectTrigger>
<SelectValue placeholder="Select a S3 Provider" />
</SelectTrigger>
</FormControl>
<SelectContent>
{S3_PROVIDERS.map((s3Provider) => (
<SelectItem
key={s3Provider.key}
value={s3Provider.key}
>
{s3Provider.name}
</SelectItem>
))}
</SelectContent>
</Select>
</FormControl>
<FormMessage />
</FormItem>
);
}}
/>
<FormField
control={form.control}
@@ -285,6 +322,7 @@ export const UpdateDestination = ({ destinationId }: Props) => {
variant={"secondary"}
onClick={async () => {
await testConnection({
provider: form.getValues("provider") || "",
accessKey: form.getValues("accessKeyId"),
bucket: form.getValues("bucket"),
endpoint: form.getValues("endpoint"),
@@ -311,6 +349,7 @@ export const UpdateDestination = ({ destinationId }: Props) => {
variant="secondary"
onClick={async () => {
await testConnection({
provider: form.getValues("provider") || "",
accessKey: form.getValues("accessKeyId"),
bucket: form.getValues("bucket"),
endpoint: form.getValues("endpoint"),

View File

@@ -397,25 +397,23 @@ export const AddNotification = () => {
)}
{type === "discord" && (
<>
<FormField
control={form.control}
name="webhookUrl"
render={({ field }) => (
<FormItem>
<FormLabel>Webhook URL</FormLabel>
<FormControl>
<Input
placeholder="https://discord.com/api/webhooks/123456789/ABCDEFGHIJKLMNOPQRSTUVWXYZ"
{...field}
/>
</FormControl>
<FormField
control={form.control}
name="webhookUrl"
render={({ field }) => (
<FormItem>
<FormLabel>Webhook URL</FormLabel>
<FormControl>
<Input
placeholder="https://discord.com/api/webhooks/123456789/ABCDEFGHIJKLMNOPQRSTUVWXYZ"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</>
<FormMessage />
</FormItem>
)}
/>
)}
{type === "email" && (

View File

@@ -356,25 +356,23 @@ export const UpdateNotification = ({ notificationId }: Props) => {
)}
{type === "discord" && (
<>
<FormField
control={form.control}
name="webhookUrl"
render={({ field }) => (
<FormItem>
<FormLabel>Webhook URL</FormLabel>
<FormControl>
<Input
placeholder="https://discord.com/api/webhooks/123456789/ABCDEFGHIJKLMNOPQRSTUVWXYZ"
{...field}
/>
</FormControl>
<FormField
control={form.control}
name="webhookUrl"
render={({ field }) => (
<FormItem>
<FormLabel>Webhook URL</FormLabel>
<FormControl>
<Input
placeholder="https://discord.com/api/webhooks/123456789/ABCDEFGHIJKLMNOPQRSTUVWXYZ"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</>
<FormMessage />
</FormItem>
)}
/>
)}
{type === "email" && (
<>

View File

@@ -16,9 +16,11 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
import { generateSHA256Hash } from "@/lib/utils";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { useEffect } from "react";
import { useTranslation } from "next-i18next";
import { useEffect, useMemo, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
@@ -51,6 +53,15 @@ const randomImages = [
export const ProfileForm = () => {
const { data, refetch } = api.auth.get.useQuery();
const { mutateAsync, isLoading } = api.auth.update.useMutation();
const { t } = useTranslation("settings");
const [gravatarHash, setGravatarHash] = useState<string | null>(null);
const availableAvatars = useMemo(() => {
if (gravatarHash === null) return randomImages;
return randomImages.concat([
`https://www.gravatar.com/avatar/${gravatarHash}`,
]);
}, [gravatarHash]);
const form = useForm<Profile>({
defaultValues: {
@@ -68,6 +79,12 @@ export const ProfileForm = () => {
password: "",
image: data?.image || "",
});
if (data.email) {
generateSHA256Hash(data.email).then((hash) => {
setGravatarHash(hash);
});
}
}
form.reset();
}, [form, form.reset, data]);
@@ -91,10 +108,10 @@ export const ProfileForm = () => {
<Card className="bg-transparent">
<CardHeader className="flex flex-row gap-2 flex-wrap justify-between items-center">
<div>
<CardTitle className="text-xl">Account</CardTitle>
<CardDescription>
Change the details of your profile here.
</CardDescription>
<CardTitle className="text-xl">
{t("settings.profile.title")}
</CardTitle>
<CardDescription>{t("settings.profile.description")}</CardDescription>
</div>
{!data?.is2FAEnabled ? <Enable2FA /> : <Disable2FA />}
</CardHeader>
@@ -107,9 +124,12 @@ export const ProfileForm = () => {
name="email"
render={({ field }) => (
<FormItem>
<FormLabel>Email</FormLabel>
<FormLabel>{t("settings.profile.email")}</FormLabel>
<FormControl>
<Input placeholder="Email" {...field} />
<Input
placeholder={t("settings.profile.email")}
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
@@ -120,11 +140,11 @@ export const ProfileForm = () => {
name="password"
render={({ field }) => (
<FormItem>
<FormLabel>Password</FormLabel>
<FormLabel>{t("settings.profile.password")}</FormLabel>
<FormControl>
<Input
type="password"
placeholder="Password"
placeholder={t("settings.profile.password")}
{...field}
value={field.value || ""}
/>
@@ -139,7 +159,7 @@ export const ProfileForm = () => {
name="image"
render={({ field }) => (
<FormItem>
<FormLabel>Avatar</FormLabel>
<FormLabel>{t("settings.profile.avatar")}</FormLabel>
<FormControl>
<RadioGroup
onValueChange={(e) => {
@@ -149,7 +169,7 @@ export const ProfileForm = () => {
value={field.value}
className="flex flex-row flex-wrap gap-2 max-xl:justify-center"
>
{randomImages.map((image) => (
{availableAvatars.map((image) => (
<FormItem key={image}>
<FormLabel className="[&:has([data-state=checked])>img]:border-primary [&:has([data-state=checked])>img]:border-1 [&:has([data-state=checked])>img]:p-px cursor-pointer">
<FormControl>
@@ -177,7 +197,7 @@ export const ProfileForm = () => {
</div>
<div>
<Button type="submit" isLoading={isLoading}>
Save
{t("settings.common.save")}
</Button>
</div>
</form>

View File

@@ -1,6 +1,7 @@
import { Button } from "@/components/ui/button";
import React from "react";
import { UpdateServerIp } from "@/components/dashboard/settings/web-server/update-server-ip";
import {
DropdownMenu,
DropdownMenuContent,
@@ -11,10 +12,13 @@ import {
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { api } from "@/utils/api";
import { useTranslation } from "next-i18next";
import { toast } from "sonner";
import { ShowModalLogs } from "../../web-server/show-modal-logs";
import { GPUSupportModal } from "../gpu-support-modal";
export const ShowDokployActions = () => {
const { t } = useTranslation("settings");
const { mutateAsync: reloadServer, isLoading } =
api.settings.reloadServer.useMutation();
@@ -22,11 +26,13 @@ export const ShowDokployActions = () => {
<DropdownMenu>
<DropdownMenuTrigger asChild disabled={isLoading}>
<Button isLoading={isLoading} variant="outline">
Server
{t("settings.server.webServer.server.label")}
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-56" align="start">
<DropdownMenuLabel>Actions</DropdownMenuLabel>
<DropdownMenuLabel>
{t("settings.server.webServer.actions")}
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem
@@ -39,12 +45,27 @@ export const ShowDokployActions = () => {
toast.success("Server Reloaded");
});
}}
className="cursor-pointer"
>
<span>Reload</span>
<span>{t("settings.server.webServer.reload")}</span>
</DropdownMenuItem>
<ShowModalLogs appName="dokploy">
<span>Watch logs</span>
<DropdownMenuItem
className="cursor-pointer"
onSelect={(e) => e.preventDefault()}
>
{t("settings.server.webServer.watchLogs")}
</DropdownMenuItem>
</ShowModalLogs>
<GPUSupportModal />
<UpdateServerIp>
<DropdownMenuItem
className="cursor-pointer"
onSelect={(e) => e.preventDefault()}
>
{t("settings.server.webServer.updateServerIp")}
</DropdownMenuItem>
</UpdateServerIp>
</DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenu>

View File

@@ -1,4 +1,3 @@
import { CardDescription, CardTitle } from "@/components/ui/card";
import {
Dialog,
DialogContent,
@@ -21,13 +20,13 @@ export const ShowServerActions = ({ serverId }: Props) => {
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<DropdownMenuItem
className="w-full cursor-pointer "
className="w-full cursor-pointer"
onSelect={(e) => e.preventDefault()}
>
View Actions
</DropdownMenuItem>
</DialogTrigger>
<DialogContent className="sm:max-w-xl overflow-y-auto max-h-screen ">
<DialogContent className="sm:max-w-xl overflow-y-auto max-h-screen">
<div className="flex flex-col gap-1">
<DialogTitle className="text-xl">Web server settings</DialogTitle>
<DialogDescription>Reload or clean the web server.</DialogDescription>

View File

@@ -11,12 +11,14 @@ import {
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { api } from "@/utils/api";
import { useTranslation } from "next-i18next";
import { toast } from "sonner";
interface Props {
serverId?: string;
}
export const ShowStorageActions = ({ serverId }: Props) => {
const { t } = useTranslation("settings");
const { mutateAsync: cleanAll, isLoading: cleanAllIsLoading } =
api.settings.cleanAll.useMutation();
@@ -64,11 +66,13 @@ export const ShowStorageActions = ({ serverId }: Props) => {
}
variant="outline"
>
Space
{t("settings.server.webServer.storage.label")}
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-64" align="start">
<DropdownMenuLabel>Actions</DropdownMenuLabel>
<DropdownMenuLabel>
{t("settings.server.webServer.actions")}
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem
@@ -85,7 +89,9 @@ export const ShowStorageActions = ({ serverId }: Props) => {
});
}}
>
<span>Clean unused images</span>
<span>
{t("settings.server.webServer.storage.cleanUnusedImages")}
</span>
</DropdownMenuItem>
<DropdownMenuItem
className="w-full cursor-pointer"
@@ -101,7 +107,9 @@ export const ShowStorageActions = ({ serverId }: Props) => {
});
}}
>
<span>Clean unused volumes</span>
<span>
{t("settings.server.webServer.storage.cleanUnusedVolumes")}
</span>
</DropdownMenuItem>
<DropdownMenuItem
@@ -118,7 +126,9 @@ export const ShowStorageActions = ({ serverId }: Props) => {
});
}}
>
<span>Clean stopped containers</span>
<span>
{t("settings.server.webServer.storage.cleanStoppedContainers")}
</span>
</DropdownMenuItem>
<DropdownMenuItem
@@ -135,7 +145,9 @@ export const ShowStorageActions = ({ serverId }: Props) => {
});
}}
>
<span>Clean Docker Builder & System</span>
<span>
{t("settings.server.webServer.storage.cleanDockerBuilder")}
</span>
</DropdownMenuItem>
{!serverId && (
<DropdownMenuItem
@@ -150,7 +162,9 @@ export const ShowStorageActions = ({ serverId }: Props) => {
});
}}
>
<span>Clean Monitoring </span>
<span>
{t("settings.server.webServer.storage.cleanMonitoring")}
</span>
</DropdownMenuItem>
)}
@@ -168,7 +182,7 @@ export const ShowStorageActions = ({ serverId }: Props) => {
});
}}
>
<span>Clean all</span>
<span>{t("settings.server.webServer.storage.cleanAll")}</span>
</DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>

View File

@@ -23,6 +23,7 @@ import { api } from "@/utils/api";
import { toast } from "sonner";
import { cn } from "@/lib/utils";
import { useTranslation } from "next-i18next";
import { EditTraefikEnv } from "../../web-server/edit-traefik-env";
import { ShowModalLogs } from "../../web-server/show-modal-logs";
@@ -30,6 +31,7 @@ interface Props {
serverId?: string;
}
export const ShowTraefikActions = ({ serverId }: Props) => {
const { t } = useTranslation("settings");
const { mutateAsync: reloadTraefik, isLoading: reloadTraefikIsLoading } =
api.settings.reloadTraefik.useMutation();
@@ -51,11 +53,13 @@ export const ShowTraefikActions = ({ serverId }: Props) => {
isLoading={reloadTraefikIsLoading || toggleDashboardIsLoading}
variant="outline"
>
Traefik
{t("settings.server.webServer.traefik.label")}
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-56" align="start">
<DropdownMenuLabel>Actions</DropdownMenuLabel>
<DropdownMenuLabel>
{t("settings.server.webServer.actions")}
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem
@@ -70,18 +74,24 @@ export const ShowTraefikActions = ({ serverId }: Props) => {
toast.error("Error to reload the traefik");
});
}}
className="cursor-pointer"
>
<span>Reload</span>
<span>{t("settings.server.webServer.reload")}</span>
</DropdownMenuItem>
<ShowModalLogs appName="dokploy-traefik" serverId={serverId}>
<span>Watch logs</span>
<DropdownMenuItem
onSelect={(e) => e.preventDefault()}
className="cursor-pointer"
>
{t("settings.server.webServer.watchLogs")}
</DropdownMenuItem>
</ShowModalLogs>
<EditTraefikEnv serverId={serverId}>
<DropdownMenuItem
onSelect={(e) => e.preventDefault()}
className="w-full cursor-pointer space-x-3"
className="cursor-pointer"
>
<span>Modify Env</span>
<span>{t("settings.server.webServer.traefik.modifyEnv")}</span>
</DropdownMenuItem>
</EditTraefikEnv>

View File

@@ -0,0 +1,36 @@
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { useState } from "react";
import { GPUSupport } from "./gpu-support";
export const GPUSupportModal = () => {
const [isOpen, setIsOpen] = useState(false);
return (
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<DropdownMenuItem
className="w-full cursor-pointer"
onSelect={(e) => e.preventDefault()}
>
<span>GPU Setup</span>
</DropdownMenuItem>
</DialogTrigger>
<DialogContent className="sm:max-w-4xl overflow-y-auto max-h-screen">
<DialogHeader>
<DialogTitle className="flex items-center gap-2">
Dokploy Server GPU Setup
</DialogTitle>
</DialogHeader>
<GPUSupport serverId="" />
</DialogContent>
</Dialog>
);
};

View File

@@ -0,0 +1,282 @@
import { AlertBlock } from "@/components/shared/alert-block";
import { DialogAction } from "@/components/shared/dialog-action";
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { api } from "@/utils/api";
import { TRPCClientError } from "@trpc/client";
import { CheckCircle2, Cpu, Loader2, RefreshCw, XCircle } from "lucide-react";
import { useEffect, useState } from "react";
import { toast } from "sonner";
interface GPUSupportProps {
serverId?: string;
}
export function GPUSupport({ serverId }: GPUSupportProps) {
const [isLoading, setIsLoading] = useState(false);
const [isRefreshing, setIsRefreshing] = useState(false);
const utils = api.useContext();
const {
data: gpuStatus,
isLoading: isChecking,
refetch,
} = api.settings.checkGPUStatus.useQuery(
{ serverId },
{
enabled: serverId !== undefined,
},
);
const setupGPU = api.settings.setupGPU.useMutation({
onMutate: () => {
setIsLoading(true);
},
onSuccess: async () => {
toast.success("GPU support enabled successfully");
setIsLoading(false);
await utils.settings.checkGPUStatus.invalidate({ serverId });
},
onError: (error) => {
toast.error(
error.message ||
"Failed to enable GPU support. Please check server logs.",
);
setIsLoading(false);
},
});
const handleRefresh = async () => {
setIsRefreshing(true);
try {
await utils.settings.checkGPUStatus.invalidate({ serverId });
await refetch();
} catch (error) {
toast.error("Failed to refresh GPU status");
} finally {
setIsRefreshing(false);
}
};
useEffect(() => {
handleRefresh();
}, []);
const handleEnableGPU = async () => {
if (serverId === undefined) {
toast.error("No server selected");
return;
}
try {
await setupGPU.mutateAsync({ serverId });
} catch (error) {
// Error handling is done in mutation's onError
}
};
return (
<CardContent className="p-0">
<div className="flex flex-col gap-4">
<Card className="bg-background">
<CardHeader className="flex flex-row items-center justify-between flex-wrap gap-2">
<div className="flex flex-row gap-2 justify-between w-full items-end max-sm:flex-col">
<div className="flex flex-col gap-1">
<div className="flex items-center gap-2">
<Cpu className="size-5" />
<CardTitle className="text-xl">GPU Configuration</CardTitle>
</div>
<CardDescription>
Configure and monitor GPU support
</CardDescription>
</div>
<div className="flex items-center gap-2">
<DialogAction
title="Enable GPU Support?"
description="This will enable GPU support for Docker Swarm on this server. Make sure you have the required hardware and drivers installed."
onClick={handleEnableGPU}
>
<Button
isLoading={isLoading}
disabled={isLoading || serverId === undefined || isChecking}
>
{isLoading
? "Enabling GPU..."
: gpuStatus?.swarmEnabled
? "Reconfigure GPU"
: "Enable GPU"}
</Button>
</DialogAction>
<Button
size="icon"
onClick={handleRefresh}
disabled={isChecking || isRefreshing}
>
<RefreshCw
className={`h-5 w-5 ${isChecking || isRefreshing ? "animate-spin" : ""}`}
/>
</Button>
</div>
</div>
</CardHeader>
<CardContent className="flex flex-col gap-4">
<AlertBlock type="info">
<div className="font-medium mb-2">System Requirements:</div>
<ul className="list-disc list-inside text-sm space-y-1">
<li>NVIDIA GPU hardware must be physically installed</li>
<li>
NVIDIA drivers must be installed and running (check with
nvidia-smi)
</li>
<li>
NVIDIA Container Runtime must be installed
(nvidia-container-runtime)
</li>
<li>User must have sudo/administrative privileges</li>
<li>System must support CUDA for GPU acceleration</li>
</ul>
</AlertBlock>
{isChecking ? (
<div className="flex items-center justify-center text-muted-foreground py-4">
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
<span>Checking GPU status...</span>
</div>
) : (
<div className="grid gap-4">
{/* Prerequisites Section */}
<div className="border rounded-lg p-4">
<h3 className="text-lg font-semibold mb-1">Prerequisites</h3>
<p className="text-sm text-muted-foreground mb-4">
Shows all software checks and available hardware
</p>
<div className="grid gap-2.5">
<StatusRow
label="NVIDIA Driver"
isEnabled={gpuStatus?.driverInstalled}
description={
gpuStatus?.driverVersion
? `Installed (v${gpuStatus.driverVersion})`
: "Not Installed"
}
/>
<StatusRow
label="GPU Model"
value={gpuStatus?.gpuModel || "Not Detected"}
showIcon={false}
/>
<StatusRow
label="GPU Memory"
value={gpuStatus?.memoryInfo || "Not Available"}
showIcon={false}
/>
<StatusRow
label="Available GPUs"
value={gpuStatus?.availableGPUs || 0}
showIcon={false}
/>
<StatusRow
label="CUDA Support"
isEnabled={gpuStatus?.cudaSupport}
description={
gpuStatus?.cudaVersion
? `Available (v${gpuStatus.cudaVersion})`
: "Not Available"
}
/>
<StatusRow
label="NVIDIA Container Runtime"
isEnabled={gpuStatus?.runtimeInstalled}
description={
gpuStatus?.runtimeInstalled
? "Installed"
: "Not Installed"
}
/>
</div>
</div>
{/* Configuration Status */}
<div className="border rounded-lg p-4">
<h3 className="text-lg font-semibold mb-1">
Docker Swarm GPU Status
</h3>
<p className="text-sm text-muted-foreground mb-4">
Shows the configuration state that changes with the Enable
GPU
</p>
<div className="grid gap-2.5">
<StatusRow
label="Runtime Configuration"
isEnabled={gpuStatus?.runtimeConfigured}
description={
gpuStatus?.runtimeConfigured
? "Default Runtime"
: "Not Default Runtime"
}
/>
<StatusRow
label="Swarm GPU Support"
isEnabled={gpuStatus?.swarmEnabled}
description={
gpuStatus?.swarmEnabled
? `Enabled (${gpuStatus.gpuResources} GPU${gpuStatus.gpuResources !== 1 ? "s" : ""})`
: "Not Enabled"
}
/>
</div>
</div>
</div>
)}
</CardContent>
</Card>
</div>
</CardContent>
);
}
interface StatusRowProps {
label: string;
isEnabled?: boolean;
description?: string;
value?: string | number;
showIcon?: boolean;
}
export function StatusRow({
label,
isEnabled,
description,
value,
showIcon = true,
}: StatusRowProps) {
return (
<div className="flex items-center justify-between">
<span className="text-sm">{label}</span>
<div className="flex items-center gap-2">
{showIcon ? (
<>
{isEnabled ? (
<CheckCircle2 className="size-4 text-green-500" />
) : (
<XCircle className="size-4 text-red-500" />
)}
<span
className={`text-sm ${isEnabled ? "text-green-500" : "text-red-500"}`}
>
{description || (isEnabled ? "Installed" : "Not Installed")}
</span>
</>
) : (
<span className="text-sm text-muted-foreground">{value}</span>
)}
</div>
</div>
);
}

View File

@@ -32,6 +32,7 @@ import Link from "next/link";
import { useState } from "react";
import { toast } from "sonner";
import { ShowDeployment } from "../../application/deployments/show-deployment";
import { GPUSupport } from "./gpu-support";
interface Props {
serverId: string;
@@ -89,9 +90,10 @@ export const SetupServer = ({ serverId }: Props) => {
) : (
<div id="hook-form-add-gitlab" className="grid w-full gap-1">
<Tabs defaultValue="ssh-keys">
<TabsList className="grid grid-cols-2 w-[400px]">
<TabsList className="grid grid-cols-3 w-[400px]">
<TabsTrigger value="ssh-keys">SSH Keys</TabsTrigger>
<TabsTrigger value="deployments">Deployments</TabsTrigger>
<TabsTrigger value="gpu-setup">GPU Setup</TabsTrigger>
</TabsList>
<TabsContent
value="ssh-keys"
@@ -291,6 +293,14 @@ export const SetupServer = ({ serverId }: Props) => {
</div>
</CardContent>
</TabsContent>
<TabsContent
value="gpu-setup"
className="outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0"
>
<div className="flex flex-col gap-2 text-sm text-muted-foreground pt-3">
<GPUSupport serverId={serverId} />
</div>
</TabsContent>
</Tabs>
</div>
)}

View File

@@ -98,7 +98,7 @@ export const ShowServers = () => {
)
)}
{data && data?.length > 0 && (
<div className="flex flex-col gap-6">
<div className="flex flex-col gap-6 overflow-auto">
<Table>
<TableCaption>See all servers</TableCaption>
<TableHeader>
@@ -228,21 +228,17 @@ export const ShowServers = () => {
</DropdownMenuItem>
</DialogAction>
{isActive && (
{isActive && server.sshKeyId && (
<>
{server.sshKeyId && (
<>
<DropdownMenuSeparator />
<DropdownMenuLabel>Extra</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuLabel>Extra</DropdownMenuLabel>
<ShowTraefikFileSystemModal
serverId={server.serverId}
/>
<ShowDockerContainersModal
serverId={server.serverId}
/>
</>
)}
<ShowTraefikFileSystemModal
serverId={server.serverId}
/>
<ShowDockerContainersModal
serverId={server.serverId}
/>
</>
)}
</DropdownMenuContent>

View File

@@ -24,6 +24,7 @@ import {
} from "@/components/ui/select";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { useTranslation } from "next-i18next";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
@@ -49,6 +50,7 @@ const addServerDomain = z
type AddServerDomain = z.infer<typeof addServerDomain>;
export const WebDomain = () => {
const { t } = useTranslation("settings");
const { data: user, refetch } = api.admin.one.useQuery();
const { mutateAsync, isLoading } =
api.settings.assignDomainServer.useMutation();
@@ -89,9 +91,11 @@ export const WebDomain = () => {
<div className="w-full">
<Card className="bg-transparent">
<CardHeader>
<CardTitle className="text-xl">Server Domain</CardTitle>
<CardTitle className="text-xl">
{t("settings.server.domain.title")}
</CardTitle>
<CardDescription>
Add a domain to your server application.
{t("settings.server.domain.description")}
</CardDescription>
</CardHeader>
<CardContent className="flex w-full flex-col gap-4">
@@ -106,7 +110,9 @@ export const WebDomain = () => {
render={({ field }) => {
return (
<FormItem>
<FormLabel>Domain</FormLabel>
<FormLabel>
{t("settings.server.domain.form.domain")}
</FormLabel>
<FormControl>
<Input
className="w-full"
@@ -126,7 +132,9 @@ export const WebDomain = () => {
render={({ field }) => {
return (
<FormItem>
<FormLabel>Letsencrypt Email</FormLabel>
<FormLabel>
{t("settings.server.domain.form.letsEncryptEmail")}
</FormLabel>
<FormControl>
<Input
className="w-full"
@@ -145,20 +153,32 @@ export const WebDomain = () => {
render={({ field }) => {
return (
<FormItem className="md:col-span-2">
<FormLabel>Certificate</FormLabel>
<FormLabel>
{t("settings.server.domain.form.certificate.label")}
</FormLabel>
<Select
onValueChange={field.onChange}
value={field.value}
>
<FormControl>
<SelectTrigger>
<SelectValue placeholder="Select a certificate" />
<SelectValue
placeholder={t(
"settings.server.domain.form.certificate.placeholder",
)}
/>
</SelectTrigger>
</FormControl>
<SelectContent>
<SelectItem value={"none"}>None</SelectItem>
<SelectItem value={"none"}>
{t(
"settings.server.domain.form.certificateOptions.none",
)}
</SelectItem>
<SelectItem value={"letsencrypt"}>
Letsencrypt (Default)
{t(
"settings.server.domain.form.certificateOptions.letsencrypt",
)}
</SelectItem>
</SelectContent>
</Select>
@@ -169,7 +189,7 @@ export const WebDomain = () => {
/>
<div>
<Button isLoading={isLoading} type="submit">
Save
{t("settings.common.save")}
</Button>
</div>
</form>

View File

@@ -7,6 +7,7 @@ import {
} from "@/components/ui/card";
import { cn } from "@/lib/utils";
import { api } from "@/utils/api";
import { useTranslation } from "next-i18next";
import React from "react";
import { ShowDokployActions } from "./servers/actions/show-dokploy-actions";
import { ShowStorageActions } from "./servers/actions/show-storage-actions";
@@ -18,6 +19,7 @@ interface Props {
className?: string;
}
export const WebServer = ({ className }: Props) => {
const { t } = useTranslation("settings");
const { data } = api.admin.one.useQuery();
const { data: dokployVersion } = api.settings.getDokployVersion.useQuery();
@@ -25,8 +27,12 @@ export const WebServer = ({ className }: Props) => {
return (
<Card className={cn("rounded-lg w-full bg-transparent p-0", className)}>
<CardHeader>
<CardTitle className="text-xl">Web server settings</CardTitle>
<CardDescription>Reload or clean the web server.</CardDescription>
<CardTitle className="text-xl">
{t("settings.server.webServer.title")}
</CardTitle>
<CardDescription>
{t("settings.server.webServer.description")}
</CardDescription>
</CardHeader>
<CardContent className="flex flex-col gap-4 ">
<div className="grid md:grid-cols-2 gap-4">

View File

@@ -58,14 +58,7 @@ export const ShowModalLogs = ({ appName, children, serverId }: Props) => {
}, [data]);
return (
<Dialog>
<DialogTrigger asChild>
<DropdownMenuItem
className="w-full cursor-pointer space-x-3"
onSelect={(e) => e.preventDefault()}
>
{children}
</DropdownMenuItem>
</DialogTrigger>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent className="max-h-[85vh] overflow-y-auto sm:max-w-7xl">
<DialogHeader>
<DialogTitle>View Logs</DialogTitle>

View File

@@ -0,0 +1,161 @@
import { AlertBlock } from "@/components/shared/alert-block";
import { CodeEditor } from "@/components/shared/code-editor";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { RefreshCw } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
const schema = z.object({
serverIp: z.string(),
});
type Schema = z.infer<typeof schema>;
interface Props {
children?: React.ReactNode;
serverId?: string;
}
export const UpdateServerIp = ({ children, serverId }: Props) => {
const [isOpen, setIsOpen] = useState(false);
const { data } = api.admin.one.useQuery();
const { data: ip } = api.server.publicIp.useQuery();
const { mutateAsync, isLoading, error, isError } =
api.admin.update.useMutation();
const form = useForm<Schema>({
defaultValues: {
serverIp: data?.serverIp || "",
},
resolver: zodResolver(schema),
});
useEffect(() => {
if (data) {
form.reset({
serverIp: data.serverIp || "",
});
}
}, [form, form.reset, data]);
const utils = api.useUtils();
const setCurrentIp = () => {
if (!ip) return;
form.setValue("serverIp", ip);
};
const onSubmit = async (data: Schema) => {
await mutateAsync({
serverIp: data.serverIp,
})
.then(async () => {
toast.success("Server IP Updated");
await utils.admin.one.invalidate();
setIsOpen(false);
})
.catch(() => {
toast.error("Error to update the IP of the server");
});
};
return (
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Update Server IP</DialogTitle>
<DialogDescription>Update the IP of the server</DialogDescription>
</DialogHeader>
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
<Form {...form}>
<form
id="hook-form-update-server-ip"
onSubmit={form.handleSubmit(onSubmit)}
>
<FormField
control={form.control}
name="serverIp"
render={({ field }) => (
<FormItem>
<FormLabel>Server IP</FormLabel>
<FormControl className="flex gap-2">
<div>
<Input {...field} />
<TooltipProvider delayDuration={0}>
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="secondary"
type="button"
onClick={setCurrentIp}
>
<RefreshCw className="size-4 text-muted-foreground" />
</Button>
</TooltipTrigger>
<TooltipContent
side="left"
sideOffset={5}
className="max-w-[11rem]"
>
<p>Set current public IP</p>
</TooltipContent>
</Tooltip>
</TooltipProvider>
</div>
</FormControl>
<pre>
<FormMessage />
</pre>
</FormItem>
)}
/>
</form>
<DialogFooter>
<Button
isLoading={isLoading}
disabled={isLoading}
form="hook-form-update-server-ip"
type="submit"
>
Update
</Button>
</DialogFooter>
</Form>
</DialogContent>
</Dialog>
);
};

View File

@@ -48,8 +48,8 @@ export const UpdateServer = () => {
<li>Some bug that is blocking to use some features</li>
</ul>
<AlertBlock type="info">
Please we recommend to see the latest version to see if there are
any breaking changes before updating. Go to{" "}
We recommend checking the latest version for any breaking changes
before updating. Go to{" "}
<Link
href="https://github.com/Dokploy/dokploy/releases"
target="_blank"
@@ -87,7 +87,7 @@ export const UpdateServer = () => {
}}
isLoading={isLoading}
>
Check updates
Check Updates
</Button>
)}
</div>

View File

@@ -231,8 +231,8 @@ export const BitbucketIcon = ({ className }: Props) => {
y2="10.814"
gradientUnits="userSpaceOnUse"
>
<stop offset=".18" stop-color="#0052CC" />
<stop offset="1" stop-color="#2684FF" />
<stop offset=".18" stopColor="#0052CC" />
<stop offset="1" stopColor="#2684FF" />
</linearGradient>
</defs>
</svg>

View File

@@ -31,7 +31,7 @@ export const StatusTooltip = ({ status, className }: Props) => {
)}
{status === "done" && (
<div
className={cn("size-3.5 rounded-full bg-primary", className)}
className={cn("size-3.5 rounded-full bg-green-500", className)}
/>
)}
{status === "running" && (

View File

@@ -12,7 +12,7 @@ const buttonVariants = cva(
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive:
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
"bg-destructive text-destructive-foreground hover:bg-destructive/70",
outline:
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
secondary:

View File

@@ -61,7 +61,7 @@ const InputOTPSeparator = React.forwardRef<
React.ElementRef<"div">,
React.ComponentPropsWithoutRef<"div">
>(({ ...props }, ref) => (
<div ref={ref} role="separator" {...props}>
<div ref={ref} {...props}>
<Dot />
</div>
));

View File

@@ -0,0 +1,2 @@
ALTER TABLE "admin" ADD COLUMN "env" text DEFAULT '' NOT NULL;--> statement-breakpoint
ALTER TABLE "project" ADD COLUMN "env" text DEFAULT '' NOT NULL;

View File

@@ -0,0 +1 @@
ALTER TABLE "admin" DROP COLUMN IF EXISTS "env";

View File

@@ -0,0 +1 @@
ALTER TABLE "destination" ADD COLUMN "provider" text;

View File

@@ -0,0 +1 @@
ALTER TABLE "application" ADD COLUMN "registryUrl" text;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -302,6 +302,34 @@
"when": 1729984439862,
"tag": "0042_fancy_havok",
"breakpoints": true
},
{
"idx": 43,
"version": "6",
"when": 1731873965888,
"tag": "0043_closed_naoko",
"breakpoints": true
},
{
"idx": 44,
"version": "6",
"when": 1731875539532,
"tag": "0044_sour_true_believers",
"breakpoints": true
},
{
"idx": 45,
"version": "6",
"when": 1732644181718,
"tag": "0045_smiling_blur",
"breakpoints": true
},
{
"idx": 46,
"version": "6",
"when": 1732851191048,
"tag": "0046_purple_sleeper",
"breakpoints": true
}
]
}

View File

@@ -4,3 +4,11 @@ import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export async function generateSHA256Hash(text: string) {
const encoder = new TextEncoder();
const data = encoder.encode(text);
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
const hashArray = Array.from(new Uint8Array(hashBuffer));
return hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
}

View File

@@ -0,0 +1,10 @@
/** @type {import('next-i18next').UserConfig} */
module.exports = {
i18n: {
defaultLocale: "en",
locales: ["en", "pl", "ru", "fr", "de", "tr", "zh-Hant", "zh-Hans", "fa"],
localeDetection: false,
},
fallbackLng: "en",
keySeparator: false,
};

View File

@@ -1,6 +1,6 @@
{
"name": "dokploy",
"version": "v0.11.0",
"version": "v0.13.1",
"private": true,
"license": "Apache-2.0",
"type": "module",
@@ -11,7 +11,7 @@
"build-next": "next build",
"setup": "tsx -r dotenv/config setup.ts && sleep 5 && pnpm run migration:run",
"reset-password": "node -r dotenv/config dist/reset-password.mjs",
"dev": "tsx -r dotenv/config ./server/server.ts --project tsconfig.server.json ",
"dev": "TURBOPACK=1 tsx -r dotenv/config ./server/server.ts --project tsconfig.server.json ",
"studio": "drizzle-kit studio --config ./server/db/drizzle.config.ts",
"migration:generate": "drizzle-kit generate --config ./server/db/drizzle.config.ts",
"migration:run": "tsx -r dotenv/config migration.ts",
@@ -84,13 +84,16 @@
"dotenv": "16.4.5",
"drizzle-orm": "^0.30.8",
"drizzle-zod": "0.5.1",
"i18next": "^23.16.4",
"input-otp": "^1.2.4",
"js-cookie": "^3.0.5",
"js-yaml": "4.1.0",
"lodash": "4.17.21",
"lucia": "^3.0.1",
"lucide-react": "^0.312.0",
"nanoid": "3",
"next": "^15.0.1",
"next-i18next": "^15.3.1",
"next-themes": "^0.2.1",
"node-pty": "1.0.0",
"node-schedule": "2.1.1",
@@ -100,6 +103,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.49.3",
"react-i18next": "^15.1.0",
"recharts": "^2.12.7",
"slugify": "^1.6.6",
"sonner": "^1.4.0",
@@ -119,6 +123,7 @@
"devDependencies": {
"@types/adm-zip": "^0.5.5",
"@types/bcrypt": "5.0.2",
"@types/js-cookie": "^3.0.6",
"@types/js-yaml": "4.0.9",
"@types/lodash": "4.17.4",
"@types/node": "^18.17.0",

View File

@@ -3,6 +3,7 @@ import "@/styles/globals.css";
import { Toaster } from "@/components/ui/sonner";
import { api } from "@/utils/api";
import type { NextPage } from "next";
import { appWithTranslation } from "next-i18next";
import { ThemeProvider } from "next-themes";
import type { AppProps } from "next/app";
import { Inter } from "next/font/google";
@@ -27,13 +28,14 @@ const MyApp = ({
pageProps: { ...pageProps },
}: AppPropsWithLayout) => {
const getLayout = Component.getLayout ?? ((page) => page);
return (
<>
<style jsx global>{`
:root {
--font-inter: ${inter.style.fontFamily};
}
`}</style>
:root {
--font-inter: ${inter.style.fontFamily};
}
`}</style>
<Head>
<title>Dokploy</title>
</Head>
@@ -59,4 +61,31 @@ const MyApp = ({
);
};
export default api.withTRPC(MyApp);
export default api.withTRPC(
appWithTranslation(
MyApp,
// keep this in sync with next-i18next.config.js
// if you want to know why don't just import the config file, this because next-i18next.config.js must be a CJS, but the rest of the code is ESM.
// Add the config here is due to the issue: https://github.com/i18next/next-i18next/issues/2259
// if one day every page is translated, we can safely remove this config.
{
i18n: {
defaultLocale: "en",
locales: [
"en",
"pl",
"ru",
"fr",
"de",
"tr",
"zh-Hant",
"zh-Hans",
"fa",
],
localeDetection: false,
},
fallbackLng: "en",
keySeparator: false,
},
),
);

View File

@@ -10,137 +10,138 @@ import type { NextApiRequest, NextApiResponse } from "next";
import { extractCommitMessage, extractHash } from "./[refreshToken]";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
req: NextApiRequest,
res: NextApiResponse
) {
const signature = req.headers["x-hub-signature-256"];
const githubBody = req.body;
const signature = req.headers["x-hub-signature-256"];
const githubBody = req.body;
if (!githubBody?.installation?.id) {
res.status(400).json({ message: "Github Installation not found" });
return;
}
if (!githubBody?.installation?.id) {
res.status(400).json({ message: "Github Installation not found" });
return;
}
const githubResult = await db.query.github.findFirst({
where: eq(github.githubInstallationId, githubBody.installation.id),
});
const githubResult = await db.query.github.findFirst({
where: eq(github.githubInstallationId, githubBody.installation.id),
});
if (!githubResult) {
res.status(400).json({ message: "Github Installation not found" });
return;
}
if (!githubResult) {
res.status(400).json({ message: "Github Installation not found" });
return;
}
if (!githubResult.githubWebhookSecret) {
res.status(400).json({ message: "Github Webhook Secret not set" });
return;
}
const webhooks = new Webhooks({
secret: githubResult.githubWebhookSecret,
});
if (!githubResult.githubWebhookSecret) {
res.status(400).json({ message: "Github Webhook Secret not set" });
return;
}
const webhooks = new Webhooks({
secret: githubResult.githubWebhookSecret,
});
const verified = await webhooks.verify(
JSON.stringify(githubBody),
signature as string,
);
const verified = await webhooks.verify(
JSON.stringify(githubBody),
signature as string
);
if (!verified) {
res.status(401).json({ message: "Unauthorized" });
return;
}
if (!verified) {
res.status(401).json({ message: "Unauthorized" });
return;
}
if (req.headers["x-github-event"] === "ping") {
res.status(200).json({ message: "Ping received, webhook is active" });
return;
}
if (req.headers["x-github-event"] === "ping") {
res.status(200).json({ message: "Ping received, webhook is active" });
return;
}
if (req.headers["x-github-event"] !== "push") {
res.status(400).json({ message: "We only accept push events" });
return;
}
if (req.headers["x-github-event"] !== "push") {
res.status(400).json({ message: "We only accept push events" });
return;
}
try {
const branchName = githubBody?.ref?.replace("refs/heads/", "");
const repository = githubBody?.repository?.name;
const deploymentTitle = extractCommitMessage(req.headers, req.body);
const deploymentHash = extractHash(req.headers, req.body);
try {
const branchName = githubBody?.ref?.replace("refs/heads/", "");
const repository = githubBody?.repository?.name;
const deploymentTitle = extractCommitMessage(req.headers, req.body);
const deploymentHash = extractHash(req.headers, req.body);
const apps = await db.query.applications.findMany({
where: and(
eq(applications.sourceType, "github"),
eq(applications.autoDeploy, true),
eq(applications.branch, branchName),
eq(applications.repository, repository),
),
});
const apps = await db.query.applications.findMany({
where: and(
eq(applications.sourceType, "github"),
eq(applications.autoDeploy, true),
eq(applications.branch, branchName),
eq(applications.repository, repository)
),
});
for (const app of apps) {
const jobData: DeploymentJob = {
applicationId: app.applicationId as string,
titleLog: deploymentTitle,
descriptionLog: `Hash: ${deploymentHash}`,
type: "deploy",
applicationType: "application",
server: !!app.serverId,
};
for (const app of apps) {
const jobData: DeploymentJob = {
applicationId: app.applicationId as string,
titleLog: deploymentTitle,
descriptionLog: `Hash: ${deploymentHash}`,
type: "deploy",
applicationType: "application",
server: !!app.serverId,
};
if (IS_CLOUD && app.serverId) {
jobData.serverId = app.serverId;
await deploy(jobData);
return true;
}
await myQueue.add(
"deployments",
{ ...jobData },
{
removeOnComplete: true,
removeOnFail: true,
},
);
}
if (IS_CLOUD && app.serverId) {
jobData.serverId = app.serverId;
await deploy(jobData);
return true;
}
await myQueue.add(
"deployments",
{ ...jobData },
{
removeOnComplete: true,
removeOnFail: true,
}
);
}
const composeApps = await db.query.compose.findMany({
where: and(
eq(compose.sourceType, "github"),
eq(compose.autoDeploy, true),
eq(compose.branch, branchName),
eq(compose.repository, repository),
),
});
const composeApps = await db.query.compose.findMany({
where: and(
eq(compose.sourceType, "github"),
eq(compose.autoDeploy, true),
eq(compose.branch, branchName),
eq(compose.repository, repository)
),
});
for (const composeApp of composeApps) {
const jobData: DeploymentJob = {
composeId: composeApp.composeId as string,
titleLog: deploymentTitle,
type: "deploy",
applicationType: "compose",
descriptionLog: `Hash: ${deploymentHash}`,
};
for (const composeApp of composeApps) {
const jobData: DeploymentJob = {
composeId: composeApp.composeId as string,
titleLog: deploymentTitle,
type: "deploy",
applicationType: "compose",
descriptionLog: `Hash: ${deploymentHash}`,
server: !!composeApp.serverId,
};
if (IS_CLOUD && composeApp.serverId) {
jobData.serverId = composeApp.serverId;
await deploy(jobData);
return true;
}
if (IS_CLOUD && composeApp.serverId) {
jobData.serverId = composeApp.serverId;
await deploy(jobData);
return true;
}
await myQueue.add(
"deployments",
{ ...jobData },
{
removeOnComplete: true,
removeOnFail: true,
},
);
}
await myQueue.add(
"deployments",
{ ...jobData },
{
removeOnComplete: true,
removeOnFail: true,
}
);
}
const totalApps = apps.length + composeApps.length;
const emptyApps = totalApps === 0;
const totalApps = apps.length + composeApps.length;
const emptyApps = totalApps === 0;
if (emptyApps) {
res.status(200).json({ message: "No apps to deploy" });
return;
}
res.status(200).json({ message: `Deployed ${totalApps} apps` });
} catch (error) {
res.status(400).json({ message: "Error To Deploy Application", error });
}
if (emptyApps) {
res.status(200).json({ message: "No apps to deploy" });
return;
}
res.status(200).json({ message: `Deployed ${totalApps} apps` });
} catch (error) {
res.status(400).json({ message: "Error To Deploy Application", error });
}
}

View File

@@ -88,7 +88,6 @@ export default async function handler(
.update(admins)
.set({
stripeSubscriptionId: newSubscription.id,
serversQuantity: 0,
stripeCustomerId: newSubscription.customer as string,
})
.where(eq(admins.stripeCustomerId, newSubscription.customer as string))
@@ -121,12 +120,6 @@ export default async function handler(
}
case "customer.subscription.updated": {
const newSubscription = event.data.object as Stripe.Subscription;
await db
.update(admins)
.set({
serversQuantity: newSubscription?.items?.data?.[0]?.quantity ?? 0,
})
.where(eq(admins.stripeCustomerId, newSubscription.customer as string));
const admin = await findAdminByStripeCustomerId(
newSubscription.customer as string,
@@ -136,8 +129,27 @@ export default async function handler(
return res.status(400).send("Webhook Error: Admin not found");
}
const newServersQuantity = admin.serversQuantity;
await updateServersBasedOnQuantity(admin.adminId, newServersQuantity);
if (newSubscription.status === "active") {
await db
.update(admins)
.set({
serversQuantity: newSubscription?.items?.data?.[0]?.quantity ?? 0,
})
.where(
eq(admins.stripeCustomerId, newSubscription.customer as string),
);
const newServersQuantity = admin.serversQuantity;
await updateServersBasedOnQuantity(admin.adminId, newServersQuantity);
} else {
await disableServers(admin.adminId);
await db
.update(admins)
.set({ serversQuantity: 0 })
.where(
eq(admins.stripeCustomerId, newSubscription.customer as string),
);
}
break;
}
@@ -148,6 +160,13 @@ export default async function handler(
newInvoice.subscription as string,
);
if (suscription.status !== "active") {
console.log(
`Skipping invoice.payment_succeeded for subscription ${suscription.id} with status ${suscription.status}`,
);
break;
}
await db
.update(admins)
.set({
@@ -168,22 +187,29 @@ export default async function handler(
}
case "invoice.payment_failed": {
const newInvoice = event.data.object as Stripe.Invoice;
await db
.update(admins)
.set({
serversQuantity: 0,
})
.where(eq(admins.stripeCustomerId, newInvoice.customer as string));
const admin = await findAdminByStripeCustomerId(
newInvoice.customer as string,
const subscription = await stripe.subscriptions.retrieve(
newInvoice.subscription as string,
);
if (!admin) {
return res.status(400).send("Webhook Error: Admin not found");
if (subscription.status !== "active") {
const admin = await findAdminByStripeCustomerId(
newInvoice.customer as string,
);
if (!admin) {
return res.status(400).send("Webhook Error: Admin not found");
}
await db
.update(admins)
.set({
serversQuantity: 0,
})
.where(eq(admins.stripeCustomerId, newInvoice.customer as string));
await disableServers(admin.adminId);
}
await disableServers(admin.adminId);
break;
}

View File

@@ -2,6 +2,7 @@ import { AddApplication } from "@/components/dashboard/project/add-application";
import { AddCompose } from "@/components/dashboard/project/add-compose";
import { AddDatabase } from "@/components/dashboard/project/add-database";
import { AddTemplate } from "@/components/dashboard/project/add-template";
import { ProjectEnviroment } from "@/components/dashboard/projects/project-enviroment";
import {
MariadbIcon,
MongodbIcon,
@@ -198,27 +199,35 @@ const Project = (
</div>
{(auth?.rol === "admin" || user?.canCreateServices) && (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button>
<PlusIcon className="h-4 w-4" />
Create Service
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-[200px] space-y-2" align="end">
<DropdownMenuLabel className="text-sm font-normal ">
Actions
</DropdownMenuLabel>
<DropdownMenuSeparator />
<AddApplication
projectId={projectId}
projectName={data?.name}
/>
<AddDatabase projectId={projectId} projectName={data?.name} />
<AddCompose projectId={projectId} projectName={data?.name} />
<AddTemplate projectId={projectId} />
</DropdownMenuContent>
</DropdownMenu>
<div className="flex flex-row gap-4 flex-wrap">
<ProjectEnviroment projectId={projectId}>
<Button variant="outline">Project Enviroment</Button>
</ProjectEnviroment>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button>
<PlusIcon className="h-4 w-4" />
Create Service
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent
className="w-[200px] space-y-2"
align="end"
>
<DropdownMenuLabel className="text-sm font-normal ">
Actions
</DropdownMenuLabel>
<DropdownMenuSeparator />
<AddApplication
projectId={projectId}
projectName={data?.name}
/>
<AddDatabase projectId={projectId} projectName={data?.name} />
<AddCompose projectId={projectId} projectName={data?.name} />
<AddTemplate projectId={projectId} />
</DropdownMenuContent>
</DropdownMenu>
</div>
)}
</header>
</div>

View File

@@ -1,18 +1,29 @@
import { ShowProjects } from "@/components/dashboard/projects/show";
import { ShowWelcomeDokploy } from "@/components/dashboard/settings/billing/show-welcome-dokploy";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
import dynamic from "next/dynamic";
import type React from "react";
import type { ReactElement } from "react";
import superjson from "superjson";
const ShowWelcomeDokploy = dynamic(
() =>
import("@/components/dashboard/settings/billing/show-welcome-dokploy").then(
(mod) => mod.ShowWelcomeDokploy,
),
{ ssr: false },
);
const Dashboard = () => {
const { data: isCloud } = api.settings.isCloud.useQuery();
return (
<>
<ShowWelcomeDokploy />
{isCloud && <ShowWelcomeDokploy />}
<ShowProjects />
</>
);

View File

@@ -2,6 +2,7 @@ import { AppearanceForm } from "@/components/dashboard/settings/appearance-form"
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { SettingsLayout } from "@/components/layouts/settings-layout";
import { appRouter } from "@/server/api/root";
import { getLocale, serverSideTranslations } from "@/utils/i18n";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
@@ -30,6 +31,7 @@ export async function getServerSideProps(
) {
const { req, res } = ctx;
const { user, session } = await validateRequest(req, res);
const locale = getLocale(req.cookies);
const helpers = createServerSideHelpers({
router: appRouter,
@@ -63,6 +65,7 @@ export async function getServerSideProps(
return {
props: {
trpcState: helpers.dehydrate(),
...(await serverSideTranslations(locale, ["settings"])),
},
};
}

View File

@@ -4,6 +4,7 @@ import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { SettingsLayout } from "@/components/layouts/settings-layout";
import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
import { getLocale, serverSideTranslations } from "@/utils/i18n";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
@@ -41,6 +42,7 @@ export async function getServerSideProps(
ctx: GetServerSidePropsContext<{ serviceId: string }>,
) {
const { req, res } = ctx;
const locale = getLocale(req.cookies);
const { user, session } = await validateRequest(req, res);
const helpers = createServerSideHelpers({
@@ -75,6 +77,7 @@ export async function getServerSideProps(
return {
props: {
trpcState: helpers.dehydrate(),
...(await serverSideTranslations(locale, ["settings"])),
},
};
}

View File

@@ -3,6 +3,7 @@ import { WebServer } from "@/components/dashboard/settings/web-server";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { SettingsLayout } from "@/components/layouts/settings-layout";
import { appRouter } from "@/server/api/root";
import { getLocale, serverSideTranslations } from "@/utils/i18n";
import { IS_CLOUD, validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
@@ -31,6 +32,7 @@ export async function getServerSideProps(
ctx: GetServerSidePropsContext<{ serviceId: string }>,
) {
const { req, res } = ctx;
const locale = await getLocale(req.cookies);
if (IS_CLOUD) {
return {
redirect: {
@@ -73,6 +75,7 @@ export async function getServerSideProps(
return {
props: {
trpcState: helpers.dehydrate(),
...(await serverSideTranslations(locale, ["settings"])),
},
};
}

View File

@@ -199,7 +199,7 @@ export default function Home({ IS_CLOUD }: Props) {
) : (
<Link
className="hover:underline text-muted-foreground"
href="https://docs.dokploy.com/docs/core/get-started/reset-password"
href="https://docs.dokploy.com/docs/core/reset-password"
target="_blank"
>
Lost your password?

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,44 @@
{
"settings.common.save": "Speichern",
"settings.server.domain.title": "Server-Domain",
"settings.server.domain.description": "Füg eine Domain zu deiner Server-Anwendung hinzu.",
"settings.server.domain.form.domain": "Domain",
"settings.server.domain.form.letsEncryptEmail": "Let's Encrypt E-Mail",
"settings.server.domain.form.certificate.label": "Zertifikat",
"settings.server.domain.form.certificate.placeholder": "Wähl ein Zertifikat aus",
"settings.server.domain.form.certificateOptions.none": "Keins",
"settings.server.domain.form.certificateOptions.letsencrypt": "Let's Encrypt (Standard)",
"settings.server.webServer.title": "Web-Server",
"settings.server.webServer.description": "Lade den Web-Server neu oder reinige ihn.",
"settings.server.webServer.actions": "Aktionen",
"settings.server.webServer.reload": "Neu laden",
"settings.server.webServer.watchLogs": "Logs anschauen",
"settings.server.webServer.updateServerIp": "Server-IP Aktualisieren",
"settings.server.webServer.server.label": "Server",
"settings.server.webServer.traefik.label": "Traefik",
"settings.server.webServer.traefik.modifyEnv": "Umgebungsvariablen ändern",
"settings.server.webServer.storage.label": "Speicherplatz",
"settings.server.webServer.storage.cleanUnusedImages": "Nicht genutzte Bilder löschen",
"settings.server.webServer.storage.cleanUnusedVolumes": "Nicht genutzte Volumes löschen",
"settings.server.webServer.storage.cleanStoppedContainers": "Gestoppte Container löschen",
"settings.server.webServer.storage.cleanDockerBuilder": "Docker Builder & System bereinigen",
"settings.server.webServer.storage.cleanMonitoring": "Monitoring bereinigen",
"settings.server.webServer.storage.cleanAll": "Alles bereinigen",
"settings.profile.title": "Konto",
"settings.profile.description": "Ändere die Details deines Profiles hier.",
"settings.profile.email": "E-Mail",
"settings.profile.password": "Passwort",
"settings.profile.avatar": "Avatar",
"settings.appearance.title": "Aussehen",
"settings.appearance.description": "Pass das Design deines Dashboards an.",
"settings.appearance.theme": "Theme",
"settings.appearance.themeDescription": "Wähl ein Theme für dein Dashboard aus",
"settings.appearance.themes.light": "Hell",
"settings.appearance.themes.dark": "Dunkel",
"settings.appearance.themes.system": "System",
"settings.appearance.language": "Sprache",
"settings.appearance.languageDescription": "Wähl eine Sprache für dein Dashboard aus"
}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,44 @@
{
"settings.common.save": "Save",
"settings.server.domain.title": "Server Domain",
"settings.server.domain.description": "Add a domain to your server application.",
"settings.server.domain.form.domain": "Domain",
"settings.server.domain.form.letsEncryptEmail": "Let's Encrypt Email",
"settings.server.domain.form.certificate.label": "Certificate",
"settings.server.domain.form.certificate.placeholder": "Select a certificate",
"settings.server.domain.form.certificateOptions.none": "None",
"settings.server.domain.form.certificateOptions.letsencrypt": "Let's Encrypt (Default)",
"settings.server.webServer.title": "Web Server",
"settings.server.webServer.description": "Reload or clean the web server.",
"settings.server.webServer.actions": "Actions",
"settings.server.webServer.reload": "Reload",
"settings.server.webServer.watchLogs": "Watch logs",
"settings.server.webServer.updateServerIp": "Update Server IP",
"settings.server.webServer.server.label": "Server",
"settings.server.webServer.traefik.label": "Traefik",
"settings.server.webServer.traefik.modifyEnv": "Modify Env",
"settings.server.webServer.storage.label": "Space",
"settings.server.webServer.storage.cleanUnusedImages": "Clean unused images",
"settings.server.webServer.storage.cleanUnusedVolumes": "Clean unused volumes",
"settings.server.webServer.storage.cleanStoppedContainers": "Clean stopped containers",
"settings.server.webServer.storage.cleanDockerBuilder": "Clean Docker Builder & System",
"settings.server.webServer.storage.cleanMonitoring": "Clean Monitoring",
"settings.server.webServer.storage.cleanAll": "Clean all",
"settings.profile.title": "Account",
"settings.profile.description": "Change the details of your profile here.",
"settings.profile.email": "Email",
"settings.profile.password": "Password",
"settings.profile.avatar": "Avatar",
"settings.appearance.title": "Appearance",
"settings.appearance.description": "Customize the theme of your dashboard.",
"settings.appearance.theme": "Theme",
"settings.appearance.themeDescription": "Select a theme for your dashboard",
"settings.appearance.themes.light": "Light",
"settings.appearance.themes.dark": "Dark",
"settings.appearance.themes.system": "System",
"settings.appearance.language": "Language",
"settings.appearance.languageDescription": "Select a language for your dashboard"
}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,44 @@
{
"settings.common.save": "ذخیره",
"settings.server.domain.title": "دامنه سرور",
"settings.server.domain.description": "یک دامنه به برنامه سرور خود اضافه کنید.",
"settings.server.domain.form.domain": "دامنه",
"settings.server.domain.form.letsEncryptEmail": "ایمیل Let's Encrypt",
"settings.server.domain.form.certificate.label": "گواهینامه",
"settings.server.domain.form.certificate.placeholder": "یک گواهینامه انتخاب کنید",
"settings.server.domain.form.certificateOptions.none": "هیچکدام",
"settings.server.domain.form.certificateOptions.letsencrypt": "Let's Encrypt (پیش‌فرض)",
"settings.server.webServer.title": "وب سرور",
"settings.server.webServer.description": "وب سرور را بازنشانی یا پاک کنید.",
"settings.server.webServer.actions": "اقدامات",
"settings.server.webServer.reload": "بارگذاری مجدد",
"settings.server.webServer.watchLogs": "مشاهده گزارش‌ها",
"settings.server.webServer.updateServerIp": "به‌روزرسانی آی‌پی سرور",
"settings.server.webServer.server.label": "سرور",
"settings.server.webServer.traefik.label": "ترافیک",
"settings.server.webServer.traefik.modifyEnv": "ویرایش محیط",
"settings.server.webServer.storage.label": "فضا",
"settings.server.webServer.storage.cleanUnusedImages": "پاکسازی Image های بدون استفاده",
"settings.server.webServer.storage.cleanUnusedVolumes": "پاک‌سازی ولوم‌های بدون استفاده",
"settings.server.webServer.storage.cleanStoppedContainers": "پاک‌سازی کانتینرهای متوقف‌شده",
"settings.server.webServer.storage.cleanDockerBuilder": "پاک‌سازی بیلدر و سیستم داکر",
"settings.server.webServer.storage.cleanMonitoring": "پاک‌سازی پایش",
"settings.server.webServer.storage.cleanAll": "پاک‌سازی همه",
"settings.profile.title": "حساب کاربری",
"settings.profile.description": "جزئیات پروفایل خود را در اینجا تغییر دهید.",
"settings.profile.email": "ایمیل",
"settings.profile.password": "رمز عبور",
"settings.profile.avatar": "تصویر پروفایل",
"settings.appearance.title": "ظاهر",
"settings.appearance.description": "تم داشبورد خود را سفارشی کنید.",
"settings.appearance.theme": "تم",
"settings.appearance.themeDescription": "یک تم برای داشبورد خود انتخاب کنید",
"settings.appearance.themes.light": "روشن",
"settings.appearance.themes.dark": "تاریک",
"settings.appearance.themes.system": "سیستم",
"settings.appearance.language": "زبان",
"settings.appearance.languageDescription": "یک زبان برای داشبورد خود انتخاب کنید"
}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,44 @@
{
"settings.common.save": "Sauvegarder",
"settings.server.domain.title": "Nom de domaine du serveur",
"settings.server.domain.description": "Ajouter un nom de domaine au serveur de votre application.",
"settings.server.domain.form.domain": "Domaine",
"settings.server.domain.form.letsEncryptEmail": "Adresse email Let's Encrypt",
"settings.server.domain.form.certificate.label": "Certificat",
"settings.server.domain.form.certificate.placeholder": "Choisir un certificat",
"settings.server.domain.form.certificateOptions.none": "Aucun",
"settings.server.domain.form.certificateOptions.letsencrypt": "Let's Encrypt (Par défaut)",
"settings.server.webServer.title": "Serveur web",
"settings.server.webServer.description": "Recharger ou nettoyer le serveur web.",
"settings.server.webServer.actions": "Actions",
"settings.server.webServer.reload": "Recharger",
"settings.server.webServer.watchLogs": "Consulter les logs",
"settings.server.webServer.updateServerIp": "Mettre à jour l'IP du serveur",
"settings.server.webServer.server.label": "Serveur",
"settings.server.webServer.traefik.label": "Traefik",
"settings.server.webServer.traefik.modifyEnv": "Modifier les variables d'environnement",
"settings.server.webServer.storage.label": "Stockage",
"settings.server.webServer.storage.cleanUnusedImages": "Supprimer les images inutilisées",
"settings.server.webServer.storage.cleanUnusedVolumes": "Supprimer les volumes inutilisés",
"settings.server.webServer.storage.cleanStoppedContainers": "Supprimer les conteneurs arrêtés",
"settings.server.webServer.storage.cleanDockerBuilder": "Nettoyer le Docker Builder & System",
"settings.server.webServer.storage.cleanMonitoring": "Nettoyer le monitoring",
"settings.server.webServer.storage.cleanAll": "Tout nettoyer",
"settings.profile.title": "Compte",
"settings.profile.description": "Modifier les informations de votre compte ici.",
"settings.profile.email": "Adresse Email",
"settings.profile.password": "Mot de passe",
"settings.profile.avatar": "Photo de profil",
"settings.appearance.title": "Apparence",
"settings.appearance.description": "Customiser le thème de votre dashboard.",
"settings.appearance.theme": "Thème",
"settings.appearance.themeDescription": "Choisir un thème pour votre dashboard",
"settings.appearance.themes.light": "Clair",
"settings.appearance.themes.dark": "Sombre",
"settings.appearance.themes.system": "Système",
"settings.appearance.language": "Langue",
"settings.appearance.languageDescription": "Sélectionner une langue pour votre dashboard"
}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,44 @@
{
"settings.common.save": "Zapisz",
"settings.server.domain.title": "Domena",
"settings.server.domain.description": "Dodaj domenę do aplikacji",
"settings.server.domain.form.domain": "Domena",
"settings.server.domain.form.letsEncryptEmail": "Email Let's Encrypt",
"settings.server.domain.form.certificate.label": "Certyfikat",
"settings.server.domain.form.certificate.placeholder": "Wybierz certyfikat",
"settings.server.domain.form.certificateOptions.none": "Brak",
"settings.server.domain.form.certificateOptions.letsencrypt": "Let's Encrypt (Domyślny)",
"settings.server.webServer.title": "Serwer",
"settings.server.webServer.description": "Przeładuj lub wyczyść serwer",
"settings.server.webServer.actions": "Akcje",
"settings.server.webServer.reload": "Przeładuj",
"settings.server.webServer.watchLogs": "Obserwuj logi",
"settings.server.webServer.updateServerIp": "Zaktualizuj IP serwera",
"settings.server.webServer.server.label": "Serwer",
"settings.server.webServer.traefik.label": "Traefik",
"settings.server.webServer.traefik.modifyEnv": "Zmodyfikuj środowisko",
"settings.server.webServer.storage.label": "Przestrzeń",
"settings.server.webServer.storage.cleanUnusedImages": "Wyczyść nieużywane obrazy",
"settings.server.webServer.storage.cleanUnusedVolumes": "Wyczyść nieużywane wolumeny",
"settings.server.webServer.storage.cleanStoppedContainers": "Wyczyść zatrzymane kontenery",
"settings.server.webServer.storage.cleanDockerBuilder": "Wyczyść Docker Builder i System",
"settings.server.webServer.storage.cleanMonitoring": "Wyczyść monitorowanie",
"settings.server.webServer.storage.cleanAll": "Wyczyść wszystko",
"settings.profile.title": "Konto",
"settings.profile.description": "Zmień szczegóły swojego profilu",
"settings.profile.email": "Email",
"settings.profile.password": "Hasło",
"settings.profile.avatar": "Avatar",
"settings.appearance.title": "Wygląd",
"settings.appearance.description": "Dostosuj motyw swojego pulpitu",
"settings.appearance.theme": "Motyw",
"settings.appearance.themeDescription": "Wybierz motyw swojego pulpitu",
"settings.appearance.themes.light": "Jasny",
"settings.appearance.themes.dark": "Ciemny",
"settings.appearance.themes.system": "System",
"settings.appearance.language": "Język",
"settings.appearance.languageDescription": "Wybierz język swojego pulpitu"
}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,44 @@
{
"settings.common.save": "Сохранить",
"settings.server.domain.title": "Домен сервера",
"settings.server.domain.description": "Установите домен для вашего серверного приложения Dokploy.",
"settings.server.domain.form.domain": "Домен",
"settings.server.domain.form.letsEncryptEmail": "Email для Let's Encrypt",
"settings.server.domain.form.certificate.label": "Сертификат",
"settings.server.domain.form.certificate.placeholder": "Выберите сертификат",
"settings.server.domain.form.certificateOptions.none": "Нет",
"settings.server.domain.form.certificateOptions.letsencrypt": "Let's Encrypt (По умолчанию)",
"settings.server.webServer.title": "Веб-сервер",
"settings.server.webServer.description": "Перезагрузка или очистка веб-сервера.",
"settings.server.webServer.server.label": "Сервер",
"settings.server.webServer.traefik.label": "Traefik",
"settings.server.webServer.storage.label": "Дисковое пространство",
"settings.server.webServer.actions": "Действия",
"settings.server.webServer.reload": "Перезагрузить",
"settings.server.webServer.watchLogs": "Просмотр логов",
"settings.server.webServer.updateServerIp": "Изменить IP адрес",
"settings.server.webServer.traefik.modifyEnv": "Изменить переменные окружения",
"settings.server.webServer.storage.cleanUnusedImages": "Очистить неиспользуемые образы",
"settings.server.webServer.storage.cleanUnusedVolumes": "Очистить неиспользуемые тома",
"settings.server.webServer.storage.cleanStoppedContainers": "Очистить остановленные контейнеры",
"settings.server.webServer.storage.cleanDockerBuilder": "Очистить Docker Builder и систему",
"settings.server.webServer.storage.cleanMonitoring": "Очистить мониторинг",
"settings.server.webServer.storage.cleanAll": "Очистить все",
"settings.profile.title": "Аккаунт",
"settings.profile.description": "Измените данные вашего профиля.",
"settings.profile.email": "Email",
"settings.profile.password": "Пароль",
"settings.profile.avatar": "Аватар",
"settings.appearance.title": "Внешний вид",
"settings.appearance.description": "Настройте тему Dokploy.",
"settings.appearance.theme": "Тема",
"settings.appearance.themeDescription": "Выберите тему системной панели",
"settings.appearance.themes.light": "Светлая",
"settings.appearance.themes.dark": "Темная",
"settings.appearance.themes.system": "Системная",
"settings.appearance.language": "Язык",
"settings.appearance.languageDescription": "Select a language for your dashboard"
}

View File

@@ -0,0 +1 @@
{}

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