mirror of
https://github.com/Dokploy/website.git
synced 2026-07-03 13:05:26 +02:00
Merge branch 'main' into danielepintore/main
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
---
|
||||
title: Astro SSR
|
||||
description: 部署一个简单的 Astro SSR 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Astro SSR 应用程序。
|
||||
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/astro-ssr`
|
||||
|
||||
2. **添加环境变量**:
|
||||
- 导航到“环境”选项卡并添加以下变量:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
|
||||
3. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
4. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
title: Astro
|
||||
description: 部署一个简单的 Astro 应用程序。
|
||||
---
|
||||
|
||||
此示例将部署一个简单的 Astro 应用程序。
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/astro`
|
||||
|
||||
2. **添加环境变量**:
|
||||
- 导航到“环境”选项卡并添加以下变量:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
|
||||
3. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
4. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
title: Lit
|
||||
description: 部署一个简单的 Lit 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Lit 应用程序。
|
||||
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/lit`
|
||||
|
||||
2. **添加环境变量**:
|
||||
- 导航到“环境”选项卡并添加以下变量:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
|
||||
3. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
4. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: Nest.js
|
||||
description: 部署一个简单的 Nest.js 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Nest.js 应用程序。
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/nestjs`
|
||||
|
||||
2. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
3. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: Next.js
|
||||
description: 部署一个简单的 Next.js 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Next.js 应用程序。
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/nextjs`
|
||||
|
||||
2. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
3. **生成域名**:
|
||||
1. 点击生成域名按钮。
|
||||
2. 将为您生成一个新域名。
|
||||
3. 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Preact
|
||||
description: 部署一个简单的 Preact 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Preact 应用程序。
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/preact`
|
||||
|
||||
2. **添加环境变量**:
|
||||
- 导航到“环境”选项卡,并添加以下变量:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
|
||||
3. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
4. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Qwik
|
||||
description: 部署一个简单的 Qwik 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Qwik 应用程序。
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/qwik`
|
||||
|
||||
2. **添加环境变量**:
|
||||
- 导航到“环境”选项卡,并添加以下变量:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
|
||||
3. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
4. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: Remix
|
||||
description: 部署一个简单的 Remix 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Remix 应用程序。
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/remix`
|
||||
|
||||
2. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
3. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Solid.js
|
||||
description: 部署一个简单的 Solid.js 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Solid.js 应用程序。
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/solidjs`
|
||||
|
||||
2. **添加环境变量**:
|
||||
- 导航到“环境”选项卡并添加以下变量:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run serve"
|
||||
```
|
||||
|
||||
3. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
4. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Svelte
|
||||
description: 部署一个简单的 Svelte 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Svelte 应用程序。
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/svelte`
|
||||
|
||||
2. **添加环境变量**:
|
||||
- 导航到“环境”选项卡并添加以下变量:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
|
||||
3. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
4. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Vite React
|
||||
description: 部署一个简单的 Vite React 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Vite React 应用程序。
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/vite`
|
||||
|
||||
2. **添加环境变量**:
|
||||
- 导航到“环境”选项卡并添加以下变量:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
|
||||
3. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
4. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Vue.js
|
||||
description: 部署一个简单的 Vue.js 应用程序。
|
||||
---
|
||||
|
||||
|
||||
此示例将部署一个简单的 Vue.js 应用程序。
|
||||
|
||||
1. **在您的应用程序中使用 Git 提供商**:
|
||||
- 仓库:`https://github.com/Dokploy/examples.git`
|
||||
- 分支:`main`
|
||||
- 构建路径:`/vuejs`
|
||||
|
||||
2. **添加环境变量**:
|
||||
- 导航到“环境”选项卡并添加以下变量:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
|
||||
3. **点击部署**:
|
||||
- 通过点击部署按钮来部署您的应用程序。
|
||||
|
||||
4. **生成域名**:
|
||||
- 点击生成域名按钮。
|
||||
- 将为您生成一个新域名。
|
||||
- 您可以使用此域名访问您的应用程序。
|
||||
|
||||
如果您需要进一步的帮助,请加入我们的 [Discord 服务器](https://discord.com/invite/2tBnJ3jDJc)。
|
||||
@@ -124,7 +124,8 @@ Configure persistent storage for your application to ensure data remains intact
|
||||
|
||||
**File Mount**: Specifically for single files, useful for configuration files.
|
||||
1. **Content**: The content to store in the file.
|
||||
2. **Mount Path**: Path in the container where the file is placed.
|
||||
2. **File Path**: The name of the file.
|
||||
3. **Mount Path**: Path in the container where the file is placed. **The path must also contain the filename.**
|
||||
|
||||
File mounts are a dokploy features, this create a file in a folder called `files` inside your project, so it recreates every single time you deploy your project.
|
||||
|
||||
|
||||
@@ -50,11 +50,11 @@ Railpack exposes multiple Build Variables, you can define them in the `Environme
|
||||
|
||||
| Name | Description |
|
||||
| :-------------------- | :--------------------------------------------------------------------------------------------------------- |
|
||||
| `BUILD_CMD` | Set the command to run for the build step. This overwrites any commands that come from providers |
|
||||
| `START_CMD` | Set the command to run when the container starts |
|
||||
| `PACKAGES` | Install additional Mise packages. In the format `pkg@version`. The latest version is used if not provided. |
|
||||
| `BUILD_APT_PACKAGES` | Install additional Apt packages during build |
|
||||
| `DEPLOY_APT_PACKAGES` | Install additional Apt packages in the final image |
|
||||
| `RAILPACK_BUILD_CMD` | Set the command to run for the build step. This overwrites any commands that come from providers |
|
||||
| `RAILPACK_START_CMD` | Set the command to run when the container starts |
|
||||
| `RAILPACK_PACKAGES` | Install additional Mise packages. In the format `pkg@version`. The latest version is used if not provided. |
|
||||
| `RAILPACK_BUILD_APT_PACKAGES` | Install additional Apt packages during build |
|
||||
| `RAILPACK_DEPLOY_APT_PACKAGES` | Install additional Apt packages in the final image |
|
||||
|
||||
you can read more about Railpack [here](https://railpack.com/config/environment-variables).
|
||||
|
||||
|
||||
@@ -38,24 +38,20 @@ If you choose the second option, we will proceed to configure the different serv
|
||||
|
||||
To start, we need to configure a Docker registry, as when deploying an application, you need a registry to deploy and download the application image on the other servers.
|
||||
|
||||
We offer two ways to configure a registry:
|
||||
|
||||
1. **External Registry**: Use any registry you want.
|
||||
2. **Self-Hosted Registry**: We create and configure a self-hosted registry for you.
|
||||
|
||||
### External Registry
|
||||
|
||||
You can use any registry, such as Docker Hub, DigitalOcean Spaces, ECR, or your choice. Make sure to enter the correct credentials and test the connection before adding the registry.
|
||||
You can use any external registry of your choice. Here are some popular options:
|
||||
|
||||
### Self-Hosted Registry
|
||||
1. **Docker Hub** - Free tier available, easy to set up
|
||||
2. **GitHub Container Registry (ghcr.io)** - Free for public repositories
|
||||
3. **DigitalOcean Container Registry** - Simple setup with good integration
|
||||
4. **Amazon ECR** - AWS's managed container registry
|
||||
5. **Google Container Registry** - Google Cloud's managed registry
|
||||
6. **Azure Container Registry** - Microsoft's managed registry
|
||||
|
||||
We will ask you for three things:
|
||||
Make sure to enter the correct credentials and test the connection before adding the registry to your cluster configuration.
|
||||
|
||||
1. A user.
|
||||
2. A password.
|
||||
3. A domain. Ensure this domain is pointing to the dokploy VPS.
|
||||
|
||||
Once set up, the Cluster section will be unlocked.
|
||||
Once configured, the Cluster section will be unlocked.
|
||||
|
||||
## Understanding Docker Swarm
|
||||
|
||||
|
||||
@@ -73,6 +73,8 @@ volumes:
|
||||
- "../files/my-configs:/etc/my-app/config" ✅
|
||||
```
|
||||
|
||||
**Important:** If you need to use files from your repository (configuration files, scripts, etc.), you must move them to Dokploy's File Mounts (via Advanced → Mounts) instead of mounting them directly from the repository. When using AutoDeploy, Dokploy performs a `git clone` on each deployment, which clears the repository directory. Mounting files directly from your repository using relative paths (e.g., `./` or `./config/file.conf`) will cause them to be lost or empty in subsequent deployments. See the [Troubleshooting guide](/docs/core/troubleshooting#using-files-from-your-repository) for more details.
|
||||
|
||||
</Callout>
|
||||
|
||||
## Keyboard Shortcuts
|
||||
|
||||
@@ -39,8 +39,13 @@ To switch between modes, follow these steps:
|
||||
Follow the steps in the same order to prevent any issues.
|
||||
</Callout>
|
||||
|
||||
You can create a certificate for your origin server using two methods:
|
||||
- Using Let's Encrypt to generate a certificate for your origin server.
|
||||
- Using Cloudflare's Origin CA to generate a certificate for your origin server.
|
||||
|
||||
We assume that you have enabled the `Full (Strict)` mode in the previous step, is super important to follow the steps in the same order to prevent any issues.
|
||||
|
||||
### Using Let's Encrypt
|
||||
1. Go to cloudflare dashboard and then click on `Account Home` -> Select the Domain.
|
||||
2. On the left side, click `DNS`.
|
||||
3. Click on `Records`.
|
||||
@@ -62,6 +67,35 @@ We assume that you have enabled the `Full (Strict)` mode in the previous step, i
|
||||
19. Wait a few seconds and refresh the application.
|
||||
20. You should see the application running on the domain you just created.
|
||||
|
||||
### Using Cloudflare's Origin CA
|
||||
1. Go to cloudflare dashboard and then click on `Account Home` -> Select the Domain.
|
||||
2. On the left side, click `SSL/TLS`.
|
||||
3. Click on `Origin Server`.
|
||||
4. Click on `Create Certificate`.
|
||||
5. Select `Generate private key and CSR with Cloudflare`.
|
||||
6. Choose the list of hostnames you want the certificate to cover eg. `api.dokploy.com`.
|
||||
7. Choose the validity period eg. `15 years`.
|
||||
8. Click `Create`.
|
||||
9. Using the PEM format, copy the `Origin Certificate` and `Private Key` in the respective fields in the dokploy new certificate panel (Certificates > Add Certificate).
|
||||
10. Go to `Domains` section in your application.
|
||||
11. Click `Create Domain`.
|
||||
12. In the `Host` field, enter the domain name eg. `api.dokploy.com`. (Make sure that the domain is already pointing to your server IP in Cloudflare DNS settings and the **hostname matches the one in the certificate**).
|
||||
13. In the `Path` field, enter the path eg. `/`.
|
||||
14. In the `Container Port` field, enter the port where your application is running eg. `3000`.
|
||||
15. In the `HTTPS` field enable `ON`.
|
||||
16. In the `Certificate` field select `None`.
|
||||
17. Click `Create`.
|
||||
|
||||
Using Cloudflare's Origin CA, you are sure that the certificate will be valid for the next 15 years, or the duration you selected, and you don't have to worry about failed renewals.
|
||||
|
||||
<Callout type="info">
|
||||
You can also create a certificate for wildcards domains eg. `*.dokploy.com` and use it for multiple subdomains.
|
||||
</Callout>
|
||||
|
||||
<Callout type="warn">
|
||||
**Important**: With a free Cloudflare account, this methods work only for the main domain and subdomains, not for sub-subdomains. Eg. `api.dokploy.com` works but `staging.api.dokploy.com` does not work.
|
||||
</Callout>
|
||||
|
||||
|
||||
|
||||
## Assign a Domain Flexible
|
||||
|
||||
@@ -7,6 +7,7 @@ description: "Dokploy has certain goodies that are external that can be used wit
|
||||
2. **Dokploy Oracle infrastructure**: Deploy Dokploy on Oracle infrastructure [Github](https://github.com/statickidz/dokploy-oci-free)
|
||||
3. **Dokploy Deploy Action 1**: Automatic Dokploy deployments on Github [Github](https://github.com/benbristow/dokploy-deploy-action)
|
||||
4. **Dokploy Deploy Action 2**: Automatic Dokploy deployments on Github [Github](https://github.com/jmischler72/dokploy-deploy-action)
|
||||
5. **Dokploy Deploy Action 3**: Automatic Dokploy deployments on Github (Support both `application` and `compose` deployment) [Github](https://github.com/nhridoy/dokploy-deploy-action)
|
||||
5. **Dokploy JS Sdk**: Dokploy JS SDK [Github](https://github.com/quiint/dokploy.js)
|
||||
6. **Templates Collection** : Docker compose collection for Dokploy [Github](https://github.com/benbristow/dokploy-compose-templates)
|
||||
7. **Dokploy Port Updater**: Dokploy Port Updater [Github](https://github.com/clockradios/dokploy-port-updater)
|
||||
|
||||
@@ -133,17 +133,17 @@ install_dokploy() {
|
||||
--env POSTGRES_USER=dokploy \
|
||||
--env POSTGRES_DB=dokploy \
|
||||
--env POSTGRES_PASSWORD=amukds4wi9001583845717ad2 \
|
||||
--mount type=volume,source=dokploy-postgres-database,target=/var/lib/postgresql/data \
|
||||
--mount type=volume,source=dokploy-postgres,target=/var/lib/postgresql/data \
|
||||
postgres:16
|
||||
|
||||
docker service create \
|
||||
--name dokploy-redis \
|
||||
--constraint 'node.role==manager' \
|
||||
--network dokploy-network \
|
||||
--mount type=volume,source=redis-data-volume,target=/data \
|
||||
--mount type=volume,source=dokploy-redis,target=/data \
|
||||
redis:7
|
||||
|
||||
docker pull traefik:v3.5.0
|
||||
docker pull traefik:v3.6.1
|
||||
docker pull dokploy/dokploy:latest
|
||||
|
||||
# Installation
|
||||
@@ -153,7 +153,7 @@ install_dokploy() {
|
||||
--network dokploy-network \
|
||||
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
|
||||
--mount type=bind,source=/etc/dokploy,target=/etc/dokploy \
|
||||
--mount type=volume,source=dokploy-docker-config,target=/root/.docker \
|
||||
--mount type=volume,source=dokploy,target=/root/.docker \
|
||||
--publish published=3000,target=3000,mode=host \
|
||||
--update-parallelism 1 \
|
||||
--update-order stop-first \
|
||||
@@ -167,11 +167,11 @@ install_dokploy() {
|
||||
--restart always \
|
||||
-v /etc/dokploy/traefik/traefik.yml:/etc/traefik/traefik.yml \
|
||||
-v /etc/dokploy/traefik/dynamic:/etc/dokploy/traefik/dynamic \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
-p 80:80/tcp \
|
||||
-p 443:443/tcp \
|
||||
-p 443:443/udp \
|
||||
traefik:v3.5.0
|
||||
traefik:v3.6.1
|
||||
|
||||
docker network connect dokploy-network dokploy-traefik
|
||||
|
||||
@@ -183,11 +183,11 @@ install_dokploy() {
|
||||
# --network dokploy-network \
|
||||
# --mount type=bind,source=/etc/dokploy/traefik/traefik.yml,target=/etc/traefik/traefik.yml \
|
||||
# --mount type=bind,source=/etc/dokploy/traefik/dynamic,target=/etc/dokploy/traefik/dynamic \
|
||||
# --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
|
||||
# --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock,readonly \
|
||||
# --publish mode=host,published=443,target=443 \
|
||||
# --publish mode=host,published=80,target=80 \
|
||||
# --publish mode=host,published=443,target=443,protocol=udp \
|
||||
# traefik:v3.5.0
|
||||
# traefik:v3.6.1
|
||||
|
||||
GREEN="\033[0;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
|
||||
@@ -16,6 +16,10 @@ The server setup process prepares the necessary environment for securely and eff
|
||||
Root access to the server is required. We currently do not support non-root deployments.
|
||||
</Callout>
|
||||
|
||||
<Callout type="warning">
|
||||
If your remote server is configured with a different shell (other than bash), you must configure bash as the default shell, as Dokploy has been developed and tested with bash.
|
||||
</Callout>
|
||||
|
||||
<ImageZoom
|
||||
src="/assets/images/server-deploy.png"
|
||||
alt="Multi-Server Setup"
|
||||
|
||||
@@ -11,6 +11,10 @@ Multi server allows you to deploy your apps remotely to different servers withou
|
||||
|
||||
1. To install Dokploy UI, follow the [installation guide](en/docs/core/get-started/installation).
|
||||
|
||||
<Callout type="warning">
|
||||
If your remote server is configured with a different shell (other than bash), you must configure bash as the default shell, as Dokploy has been developed and tested with bash.
|
||||
</Callout>
|
||||
|
||||
2. Create an SSH key by going to `/dashboard/settings/ssh-keys` and add a new key. Be sure to copy the public key.
|
||||
|
||||
<ImageZoom
|
||||
|
||||
@@ -54,6 +54,46 @@ volumes:
|
||||
- "../files/my-configs:/etc/my-app/config" ✅
|
||||
```
|
||||
|
||||
### Using Files from Your Repository
|
||||
|
||||
<Callout type="warning">
|
||||
If you need to use files from your repository (e.g., configuration files, scripts, or directories), you **must** move them to Dokploy's file mounts and reference them manually using the Dokploy interface. This is because when using AutoDeploy, Dokploy performs a `git clone` operation on each deployment, which clears the repository directory. If you mount files directly from your repository using relative paths like `./` or `./docker/config/odoo.conf`, these files will be lost or empty in subsequent deployments, even though the first deployment may work correctly.
|
||||
</Callout>
|
||||
|
||||
**Why this happens:**
|
||||
- On the first deployment, the files exist and are mounted correctly
|
||||
- On subsequent deployments, Dokploy cleans the directory and performs a fresh `git clone`
|
||||
- Docker loses the reference to the files that were in the filesystem, and the new files have a new reference
|
||||
- This causes mounted directories and files to be empty or missing inside the container
|
||||
|
||||
**Solution:**
|
||||
1. Go to **Advanced** → **Mounts** in your Docker Compose application
|
||||
2. Create a new **File Mount** for each file or directory you need from your repository
|
||||
3. Copy the content from your repository files into the File Mount content field
|
||||
4. Specify the file path for your configuration
|
||||
5. Reference the file mount in your `docker-compose.yml` using the `../files/` path:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- "../files/my-config.json:/etc/my-app/config" ✅
|
||||
- "../files/my-directory:/path/in/container" ✅
|
||||
```
|
||||
|
||||
**Example:**
|
||||
Instead of mounting directly from your repository:
|
||||
```yaml
|
||||
volumes:
|
||||
- ./:/mnt/extra-addons/va_subscription_18 ❌
|
||||
- ./docker/config/odoo.conf:/etc/odoo/odoo.conf ❌
|
||||
```
|
||||
|
||||
Use Dokploy's file mounts:
|
||||
```yaml
|
||||
volumes:
|
||||
- ../files/va_subscription_18:/mnt/extra-addons/va_subscription_18 ✅
|
||||
- ../files/odoo.conf:/etc/odoo/odoo.conf ✅
|
||||
```
|
||||
|
||||
## Logs Not Loading When Deploying to a Remote Server?
|
||||
|
||||
There are a few potential reasons for this:
|
||||
@@ -204,6 +244,10 @@ volumes:
|
||||
- ../files/my-config.json:/etc/my-app/config
|
||||
```
|
||||
|
||||
<Callout type="info">
|
||||
**Important for AutoDeploy users:** If you have configuration files or directories in your repository that you need to mount into your containers, you must copy their content to Dokploy's File Mounts (via Advanced → Mounts) instead of mounting them directly from the repository. This ensures the files persist across deployments, as the repository directory is cleaned and re-cloned on each AutoDeploy.
|
||||
</Callout>
|
||||
|
||||
|
||||
## Failed to initialize Docker Swarm
|
||||
|
||||
@@ -395,7 +439,7 @@ docker service rm dokploy-redis
|
||||
--name dokploy-redis \
|
||||
--constraint 'node.role==manager' \
|
||||
--network dokploy-network \
|
||||
--mount type=volume,source=redis-data-volume,target=/data \
|
||||
--mount type=volume,source=dokploy-redis,target=/data \
|
||||
redis:7
|
||||
```
|
||||
|
||||
@@ -412,7 +456,7 @@ docker service rm dokploy-postgres
|
||||
--env POSTGRES_USER=dokploy \
|
||||
--env POSTGRES_DB=dokploy \
|
||||
--env POSTGRES_PASSWORD=amukds4wi9001583845717ad2 \
|
||||
--mount type=volume,source=dokploy-postgres-database,target=/var/lib/postgresql/data \
|
||||
--mount type=volume,source=dokploy-postgres,target=/var/lib/postgresql/data \
|
||||
postgres:16
|
||||
```
|
||||
|
||||
@@ -428,11 +472,11 @@ docker run -d \
|
||||
--restart always \
|
||||
-v /etc/dokploy/traefik/traefik.yml:/etc/traefik/traefik.yml \
|
||||
-v /etc/dokploy/traefik/dynamic:/etc/dokploy/traefik/dynamic \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
-p 80:80/tcp \
|
||||
-p 443:443/tcp \
|
||||
-p 443:443/udp \
|
||||
traefik:v3.5.0
|
||||
traefik:v3.6.1
|
||||
|
||||
docker network connect dokploy-network dokploy-traefik
|
||||
|
||||
@@ -440,16 +484,17 @@ docker network connect dokploy-network dokploy-traefik
|
||||
docker service rm dokploy-traefik
|
||||
|
||||
# Create a new dokploy-traefik service
|
||||
docker run -d \
|
||||
--name dokploy-traefik \
|
||||
--restart always \
|
||||
-v /etc/dokploy/traefik/traefik.yml:/etc/traefik/traefik.yml \
|
||||
-v /etc/dokploy/traefik/dynamic:/etc/dokploy/traefik/dynamic \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-p 80:80/tcp \
|
||||
-p 443:443/tcp \
|
||||
-p 443:443/udp \
|
||||
traefik:v3.5.0
|
||||
docker service create \
|
||||
--name dokploy-traefik \
|
||||
--constraint 'node.role==manager' \
|
||||
--network dokploy-network \
|
||||
--mount type=bind,source=/etc/dokploy/traefik/traefik.yml,target=/etc/traefik/traefik.yml \
|
||||
--mount type=bind,source=/etc/dokploy/traefik/dynamic,target=/etc/dokploy/traefik/dynamic \
|
||||
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
|
||||
--publish mode=host,published=443,target=443 \
|
||||
--publish mode=host,published=80,target=80 \
|
||||
--publish mode=host,published=443,target=443,protocol=udp \
|
||||
traefik:v3.6.1
|
||||
```
|
||||
|
||||
Remove the dokploy service:
|
||||
@@ -473,7 +518,7 @@ docker service create \
|
||||
--network dokploy-network \
|
||||
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
|
||||
--mount type=bind,source=/etc/dokploy,target=/etc/dokploy \
|
||||
--mount type=volume,source=dokploy-docker-config,target=/root/.docker \
|
||||
--mount type=volume,source=dokploy,target=/root/.docker \
|
||||
--publish published=3000,target=3000,mode=host \
|
||||
--update-parallelism 1 \
|
||||
--update-order stop-first \
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
title: "卸载"
|
||||
description: "了解如何在服务器上卸载 Dokploy"
|
||||
---
|
||||
|
||||
## 卸载步骤
|
||||
|
||||
按照以下步骤从您的服务器中完全删除 Dokploy 及其组件。
|
||||
|
||||
### 第 1 步: 删除 Docker Swarm 服务
|
||||
|
||||
首先,删除 Docker Swarm 中的 Dokploy 以及相关服务:
|
||||
|
||||
```bash
|
||||
docker service rm dokploy dokploy-traefik dokploy-postgres dokploy-redis
|
||||
```
|
||||
|
||||
### 第 2 步: 删除 Docker 挂载卷
|
||||
|
||||
接下来,删除 Dokploy 创建的 Docker 卷:
|
||||
|
||||
```bash
|
||||
docker volume rm -f dokploy-postgres-database redis-data-volume
|
||||
```
|
||||
|
||||
### 第 3 步: 删除 Dokploy 文件
|
||||
|
||||
最后,从服务器上删除 Dokploy 文件和目录:
|
||||
|
||||
```bash
|
||||
sudo rm -rf /etc/dokploy
|
||||
```
|
||||
@@ -12,7 +12,8 @@ Follow these steps to completely remove Dokploy and its components from your ser
|
||||
Remove the docker swarm services created by Dokploy:
|
||||
|
||||
```bash
|
||||
docker service rm dokploy dokploy-traefik dokploy-postgres dokploy-redis
|
||||
docker service remove dokploy dokploy-traefik dokploy-postgres dokploy-redis
|
||||
docker container remove -f dokploy-traefik
|
||||
```
|
||||
|
||||
</Step>
|
||||
@@ -22,7 +23,7 @@ Remove the docker swarm services created by Dokploy:
|
||||
Remove the docker volumes created by Dokploy:
|
||||
|
||||
```bash
|
||||
docker volume rm -f dokploy-postgres-database redis-data-volume
|
||||
docker volume remove -f dokploy dokploy-postgres dokploy-redis
|
||||
```
|
||||
|
||||
</Step>
|
||||
@@ -32,7 +33,21 @@ Remove the docker volumes created by Dokploy:
|
||||
Remove the docker network created by Dokploy:
|
||||
|
||||
```bash
|
||||
docker network rm -f dokploy-network
|
||||
docker network remove -f dokploy-network
|
||||
```
|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
|
||||
Docker cleanup to remove leftovers:
|
||||
|
||||
```bash
|
||||
docker container prune --force
|
||||
docker image prune --all --force
|
||||
docker volume prune --all --force
|
||||
docker builder prune --all --force
|
||||
docker system prune --all --volumes --force
|
||||
```
|
||||
|
||||
</Step>
|
||||
|
||||
Reference in New Issue
Block a user