diff --git a/apps/docs/.gitignore b/apps/docs/.gitignore index 0d548812..55a12ae7 100644 --- a/apps/docs/.gitignore +++ b/apps/docs/.gitignore @@ -3,6 +3,8 @@ # generated content .contentlayer +.content-collections +.source # test & build /coverage @@ -11,9 +13,6 @@ /build *.tsbuildinfo -# bun -bun.lockb - # misc .DS_Store *.pem @@ -22,10 +21,8 @@ bun.lockb npm-debug.log* yarn-debug.log* yarn-error.log* -.idea/* -.idea # others .env*.local .vercel -next-env.d.ts +next-env.d.ts \ No newline at end of file diff --git a/apps/docs/.map.ts b/apps/docs/.map.ts deleted file mode 100644 index bc920492..00000000 --- a/apps/docs/.map.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** Auto-generated **/ -declare const map: Record; - -export { map }; diff --git a/apps/docs/README.md b/apps/docs/README.md index e3ee85e3..a923f4d6 100644 --- a/apps/docs/README.md +++ b/apps/docs/README.md @@ -1,6 +1,7 @@ -# Docs +# docs-v2 -Dokploy Documentation +This is a Next.js application generated with +[Create Fumadocs](https://github.com/fuma-nama/fumadocs). Run development server: @@ -13,3 +14,13 @@ yarn dev ``` Open http://localhost:3000 with your browser to see the result. + +## Learn More + +To learn more about Next.js and Fumadocs, take a look at the following +resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js + features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs diff --git a/apps/docs/api.json b/apps/docs/api.json index 07453802..62e798a0 100644 --- a/apps/docs/api.json +++ b/apps/docs/api.json @@ -3,11 +3,11 @@ "info": { "title": "Dokploy API", "description": "Endpoints for dokploy", - "version": "v0.7.3" + "version": "1.0.0" }, "servers": [ { - "url": "http://localhost:3000/api" + "url": "http://your-dokploy-instance.com/api" } ], "paths": { @@ -251,6 +251,56 @@ "Authorization": [] } ], + "parameters": [ + { + "name": "serverId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/docker.restartContainer": { + "post": { + "operationId": "docker-restartContainer", + "tags": ["docker"], + "security": [ + { + "Authorization": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "containerId": { + "type": "string", + "minLength": 1 + } + }, + "required": ["containerId"], + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -283,6 +333,14 @@ "type": "string", "minLength": 1 } + }, + { + "name": "serverId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -333,6 +391,14 @@ "type": "string", "minLength": 1 } + }, + { + "name": "serverId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -366,6 +432,14 @@ "type": "string", "minLength": 1 } + }, + { + "name": "serverId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -612,6 +686,22 @@ }, "createdAt": { "type": "string" + }, + "resetPasswordToken": { + "type": "string", + "nullable": true + }, + "resetPasswordExpiresAt": { + "type": "string", + "nullable": true + }, + "confirmationToken": { + "type": "string", + "nullable": true + }, + "confirmationExpiresAt": { + "type": "string", + "nullable": true } }, "required": ["email", "password"], @@ -689,9 +779,32 @@ } } }, - "/auth.updateByAdmin": { + "/auth.generate2FASecret": { + "get": { + "operationId": "auth-generate2FASecret", + "tags": ["auth"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/auth.verify2FASetup": { "post": { - "operationId": "auth-updateByAdmin", + "operationId": "auth-verify2FASetup", "tags": ["auth"], "security": [ { @@ -705,41 +818,16 @@ "schema": { "type": "object", "properties": { - "id": { - "type": "string", - "minLength": 1 - }, - "email": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "rol": { + "pin": { "type": "string", - "enum": ["admin", "user"] - }, - "image": { - "type": "string" + "minLength": 6 }, "secret": { "type": "string", - "nullable": true - }, - "token": { - "type": "string", - "nullable": true - }, - "is2FAEnabled": { - "type": "boolean" - }, - "createdAt": { - "type": "string" + "minLength": 1 } }, - "required": ["id", "email", "password"], + "required": ["pin", "secret"], "additionalProperties": false } } @@ -759,15 +847,36 @@ } } }, - "/auth.generate2FASecret": { - "get": { - "operationId": "auth-generate2FASecret", + "/auth.verifyLogin2FA": { + "post": { + "operationId": "auth-verifyLogin2FA", "tags": ["auth"], "security": [ { "Authorization": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "pin": { + "type": "string", + "minLength": 6 + }, + "id": { + "type": "string" + } + }, + "required": ["pin", "id"], + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -782,37 +891,15 @@ } } }, - "/auth.verify2FASetup": { + "/auth.disable2FA": { "post": { - "operationId": "auth-verify2FASetup", + "operationId": "auth-disable2FA", "tags": ["auth"], "security": [ { "Authorization": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "pin": { - "type": "string", - "minLength": 6 - }, - "secret": { - "type": "string", - "minLength": 1 - } - }, - "required": ["pin", "secret"], - "additionalProperties": false - } - } - } - }, "parameters": [], "responses": { "200": { @@ -827,9 +914,9 @@ } } }, - "/auth.verifyLogin2FA": { + "/auth.sendResetPasswordEmail": { "post": { - "operationId": "auth-verifyLogin2FA", + "operationId": "auth-sendResetPasswordEmail", "tags": ["auth"], "security": [ { @@ -843,15 +930,13 @@ "schema": { "type": "object", "properties": { - "pin": { + "email": { "type": "string", - "minLength": 6 - }, - "id": { - "type": "string" + "minLength": 1, + "format": "email" } }, - "required": ["pin", "id"], + "required": ["email"], "additionalProperties": false } } @@ -871,15 +956,37 @@ } } }, - "/auth.disable2FA": { + "/auth.resetPassword": { "post": { - "operationId": "auth-disable2FA", + "operationId": "auth-resetPassword", "tags": ["auth"], "security": [ { "Authorization": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "resetPasswordToken": { + "type": "string", + "minLength": 1 + }, + "password": { + "type": "string", + "minLength": 1 + } + }, + "required": ["resetPasswordToken", "password"], + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -894,15 +1001,33 @@ } } }, - "/auth.verifyToken": { + "/auth.confirmEmail": { "post": { - "operationId": "auth-verifyToken", + "operationId": "auth-confirmEmail", "tags": ["auth"], "security": [ { "Authorization": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "confirmationToken": { + "type": "string", + "minLength": 1 + } + }, + "required": ["confirmationToken"], + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -1137,6 +1262,10 @@ }, "projectId": { "type": "string" + }, + "serverId": { + "type": "string", + "nullable": true } }, "required": ["name", "projectId"], @@ -1479,12 +1608,21 @@ "type": "string", "nullable": true }, + "dockerBuildStage": { + "type": "string", + "nullable": true + }, "publishDirectory": { "type": "string", "nullable": true } }, - "required": ["applicationId", "buildType", "dockerContextPath"], + "required": [ + "applicationId", + "buildType", + "dockerContextPath", + "dockerBuildStage" + ], "additionalProperties": false } } @@ -2031,6 +2169,10 @@ "type": "string", "nullable": true }, + "dockerBuildStage": { + "type": "string", + "nullable": true + }, "dropBuildPath": { "type": "string", "nullable": true @@ -2591,6 +2733,10 @@ }, "databaseRootPassword": { "type": "string" + }, + "serverId": { + "type": "string", + "nullable": true } }, "required": [ @@ -3142,6 +3288,10 @@ "description": { "type": "string", "nullable": true + }, + "serverId": { + "type": "string", + "nullable": true } }, "required": [ @@ -3680,6 +3830,10 @@ "description": { "type": "string", "nullable": true + }, + "serverId": { + "type": "string", + "nullable": true } }, "required": [ @@ -4214,6 +4368,10 @@ }, "databasePassword": { "type": "string" + }, + "serverId": { + "type": "string", + "nullable": true } }, "required": [ @@ -4760,6 +4918,10 @@ }, "databasePassword": { "type": "string" + }, + "serverId": { + "type": "string", + "nullable": true } }, "required": [ @@ -5300,6 +5462,10 @@ }, "appName": { "type": "string" + }, + "serverId": { + "type": "string", + "nullable": true } }, "required": ["name", "projectId"], @@ -5471,6 +5637,12 @@ "type": "string", "minLength": 1 }, + "suffix": { + "type": "string" + }, + "randomize": { + "type": "boolean" + }, "composeStatus": { "type": "string", "enum": ["idle", "running", "done", "error"] @@ -5707,7 +5879,7 @@ "type": "string", "minLength": 1 }, - "prefix": { + "suffix": { "type": "string" } }, @@ -5983,6 +6155,9 @@ "id": { "type": "string", "minLength": 1 + }, + "serverId": { + "type": "string" } }, "required": ["projectId", "id"], @@ -6298,8 +6473,10 @@ "type": "object", "properties": { "appName": { - "type": "string", - "minLength": 1 + "type": "string" + }, + "serverId": { + "type": "string" } }, "required": ["appName"], @@ -6499,6 +6676,9 @@ }, "secretAccessKey": { "type": "string" + }, + "serverId": { + "type": "string" } }, "required": [ @@ -6562,6 +6742,9 @@ }, "secretAccessKey": { "type": "string" + }, + "serverId": { + "type": "string" } }, "required": [ @@ -6723,6 +6906,9 @@ }, "destinationId": { "type": "string" + }, + "serverId": { + "type": "string" } }, "required": [ @@ -7196,6 +7382,39 @@ } } }, + "/deployment.allByServer": { + "get": { + "operationId": "deployment-allByServer", + "tags": ["deployment"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "name": "serverId", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, "/mounts.create": { "post": { "operationId": "mounts-create", @@ -7489,6 +7708,14 @@ "autoRenew": { "type": "boolean", "nullable": true + }, + "adminId": { + "type": "string", + "nullable": true + }, + "serverId": { + "type": "string", + "nullable": true } }, "required": ["name", "certificateData", "privateKey"], @@ -7640,6 +7867,22 @@ "Authorization": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -7672,6 +7915,9 @@ "properties": { "enableDashboard": { "type": "boolean" + }, + "serverId": { + "type": "string" } }, "additionalProperties": false @@ -7702,6 +7948,22 @@ "Authorization": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -7725,6 +7987,22 @@ "Authorization": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -7748,6 +8026,22 @@ "Authorization": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -7771,6 +8065,22 @@ "Authorization": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -7794,6 +8104,22 @@ "Authorization": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -7817,6 +8143,22 @@ "Authorization": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string" + } + }, + "additionalProperties": false + } + } + } + }, "parameters": [], "responses": { "200": { @@ -7910,10 +8252,6 @@ "schema": { "type": "object", "properties": { - "letsEncryptEmail": { - "type": "string", - "nullable": true - }, "host": { "type": "string", "nullable": true @@ -7922,9 +8260,13 @@ "type": "string", "enum": ["letsencrypt", "none"], "default": "none" + }, + "letsEncryptEmail": { + "type": "string", + "nullable": true } }, - "required": ["letsEncryptEmail", "host"], + "required": ["host"], "additionalProperties": false } } @@ -7985,6 +8327,9 @@ "properties": { "enableDockerCleanup": { "type": "boolean" + }, + "serverId": { + "type": "string" } }, "required": ["enableDockerCleanup"], @@ -8277,7 +8622,16 @@ "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "name": "serverId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Successful response", @@ -8314,6 +8668,9 @@ "traefikConfig": { "type": "string", "minLength": 1 + }, + "serverId": { + "type": "string" } }, "required": ["path", "traefikConfig"], @@ -8354,6 +8711,14 @@ "type": "string", "minLength": 1 } + }, + { + "name": "serverId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -8424,7 +8789,16 @@ "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "name": "serverId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Successful response", @@ -8456,6 +8830,9 @@ "properties": { "env": { "type": "string" + }, + "serverId": { + "type": "string" } }, "required": ["env"], @@ -8487,7 +8864,16 @@ "Authorization": [] } ], - "parameters": [], + "parameters": [ + { + "name": "serverId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Successful response", @@ -8501,40 +8887,15 @@ } } }, - "/security.create": { - "post": { - "operationId": "security-create", - "tags": ["security"], + "/settings.readStats": { + "get": { + "operationId": "settings-readStats", + "tags": ["settings"], "security": [ { "Authorization": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "applicationId": { - "type": "string" - }, - "username": { - "type": "string", - "minLength": 1 - }, - "password": { - "type": "string", - "minLength": 1 - } - }, - "required": ["applicationId", "username", "password"], - "additionalProperties": false - } - } - } - }, "parameters": [], "responses": { "200": { @@ -8549,17 +8910,237 @@ } } }, - "/security.one": { + "/settings.getLogRotateStatus": { "get": { - "operationId": "security-one", - "tags": ["security"], + "operationId": "settings-getLogRotateStatus", + "tags": ["settings"], "security": [ { "Authorization": [] } ], - "parameters": [ - { + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/settings.toggleLogRotate": { + "post": { + "operationId": "settings-toggleLogRotate", + "tags": ["settings"], + "security": [ + { + "Authorization": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enable": { + "type": "boolean" + } + }, + "required": ["enable"], + "additionalProperties": false + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/settings.haveActivateRequests": { + "get": { + "operationId": "settings-haveActivateRequests", + "tags": ["settings"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/settings.toggleRequests": { + "post": { + "operationId": "settings-toggleRequests", + "tags": ["settings"], + "security": [ + { + "Authorization": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enable": { + "type": "boolean" + } + }, + "required": ["enable"], + "additionalProperties": false + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/settings.isCloud": { + "get": { + "operationId": "settings-isCloud", + "tags": ["settings"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/settings.health": { + "get": { + "operationId": "settings-health", + "tags": ["settings"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/security.create": { + "post": { + "operationId": "security-create", + "tags": ["security"], + "security": [ + { + "Authorization": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string" + }, + "username": { + "type": "string", + "minLength": 1 + }, + "password": { + "type": "string", + "minLength": 1 + } + }, + "required": ["applicationId", "username", "password"], + "additionalProperties": false + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/security.one": { + "get": { + "operationId": "security-one", + "tags": ["security"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { "name": "securityId", "in": "query", "required": true, @@ -9065,11 +9646,14 @@ }, "registryType": { "type": "string", - "enum": ["selfHosted", "cloud"] + "enum": ["cloud"] }, "imagePrefix": { "type": "string", "nullable": true + }, + "serverId": { + "type": "string" } }, "required": [ @@ -9177,19 +9761,21 @@ "minLength": 1 }, "registryUrl": { - "type": "string", - "minLength": 1 + "type": "string" }, "createdAt": { "type": "string" }, "registryType": { "type": "string", - "enum": ["selfHosted", "cloud"] + "enum": ["cloud"] }, "adminId": { "type": "string", "minLength": 1 + }, + "serverId": { + "type": "string" } }, "required": ["registryId"], @@ -9301,11 +9887,14 @@ }, "registryType": { "type": "string", - "enum": ["selfHosted", "cloud"] + "enum": ["cloud"] }, "imagePrefix": { "type": "string", "nullable": true + }, + "serverId": { + "type": "string" } }, "required": [ @@ -9334,41 +9923,15 @@ } } }, - "/registry.enableSelfHostedRegistry": { - "post": { - "operationId": "registry-enableSelfHostedRegistry", - "tags": ["registry"], + "/cluster.getNodes": { + "get": { + "operationId": "cluster-getNodes", + "tags": ["cluster"], "security": [ { "Authorization": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "registryUrl": { - "type": "string", - "minLength": 1 - }, - "username": { - "type": "string", - "minLength": 1 - }, - "password": { - "type": "string", - "minLength": 1 - } - }, - "required": ["registryUrl", "username", "password"], - "additionalProperties": false - } - } - } - }, "parameters": [], "responses": { "200": { @@ -9383,32 +9946,9 @@ } } }, - "/cluster.getNodes": { - "get": { - "operationId": "cluster-getNodes", - "tags": ["cluster"], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - }, - "default": { - "$ref": "#/components/responses/error" - } - } - } - }, - "/cluster.removeWorker": { - "post": { - "operationId": "cluster-removeWorker", + "/cluster.removeWorker": { + "post": { + "operationId": "cluster-removeWorker", "tags": ["cluster"], "security": [ { @@ -9610,6 +10150,9 @@ }, "slackId": { "type": "string" + }, + "adminId": { + "type": "string" } }, "required": ["notificationId", "slackId"], @@ -9797,6 +10340,9 @@ "telegramId": { "type": "string", "minLength": 1 + }, + "adminId": { + "type": "string" } }, "required": ["notificationId", "telegramId"], @@ -9976,6 +10522,9 @@ "discordId": { "type": "string", "minLength": 1 + }, + "adminId": { + "type": "string" } }, "required": ["notificationId", "discordId"], @@ -10202,6 +10751,9 @@ "emailId": { "type": "string", "minLength": 1 + }, + "adminId": { + "type": "string" } }, "required": ["notificationId", "emailId"], @@ -10414,14 +10966,18 @@ "type": "string", "nullable": true }, - "publicKey": { + "privateKey": { "type": "string" }, - "privateKey": { + "publicKey": { "type": "string" + }, + "adminId": { + "type": "string", + "nullable": true } }, - "required": ["name", "publicKey", "privateKey"], + "required": ["name", "privateKey", "publicKey"], "additionalProperties": false } } @@ -10972,6 +11528,9 @@ "name": { "type": "string", "minLength": 1 + }, + "adminId": { + "type": "string" } }, "required": ["bitbucketId", "gitProviderId", "name"], @@ -11584,6 +12143,416 @@ } } } + }, + "/server.create": { + "post": { + "operationId": "server-create", + "tags": ["server"], + "security": [ + { + "Authorization": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "description": { + "type": "string", + "nullable": true + }, + "ipAddress": { + "type": "string" + }, + "port": { + "type": "number" + }, + "username": { + "type": "string" + }, + "sshKeyId": { + "type": "string", + "nullable": true + } + }, + "required": [ + "name", + "ipAddress", + "port", + "username", + "sshKeyId" + ], + "additionalProperties": false + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/server.one": { + "get": { + "operationId": "server-one", + "tags": ["server"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "name": "serverId", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/server.all": { + "get": { + "operationId": "server-all", + "tags": ["server"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/server.withSSHKey": { + "get": { + "operationId": "server-withSSHKey", + "tags": ["server"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/server.setup": { + "post": { + "operationId": "server-setup", + "tags": ["server"], + "security": [ + { + "Authorization": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string", + "minLength": 1 + } + }, + "required": ["serverId"], + "additionalProperties": false + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/server.remove": { + "post": { + "operationId": "server-remove", + "tags": ["server"], + "security": [ + { + "Authorization": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string", + "minLength": 1 + } + }, + "required": ["serverId"], + "additionalProperties": false + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/server.update": { + "post": { + "operationId": "server-update", + "tags": ["server"], + "security": [ + { + "Authorization": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "description": { + "type": "string", + "nullable": true + }, + "serverId": { + "type": "string", + "minLength": 1 + }, + "ipAddress": { + "type": "string" + }, + "port": { + "type": "number" + }, + "username": { + "type": "string" + }, + "sshKeyId": { + "type": "string", + "nullable": true + } + }, + "required": [ + "name", + "serverId", + "ipAddress", + "port", + "username", + "sshKeyId" + ], + "additionalProperties": false + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/stripe.getProducts": { + "get": { + "operationId": "stripe-getProducts", + "tags": ["stripe"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/stripe.createCheckoutSession": { + "post": { + "operationId": "stripe-createCheckoutSession", + "tags": ["stripe"], + "security": [ + { + "Authorization": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "productId": { + "type": "string" + }, + "serverQuantity": { + "type": "number", + "minimum": 1 + }, + "isAnnual": { + "type": "boolean" + } + }, + "required": ["productId", "serverQuantity", "isAnnual"], + "additionalProperties": false + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/stripe.createCustomerPortalSession": { + "post": { + "operationId": "stripe-createCustomerPortalSession", + "tags": ["stripe"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } + }, + "/stripe.canCreateMoreServers": { + "get": { + "operationId": "stripe-canCreateMoreServers", + "tags": ["stripe"], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": {} + } + }, + "default": { + "$ref": "#/components/responses/error" + } + } + } } }, "components": { @@ -11716,6 +12685,6 @@ } ], "externalDocs": { - "url": "http://localhost:3000/api/settings.getOpenApiDocument" + "url": "http://app.dokploy.com/api/settings.getOpenApiDocument" } } diff --git a/apps/docs/app/[lang]/[[...slug]]/page.tsx b/apps/docs/app/[lang]/[[...slug]]/page.tsx deleted file mode 100644 index 8307d655..00000000 --- a/apps/docs/app/[lang]/[[...slug]]/page.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import { getLanguages, getPage } from "@/app/source"; -import { url, baseUrl } from "@/utils/metadata"; -import { DocsBody, DocsPage } from "fumadocs-ui/page"; -import type { Metadata } from "next"; -import { notFound, permanentRedirect } from "next/navigation"; - -export default async function Page({ - params, -}: { - params: { lang: string; slug?: string[] }; -}) { - const page = getPage(params.slug, params.lang); - - if (page == null) { - permanentRedirect("/docs/core/get-started/introduction"); - } - - const MDX = page.data.exports.default; - - return ( - - -

{page.data.title}

- -
-
- ); -} - -export async function generateStaticParams() { - return getLanguages().flatMap(({ language, pages }) => - pages.map((page) => ({ - lang: language, - slug: page.slugs, - })), - ); -} - -export function generateMetadata({ - params, -}: { - params: { lang: string; slug?: string[] }; -}) { - const page = getPage(params.slug, params.lang); - if (page == null) { - permanentRedirect("/docs/core/get-started/introduction"); - } - return { - title: page.data.title, - - description: page.data.description, - robots: "index,follow", - alternates: { - canonical: new URL(`${baseUrl}${page.url}`).toString(), - languages: { - zh: `${baseUrl}/cn${page.url.replace("/cn", "")}`, - en: `${baseUrl}/en${page.url.replace("/en", "")}`, - }, - }, - openGraph: { - title: page.data.title, - description: page.data.description, - url: new URL(`${baseUrl}`).toString(), - images: [ - { - url: new URL( - `${baseUrl}/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Flogo.7cfd81d9.png&w=828&q=75`, - ).toString(), - width: 1200, - height: 630, - alt: page.data.title, - }, - ], - }, - twitter: { - card: "summary_large_image", - creator: "@getdokploy", - title: page.data.title, - description: page.data.description, - images: [ - { - url: new URL( - `${baseUrl}/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Flogo.7cfd81d9.png&w=828&q=75`, - ).toString(), - width: 1200, - height: 630, - alt: page.data.title, - }, - ], - }, - applicationName: "Dokploy Docs", - keywords: [ - "dokploy", - "vps", - "open source", - "cloud", - "self hosting", - "free", - ], - icons: { - icon: "/icon.svg", - }, - } satisfies Metadata; -} diff --git a/apps/docs/app/[lang]/layout.tsx b/apps/docs/app/[lang]/layout.tsx deleted file mode 100644 index 67583026..00000000 --- a/apps/docs/app/[lang]/layout.tsx +++ /dev/null @@ -1,133 +0,0 @@ -import { RootToggle } from "fumadocs-ui/components/layout/root-toggle"; -import { I18nProvider } from "fumadocs-ui/i18n"; -import { DocsLayout } from "fumadocs-ui/layout"; -import { RootProvider } from "fumadocs-ui/provider"; -import { Inter } from "next/font/google"; -import type { ReactNode } from "react"; -import { baseOptions } from "../layout.config"; -import { pageTree } from "../source"; -import "../global.css"; -import GoogleAnalytics from "@/components/analytics/google"; -import { - LibraryIcon, - type LucideIcon, - PlugZapIcon, - TerminalIcon, -} from "lucide-react"; -import Script from "next/script"; -const inter = Inter({ - subsets: ["latin"], -}); - -interface Mode { - param: string; - name: string; - package: string; - description: string; - icon: LucideIcon; -} - -const modes: Mode[] = [ - { - param: "core/get-started/introduction", - name: "Core", - package: "Dokploy", - description: "The core", - icon: LibraryIcon, - }, - { - param: "cli", - name: "CLI", - package: "fumadocs-ui", - description: "Interactive CLI", - icon: TerminalIcon, - }, - { - param: "api", - name: "API", - package: "fumadocs-mdx", - description: "API Documentation", - icon: PlugZapIcon, - }, -]; - -export default function Layout({ - params, - children, -}: { - params: { lang: string }; - children: ReactNode; -}) { - return ( - -