mirror of
https://github.com/Dokploy/website.git
synced 2026-06-15 20:25:25 +02:00
chore: update documentation and assets for new features
- Enhanced API documentation with new MDX files and improved structure. - Updated OpenAPI specifications to reflect recent changes and added new components. - Refined global CSS and layout configurations for better styling and user experience. - Added various images and icons to enrich the visual aspects of the documentation. - Updated package dependencies to ensure compatibility with the latest features.
This commit is contained in:
26
apps/docs-new/.gitignore
vendored
26
apps/docs-new/.gitignore
vendored
@@ -1,26 +0,0 @@
|
||||
# deps
|
||||
/node_modules
|
||||
|
||||
# generated content
|
||||
.source
|
||||
|
||||
# test & build
|
||||
/coverage
|
||||
/.next/
|
||||
/out/
|
||||
/build
|
||||
*.tsbuildinfo
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
/.pnp
|
||||
.pnp.js
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# others
|
||||
.env*.local
|
||||
.vercel
|
||||
next-env.d.ts
|
||||
@@ -1,121 +0,0 @@
|
||||
# Dokploy Documentation (New)
|
||||
|
||||
This is a fresh Fumadocs project with the complete Dokploy documentation migrated from the old docs project.
|
||||
|
||||
## Features
|
||||
|
||||
- ✨ **Modern Fumadocs Setup** - Built with the latest Fumadocs version
|
||||
- 🎨 **Ocean Theme** - Beautiful ocean-themed UI
|
||||
- 📱 **Responsive Design** - Works perfectly on all devices
|
||||
- 🔍 **Advanced Search** - Built-in search functionality
|
||||
- 🌙 **Dark Mode** - Full dark mode support
|
||||
- 📚 **Complete Documentation** - All docs migrated including:
|
||||
- Core documentation
|
||||
- API references
|
||||
- CLI documentation
|
||||
- Remote Servers section
|
||||
- Examples and tutorials
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Development
|
||||
|
||||
Run the development server:
|
||||
|
||||
```bash
|
||||
# From workspace root
|
||||
pnpm docs-new:dev
|
||||
|
||||
# Or from this directory
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
The site will be available at `http://localhost:3000`
|
||||
|
||||
### Build
|
||||
|
||||
Build the documentation for production:
|
||||
|
||||
```bash
|
||||
# From workspace root
|
||||
pnpm docs-new:build
|
||||
|
||||
# Or from this directory
|
||||
pnpm build
|
||||
```
|
||||
|
||||
### Type Checking
|
||||
|
||||
Run type checking:
|
||||
|
||||
```bash
|
||||
# From workspace root
|
||||
pnpm docs-new:typecheck
|
||||
|
||||
# Or from this directory
|
||||
pnpm run types:check
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
apps/docs-new/
|
||||
├── app/ # Next.js app directory
|
||||
│ ├── (home)/ # Home page
|
||||
│ ├── docs/ # Documentation pages
|
||||
│ │ ├── [[...slug]]/ # Dynamic doc pages
|
||||
│ │ └── layout.tsx # Docs layout
|
||||
│ ├── api/ # API routes
|
||||
│ └── layout.tsx # Root layout
|
||||
├── content/ # MDX documentation content
|
||||
│ └── docs/ # All documentation files
|
||||
├── lib/ # Utilities
|
||||
│ ├── source.ts # Content source configuration
|
||||
│ └── layout.shared.tsx # Shared layout options
|
||||
├── public/ # Static assets
|
||||
└── source.config.ts # Fumadocs configuration
|
||||
```
|
||||
|
||||
## Customization
|
||||
|
||||
### Theme
|
||||
|
||||
The project uses the **Ocean theme**. To change it, edit `app/global.css`:
|
||||
|
||||
```css
|
||||
@import 'fumadocs-ui/css/ocean.css'; /* Change this to another theme */
|
||||
```
|
||||
|
||||
Available themes: `neutral`, `black`, `vitepress`, `dusk`, `catppuccin`, `ocean`, `purple`
|
||||
|
||||
### Layout Configuration
|
||||
|
||||
Edit `lib/layout.shared.tsx` to customize:
|
||||
- Navigation title
|
||||
- Links
|
||||
- GitHub URL
|
||||
- Other layout options
|
||||
|
||||
### Content
|
||||
|
||||
Add or edit documentation in the `content/docs/` directory. The structure follows Fumadocs conventions with `meta.json` files for navigation.
|
||||
|
||||
## Key Differences from Old Docs
|
||||
|
||||
1. **Modern API** - Uses `fumadocs-mdx:collections/server` instead of legacy approach
|
||||
2. **Better Type Safety** - Full TypeScript support with proper types
|
||||
3. **Simpler Configuration** - Less boilerplate, more conventions
|
||||
4. **Built-in Features** - Search, OG images, and more work out of the box
|
||||
5. **No Build Errors** - Clean slate without legacy issues
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Fumadocs Documentation](https://fumadocs.dev)
|
||||
- [Fumadocs Themes](https://fumadocs.dev/docs/ui/theme)
|
||||
- [Fumadocs Layouts](https://fumadocs.dev/docs/ui/blocks/layout)
|
||||
|
||||
## Notes
|
||||
|
||||
- The `.source` directory is auto-generated - don't edit it manually
|
||||
- Run `pnpm run postinstall` after making changes to content structure
|
||||
- Restart dev server after adding new MDX files
|
||||
@@ -1,7 +0,0 @@
|
||||
import { source } from '@/lib/source';
|
||||
import { createFromSource } from 'fumadocs-core/search/server';
|
||||
|
||||
export const { GET } = createFromSource(source, {
|
||||
// https://docs.orama.com/docs/orama-js/supported-languages
|
||||
language: 'english',
|
||||
});
|
||||
@@ -1,54 +0,0 @@
|
||||
import { getPageImage, source } from '@/lib/source';
|
||||
import {
|
||||
DocsBody,
|
||||
DocsDescription,
|
||||
DocsPage,
|
||||
DocsTitle,
|
||||
} from 'fumadocs-ui/layouts/docs/page';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { getMDXComponents } from '@/mdx-components';
|
||||
import type { Metadata } from 'next';
|
||||
import { createRelativeLink } from 'fumadocs-ui/mdx';
|
||||
|
||||
export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
|
||||
const params = await props.params;
|
||||
const page = source.getPage(params.slug);
|
||||
if (!page) notFound();
|
||||
|
||||
const MDX = page.data.body;
|
||||
|
||||
return (
|
||||
<DocsPage toc={page.data.toc} full={page.data.full}>
|
||||
<DocsTitle>{page.data.title}</DocsTitle>
|
||||
<DocsDescription>{page.data.description}</DocsDescription>
|
||||
<DocsBody>
|
||||
<MDX
|
||||
components={getMDXComponents({
|
||||
// this allows you to link to other pages with relative file paths
|
||||
a: createRelativeLink(source, page),
|
||||
})}
|
||||
/>
|
||||
</DocsBody>
|
||||
</DocsPage>
|
||||
);
|
||||
}
|
||||
|
||||
export async function generateStaticParams() {
|
||||
return source.generateParams();
|
||||
}
|
||||
|
||||
export async function generateMetadata(
|
||||
props: PageProps<'/docs/[[...slug]]'>,
|
||||
): Promise<Metadata> {
|
||||
const params = await props.params;
|
||||
const page = source.getPage(params.slug);
|
||||
if (!page) notFound();
|
||||
|
||||
return {
|
||||
title: page.data.title,
|
||||
description: page.data.description,
|
||||
openGraph: {
|
||||
images: getPageImage(page).url,
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import { source } from '@/lib/source';
|
||||
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
|
||||
import { baseOptions } from '@/lib/layout.shared';
|
||||
|
||||
export default function Layout({ children }: LayoutProps<'/docs'>) {
|
||||
return (
|
||||
<DocsLayout tree={source.pageTree} {...baseOptions()}>
|
||||
{children}
|
||||
</DocsLayout>
|
||||
);
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
@import 'tailwindcss';
|
||||
@import 'fumadocs-ui/css/solar.css';
|
||||
@import 'fumadocs-ui/css/preset.css';
|
||||
@import 'fumadocs-openapi/css/preset.css';
|
||||
@import "tw-animate-css";
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
@theme inline {
|
||||
--radius-sm: calc(var(--radius) - 4px);
|
||||
--radius-md: calc(var(--radius) - 2px);
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) + 4px);
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--color-card: var(--card);
|
||||
--color-card-foreground: var(--card-foreground);
|
||||
--color-popover: var(--popover);
|
||||
--color-popover-foreground: var(--popover-foreground);
|
||||
--color-primary: var(--primary);
|
||||
--color-primary-foreground: var(--primary-foreground);
|
||||
--color-secondary: var(--secondary);
|
||||
--color-secondary-foreground: var(--secondary-foreground);
|
||||
--color-muted: var(--muted);
|
||||
--color-muted-foreground: var(--muted-foreground);
|
||||
--color-accent: var(--accent);
|
||||
--color-accent-foreground: var(--accent-foreground);
|
||||
--color-destructive: var(--destructive);
|
||||
--color-border: var(--border);
|
||||
--color-input: var(--input);
|
||||
--color-ring: var(--ring);
|
||||
--color-chart-1: var(--chart-1);
|
||||
--color-chart-2: var(--chart-2);
|
||||
--color-chart-3: var(--chart-3);
|
||||
--color-chart-4: var(--chart-4);
|
||||
--color-chart-5: var(--chart-5);
|
||||
--color-sidebar: var(--sidebar);
|
||||
--color-sidebar-foreground: var(--sidebar-foreground);
|
||||
--color-sidebar-primary: var(--sidebar-primary);
|
||||
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||||
--color-sidebar-accent: var(--sidebar-accent);
|
||||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||
--color-sidebar-border: var(--sidebar-border);
|
||||
--color-sidebar-ring: var(--sidebar-ring);
|
||||
}
|
||||
|
||||
:root {
|
||||
--radius: 0.625rem;
|
||||
--background: oklch(1 0 0);
|
||||
--foreground: oklch(0.145 0 0);
|
||||
--card: oklch(1 0 0);
|
||||
--card-foreground: oklch(0.145 0 0);
|
||||
--popover: oklch(1 0 0);
|
||||
--popover-foreground: oklch(0.145 0 0);
|
||||
--primary: oklch(0.205 0 0);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--secondary: oklch(0.97 0 0);
|
||||
--secondary-foreground: oklch(0.205 0 0);
|
||||
--muted: oklch(0.97 0 0);
|
||||
--muted-foreground: oklch(0.556 0 0);
|
||||
--accent: oklch(0.97 0 0);
|
||||
--accent-foreground: oklch(0.205 0 0);
|
||||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--border: oklch(0.922 0 0);
|
||||
--input: oklch(0.922 0 0);
|
||||
--ring: oklch(0.708 0 0);
|
||||
--chart-1: oklch(0.646 0.222 41.116);
|
||||
--chart-2: oklch(0.6 0.118 184.704);
|
||||
--chart-3: oklch(0.398 0.07 227.392);
|
||||
--chart-4: oklch(0.828 0.189 84.429);
|
||||
--chart-5: oklch(0.769 0.188 70.08);
|
||||
--sidebar: oklch(0.985 0 0);
|
||||
--sidebar-foreground: oklch(0.145 0 0);
|
||||
--sidebar-primary: oklch(0.205 0 0);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
--sidebar-accent: oklch(0.97 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.205 0 0);
|
||||
--sidebar-border: oklch(0.922 0 0);
|
||||
--sidebar-ring: oklch(0.708 0 0);
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: oklch(0.145 0 0);
|
||||
--foreground: oklch(0.985 0 0);
|
||||
--card: oklch(0.205 0 0);
|
||||
--card-foreground: oklch(0.985 0 0);
|
||||
--popover: oklch(0.205 0 0);
|
||||
--popover-foreground: oklch(0.985 0 0);
|
||||
--primary: oklch(0.922 0 0);
|
||||
--primary-foreground: oklch(0.205 0 0);
|
||||
--secondary: oklch(0.269 0 0);
|
||||
--secondary-foreground: oklch(0.985 0 0);
|
||||
--muted: oklch(0.269 0 0);
|
||||
--muted-foreground: oklch(0.708 0 0);
|
||||
--accent: oklch(0.269 0 0);
|
||||
--accent-foreground: oklch(0.985 0 0);
|
||||
--destructive: oklch(0.704 0.191 22.216);
|
||||
--border: oklch(1 0 0 / 10%);
|
||||
--input: oklch(1 0 0 / 15%);
|
||||
--ring: oklch(0.556 0 0);
|
||||
--chart-1: oklch(0.488 0.243 264.376);
|
||||
--chart-2: oklch(0.696 0.17 162.48);
|
||||
--chart-3: oklch(0.769 0.188 70.08);
|
||||
--chart-4: oklch(0.627 0.265 303.9);
|
||||
--chart-5: oklch(0.645 0.246 16.439);
|
||||
--sidebar: oklch(0.205 0 0);
|
||||
--sidebar-foreground: oklch(0.985 0 0);
|
||||
--sidebar-primary: oklch(0.488 0.243 264.376);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
--sidebar-accent: oklch(0.269 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.985 0 0);
|
||||
--sidebar-border: oklch(1 0 0 / 10%);
|
||||
--sidebar-ring: oklch(0.556 0 0);
|
||||
}
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border outline-ring/50;
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
<svg width="6323" height="5778" viewBox="0 0 6323 5778" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4638.51 44.5295C4616.52 81.8286 4611.45 115.575 4619.9 213.263C4636.82 433.505 4772.12 710.584 4924.33 842.019C5002.12 909.512 5196.61 1012.53 5245.66 1012.53C5284.56 1012.53 5282.87 1019.63 5213.53 1129.75C5140.8 1243.43 5024.11 1339.34 4890.5 1389.07C4743.36 1445.91 4455.85 1453.01 4234.3 1405.06C4016.13 1357.1 3931.57 1323.35 3211.11 977.006C2265.71 522.312 2253.87 516.984 2125.34 481.461C2017.1 451.267 1917.32 445.938 1316.93 435.281C853.533 428.177 601.539 429.953 538.964 444.162C334.325 485.013 156.745 632.434 70.4925 829.586C12.9907 961.021 -7.30411 1191.92 2.84328 1589.78C7.91697 1841.99 16.3731 1911.26 46.8153 2005.39C114.465 2213.2 226.086 2342.86 422.269 2445.88C1594.29 3055.1 1969.74 3206.07 2529.54 3294.88C2732.49 3326.85 3258.46 3330.4 3459.72 3303.76C3755.69 3261.13 4107.46 3161.66 4403.43 3033.78C4540.42 2975.17 4904.03 2776.24 5220.29 2587.97C5910.31 2177.68 6006.71 2111.96 6037.16 2030.26C6070.98 1934.35 5988.11 1811.79 5888.33 1811.79C5851.12 1811.79 5862.96 1806.47 5426.62 2069.34C4352.69 2715.85 4026.28 2865.05 3485.09 2957.41C3162.06 3014.24 2587.04 2987.6 2274.17 2902.35C1924.08 2806.44 1839.52 2770.91 1051.41 2383.71C552.493 2140.38 444.255 2079.99 395.209 2023.16C363.076 1984.08 336.016 1945.01 336.016 1934.35C336.016 1920.14 467.932 1916.59 787.575 1921.92L1240.82 1929.02L1435.32 2001.84C1541.86 2040.92 1744.81 2126.17 1883.49 2190.11C2296.15 2381.94 2610.72 2451.21 3058.9 2451.21C3490.16 2451.21 3872.38 2374.83 4305.33 2198.99C4910.8 1955.66 5342.06 1596.88 5545.01 1172.38C5565.3 1127.98 5585.6 1090.68 5587.29 1087.13C5590.67 1083.57 5660.01 1074.69 5742.88 1065.81C5940.76 1046.28 6084.51 978.782 6221.5 842.019L6322.97 740.779V520.536V302.071L6253.63 353.579C6177.53 412.192 6062.52 444.162 5920.46 444.162C5795.31 444.162 5661.7 508.104 5568.69 614.672L5497.65 692.823L5487.51 646.643C5451.99 500.999 5304.85 364.236 5115.44 300.294C4956.46 248.786 4893.88 206.159 4831.31 108.471C4800.87 64.0671 4770.42 21.4395 4760.28 14.335C4721.38 -14.0833 4665.57 1.90186 4638.51 44.5295ZM2057.69 806.496C2162.55 834.914 2250.49 873.99 2517.7 1007.2C2605.65 1051.6 2796.76 1142.19 2940.51 1211.46C3084.27 1280.73 3332.88 1397.95 3490.16 1472.55C3948.49 1691.02 4049.96 1726.54 4301.95 1754.96L4437.25 1770.94L4310.41 1833.11C4153.12 1911.26 4016.13 1960.99 3804.73 2016.05C3512.15 2090.65 3402.22 2104.86 3050.44 2104.86C2590.43 2103.08 2370.57 2056.9 1974.82 1872.18C1413.33 1611.09 1386.27 1603.99 801.104 1589.78C457.784 1580.9 356.311 1572.01 336.016 1552.48C278.514 1492.09 303.882 1019.63 373.223 914.841C412.121 854.452 474.697 806.496 552.493 779.854C577.862 770.973 904.27 767.421 1278.03 772.749C1814.15 778.078 1978.2 785.182 2057.69 806.496Z" fill="white"/>
|
||||
<path d="M1266.2 1060.49C1173.18 1097.79 1129.21 1207.91 1171.49 1294.94C1222.22 1394.4 1332.15 1417.49 1413.33 1342.89C1477.6 1286.06 1479.29 1174.16 1418.41 1112C1374.44 1065.82 1308.48 1042.73 1266.2 1060.49Z" fill="white"/>
|
||||
<path d="M87.4063 2513.37C7.91846 2548.89 -8.99385 2616.39 4.536 2836.63C19.7571 3072.86 46.8168 3222.05 124.613 3488.48C427.344 4532.85 1129.2 5287.71 2106.74 5623.4C2641.17 5806.35 3236.48 5827.66 3752.3 5682.01C4596.23 5445.79 5315 4836.57 5692.15 4040.86C5886.64 3630.57 6018.55 3111.93 6018.55 2753.15C6018.55 2582.64 5991.49 2518.7 5910.31 2497.39C5820.68 2474.3 5575.45 2609.28 5164.48 2911.23C4484.61 3410.32 4229.23 3563.07 3890.98 3676.75C3635.61 3763.78 3466.49 3797.52 3194.2 3818.84C2651.31 3863.24 2057.69 3731.81 1570.62 3458.28C1394.73 3358.82 846.769 2980.5 581.246 2772.69C285.28 2540.01 270.059 2529.36 199.028 2508.04C155.056 2495.61 124.613 2497.39 87.4063 2513.37ZM5678.62 3076.41C5661.7 3138.57 5646.48 3202.52 5646.48 3218.5C5646.48 3236.26 5626.19 3262.9 5600.82 3280.67C5573.76 3296.65 5482.43 3371.25 5396.18 3445.85C5308.24 3518.67 5198.31 3611.03 5150.95 3650.1C5101.91 3689.18 4990.28 3781.54 4902.34 3856.14C4699.39 4026.65 4406.81 4236.23 4242.76 4330.37C4085.48 4420.95 3767.52 4532.85 3532.44 4582.58C2847.5 4724.67 2054.31 4570.15 1516.5 4190.05C1173.18 3946.72 412.123 3314.41 388.445 3254.02C363.077 3182.98 330.944 3042.66 337.708 3021.35C341.091 3012.47 417.196 3060.42 505.14 3129.69C1056.48 3559.52 1563.85 3863.24 1942.69 3992.9C2328.29 4124.34 2565.06 4163.41 2991.25 4163.41C3380.23 4163.41 3628.84 4126.11 3963.71 4012.44C4345.93 3884.56 4531.96 3781.54 5052.86 3405C5391.11 3161.66 5676.92 2968.06 5700.6 2966.29C5705.68 2966.29 5697.22 3016.02 5678.62 3076.41ZM5426.62 3881C5426.62 3886.33 5409.71 3925.41 5391.11 3966.26C5318.38 4115.45 5144.19 4364.11 5003.81 4518.64C4587.77 4973.33 4090.55 5271.73 3540.9 5392.5C3309.2 5444.01 2708.81 5440.46 2483.88 5387.17C1716.06 5204.23 1105.53 4754.87 696.249 4071.05C647.204 3987.57 609.997 3916.53 613.379 3912.97C616.762 3909.42 774.046 4028.42 965.155 4177.62C1154.57 4326.82 1371.05 4486.67 1443.77 4532.85C1974.82 4863.21 2463.59 4991.09 3118.09 4968C3461.41 4955.57 3691.42 4912.94 3997.53 4806.38C4357.76 4680.27 4623.29 4513.31 5130.66 4095.92C5382.65 3888.11 5426.62 3856.14 5426.62 3881Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.0 KiB |
@@ -1,35 +0,0 @@
|
||||
import { RootProvider } from 'fumadocs-ui/provider/next';
|
||||
import './global.css';
|
||||
import { Inter } from 'next/font/google';
|
||||
import type { Metadata } from 'next';
|
||||
import { GoogleAnalytics } from '@next/third-parties/google';
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ['latin'],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
default: 'Dokploy Documentation',
|
||||
template: '%s | Dokploy',
|
||||
},
|
||||
description: 'Open Source Alternative to Vercel, Netlify and Heroku. Deploy your applications with ease.',
|
||||
keywords: ['dokploy', 'deployment', 'docker', 'hosting', 'devops', 'open source'],
|
||||
authors: [{ name: 'Dokploy Team' }],
|
||||
openGraph: {
|
||||
title: 'Dokploy Documentation',
|
||||
description: 'Open Source Alternative to Vercel, Netlify and Heroku',
|
||||
type: 'website',
|
||||
},
|
||||
};
|
||||
|
||||
export default function Layout({ children }: LayoutProps<'/'>) {
|
||||
return (
|
||||
<html lang="en" className={inter.className} suppressHydrationWarning>
|
||||
<body className="flex flex-col min-h-screen">
|
||||
<GoogleAnalytics gaId="G-HZ71HG38HN" />
|
||||
<RootProvider>{children}</RootProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
---
|
||||
title: Dokploy API
|
||||
description: How to interact with the dokploy API for administrators and users
|
||||
---
|
||||
|
||||
In some cases, you may need to interact directly with the dokploy API. Here's how both administrators and users can do this.
|
||||
|
||||
## For Administrators
|
||||
|
||||
1. Access the Swagger UI by navigating to `your-vps-ip:3000/swagger`.
|
||||
2. Use the Swagger interface to interact with the API.
|
||||
3. By default, access to the Swagger UI is restricted, and only authenticated administrators can access the API.
|
||||
|
||||
## For Users
|
||||
|
||||
1. By default, users do not have direct access to the API.
|
||||
2. Administrators can grant users access to:
|
||||
- Generate access tokens
|
||||
- Access the Swagger UI
|
||||
3. If you need access, contact your administrator.
|
||||
|
||||
Note: The API provides advanced functionalities. Make sure you understand the operations you're performing to avoid unintended changes to the system.
|
||||
|
||||
## Usage
|
||||
|
||||
By default the OpenApi base url is `http://localhost:3000/api`, you need to replace with the ip of your dokploy instance or the domain name.
|
||||
|
||||
### Authentication
|
||||
|
||||
The API uses JWT tokens for authentication. You can generate a token by going to the `/settings/profile` page and go to API/CLI Section and generate the token.
|
||||
|
||||
Let's take a example of authenticated request:
|
||||
```bash
|
||||
curl -X 'GET' \
|
||||
'https://dokploy.com/api/project.all' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'x-api-key: YOUR-GENERATED-API-KEY'
|
||||
```
|
||||
then you will get the something like this:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"projectId": "klZKsyw5g-QT_jrWJ5T-w",
|
||||
"name": "Random",
|
||||
"description": "",
|
||||
"createdAt": "2024-06-19T15:05:58.785Z",
|
||||
"adminId": "_WrKZbs7iJAA3p4N2Yfyu",
|
||||
"applications": [],
|
||||
"mariadb": [],
|
||||
"mongo": [],
|
||||
"mysql": [
|
||||
{
|
||||
"mysqlId": "N3cudwO46TiDXzBm4SaQ1",
|
||||
"name": "mysql",
|
||||
"appName": "random-mysql-924715",
|
||||
"description": "",
|
||||
"databaseName": "mysql",
|
||||
"databaseUser": "mysql",
|
||||
"databasePassword": "h13BzO6y3KYSHaQg",
|
||||
"databaseRootPassword": "mM1b7JeoPA7jArxj",
|
||||
"dockerImage": "mysql:8",
|
||||
"command": null,
|
||||
"env": null,
|
||||
"memoryReservation": null,
|
||||
"memoryLimit": null,
|
||||
"cpuReservation": null,
|
||||
"cpuLimit": null,
|
||||
"externalPort": null,
|
||||
"applicationStatus": "done",
|
||||
"createdAt": "2024-06-24T01:55:40.378Z",
|
||||
"projectId": "klZKsyw5g-QT_jrWJ5T-w"
|
||||
}
|
||||
],
|
||||
"postgres": [],
|
||||
"redis": [
|
||||
{
|
||||
"redisId": "TtFK5S4QFaIjaNGOb8Ku-",
|
||||
"name": "redis",
|
||||
"appName": "random-redis-7eec62",
|
||||
"description": "",
|
||||
"databasePassword": "Yvb8gqClfomjcue8",
|
||||
"dockerImage": "redis:7",
|
||||
"command": null,
|
||||
"env": null,
|
||||
"memoryReservation": null,
|
||||
"memoryLimit": null,
|
||||
"cpuReservation": null,
|
||||
"cpuLimit": null,
|
||||
"externalPort": 6379,
|
||||
"createdAt": "2024-06-26T06:43:20.570Z",
|
||||
"applicationStatus": "done",
|
||||
"projectId": "klZKsyw5g-QT_jrWJ5T-w"
|
||||
}
|
||||
],
|
||||
"compose": []
|
||||
},
|
||||
]
|
||||
```
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"title": "API",
|
||||
"description": "API Documentation",
|
||||
"icon": "Code",
|
||||
"root": true,
|
||||
"pages": ["---Get Started---", "index", "---Reference---", "..."]
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: Application
|
||||
description: A guide to using the Dokploy CLI to manage applications
|
||||
---
|
||||
|
||||
|
||||
The Dokploy CLI can be used to create, deploy, and manage applications.
|
||||
|
||||
## Requirements
|
||||
|
||||
Is required to be already authenticated with the Dokploy CLI.
|
||||
|
||||
|
||||
## Commands
|
||||
|
||||
1. `dokploy app create` - Create a new application.
|
||||
2. `dokploy app delete` - Delete an application.
|
||||
3. `dokploy app deploy` - Deploy an application.
|
||||
4. `dokploy app stop` - Stop a running application.
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
title: Authentication
|
||||
description: A guide to authenticating with the Dokploy CLI
|
||||
---
|
||||
|
||||
The Dokploy CLI uses a token-based authentication system. To authenticate, you'll need to create an access token and store it securely.
|
||||
|
||||
## Creating an Access Token
|
||||
|
||||
To create an access token, first you need to have permissions if you are admin you don't need permissions.
|
||||
|
||||
by default access token never expires.
|
||||
|
||||
You can go to `dashboard/settings/profile` and click on the `Generate` button.
|
||||
|
||||
<ImageZoom src="/assets/cli/token.png" width={800} height={630} alt='home og image' className="rounded-lg" />
|
||||
|
||||
|
||||
## Storing the Access Token
|
||||
|
||||
Dokploy when you create an access token automatically will generate a config.json with the access token and the server url.
|
||||
|
||||
|
||||
|
||||
## Commands
|
||||
|
||||
1. `dokploy authenticate` - Authenticate with the Dokploy CLI.
|
||||
2. `dokploy verify` - Verify if the access token is valid.
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
---
|
||||
title: Databases
|
||||
description: A guide to using the Dokploy CLI to manage databases
|
||||
---
|
||||
|
||||
The Dokploy CLI can be used to create, deploy, and manage databases.
|
||||
|
||||
## Requirements
|
||||
|
||||
Is required to be already authenticated with the Dokploy CLI.
|
||||
|
||||
|
||||
## Commands
|
||||
|
||||
### MariaDB
|
||||
|
||||
1. `dokploy database mariadb create` - Create a new mariadb database.
|
||||
2. `dokploy database mariadb delete` - Delete an mariadb database.
|
||||
3. `dokploy database mariadb deploy` - Deploy a mariadb database.
|
||||
4. `dokploy database mariadb stop` - Stop a running mariadb database.
|
||||
|
||||
### PostgreSQL
|
||||
1. `dokploy database postgresql create` - Create a new postgresql database.
|
||||
2. `dokploy database postgresql delete` - Delete an postgresql database.
|
||||
3. `dokploy database postgresql deploy` - Deploy a postgresql database.
|
||||
4. `dokploy database postgresql stop` - Stop a running postgresql database.
|
||||
|
||||
### MySQL
|
||||
1. `dokploy database mysql create` - Create a new mysql database.
|
||||
2. `dokploy database mysql delete` - Delete an mysql database.
|
||||
3. `dokploy database mysql deploy` - Deploy a mysql database.
|
||||
4. `dokploy database mysql stop` - Stop a running mysql database.
|
||||
|
||||
### MongoDB
|
||||
1. `dokploy database mongodb create` - Create a new mongodb database.
|
||||
2. `dokploy database mongodb delete` - Delete an mongodb database.
|
||||
3. `dokploy database mongodb deploy` - Deploy a mongodb database.
|
||||
4. `dokploy database mongodb stop` - Stop a running mongodb database.
|
||||
|
||||
### Redis
|
||||
1. `dokploy database redis create` - Create a new redis database.
|
||||
2. `dokploy database redis delete` - Delete an redis database.
|
||||
3. `dokploy database redis deploy` - Deploy a redis database.
|
||||
4. `dokploy database redis stop` - Stop a running redis database.
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
title: Enviroment
|
||||
description: A guide to using the Dokploy CLI to manage enviroment
|
||||
---
|
||||
|
||||
|
||||
The Dokploy CLI can be used to create, deploy, and manage enviroments.
|
||||
|
||||
## Requirements
|
||||
|
||||
Is required to be already authenticated with the Dokploy CLI.
|
||||
|
||||
|
||||
## Commands
|
||||
|
||||
1. `dokploy env pull <file>` - Pull environment variables from Dokploy in a file.
|
||||
2. `dokploy env push <file>` - Push environment variables to Dokploy from a file.
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: Introduction
|
||||
description: A guide to using the Dokploy command-line interface
|
||||
---
|
||||
|
||||
Dokploy CLI is a command-line tool for remotely managing your Dokploy server. It simplifies creating, deploying, and managing applications and databases.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install -g @dokploy/cli
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
dokploy COMMAND
|
||||
```
|
||||
To get help on a specific command:
|
||||
|
||||
```bash
|
||||
dokploy COMMAND --help
|
||||
```
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"title": "CLI",
|
||||
"description": "CLI Documentation",
|
||||
"icon": "SquareTerminal",
|
||||
"root": true,
|
||||
"pages": [
|
||||
"---Get Started---",
|
||||
"index",
|
||||
"comparisons",
|
||||
"---Commands---",
|
||||
"..."
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
title: Project
|
||||
description: A guide to using the Dokploy CLI to manage projects
|
||||
---
|
||||
|
||||
|
||||
The Dokploy CLI can be used to create, deploy, and manage projects.
|
||||
|
||||
## Requirements
|
||||
|
||||
Is required to be already authenticated with the Dokploy CLI.
|
||||
|
||||
## Commands
|
||||
|
||||
1. `dokploy project create` - Create a new project.
|
||||
2. `dokploy project info` - Get information about a project.
|
||||
3. `dokploy project list` - List all projects.
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
---
|
||||
title: Docker Registry
|
||||
description: 'Configure your Docker Registry repositories for deployments. This includes setting up access tokens, repository names, and authentication.'
|
||||
---
|
||||
|
||||
Dokploy provides seamless integration with Docker Registry repositories, allowing you to deploy applications directly from your container images. This feature is available for single applications and supports both public and private registries.
|
||||
|
||||
## Configuration Overview
|
||||
|
||||
To connect a Docker Registry to your application:
|
||||
|
||||
1. Navigate to your application's **General** tab
|
||||
2. Select **Docker** as the source
|
||||
3. Configure the following settings:
|
||||
|
||||
| Setting | Description |
|
||||
|---------|-------------|
|
||||
| **Docker Image** | Full name of the Docker image (e.g., `nginx:latest`, `myorg/myapp:v1.0`) |
|
||||
| **Docker Registry URL** | Registry URL (defaults to Docker Hub if not specified) |
|
||||
| **Docker Registry Username** | Username for registry authentication |
|
||||
| **Docker Registry Password** | Password or access token for authentication |
|
||||
|
||||
<Callout type="info">
|
||||
For private registries, authentication is required. For public images, you can leave the username and password fields empty.
|
||||
</Callout>
|
||||
|
||||
## Docker Hub Integration
|
||||
|
||||
Docker Hub is the default registry and supports both username/password and token-based authentication.
|
||||
|
||||
### Method 1: Username and Password
|
||||
|
||||
1. **Username**: Enter your Docker Hub username
|
||||
2. **Password**: Enter your Docker Hub password
|
||||
|
||||
### Method 2: Access Token (Recommended)
|
||||
|
||||
Using access tokens is more secure and allows fine-grained permissions:
|
||||
|
||||
1. **Create Access Token**:
|
||||
- Go to [Docker Hub Settings](https://hub.docker.com/settings/security) → **Personal Access Tokens**
|
||||
- Click **Generate New Token**
|
||||
- Set description: `Dokploy-Docker-Hub-Token`
|
||||
- Select **Read-only** permissions
|
||||
- Click **Generate**
|
||||
|
||||
2. **Configure in Dokploy**:
|
||||
- **Username**: Your Docker Hub username
|
||||
- **Password**: Paste the generated access token
|
||||
- **Registry URL**: Leave empty (defaults to Docker Hub)
|
||||
|
||||
3. **Deploy**: Click **Save** and then **Deploy** from the General tab
|
||||
|
||||
## GitHub Container Registry (GHCR)
|
||||
|
||||
GHCR allows you to store container images alongside your GitHub repositories.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Your Docker image must already be published to GHCR
|
||||
- You need a GitHub Personal Access Token with appropriate permissions
|
||||
|
||||
### Setup Process
|
||||
|
||||
1. **Create GitHub Personal Access Token**:
|
||||
- Go to [GitHub Settings](https://github.com/settings/tokens) → **Personal Access Tokens**
|
||||
- Click **Generate new token (classic)**
|
||||
- Set token name: `Dokploy-GHCR-Token`
|
||||
- Select the following scopes:
|
||||
- `repo` - Access to repositories
|
||||
- `workflow` - Access to GitHub Actions
|
||||
- `write:packages` - Upload packages
|
||||
- `delete:packages` - Delete packages
|
||||
- Click **Generate token**
|
||||
|
||||
2. **Configure in Dokploy**:
|
||||
- **Docker Image**: `ghcr.io/username/repository:tag`
|
||||
- **Registry URL**: `ghcr.io`
|
||||
- **Username**: Your GitHub username
|
||||
- **Password**: Paste the generated personal access token
|
||||
|
||||
3. **Deploy**: Click **Save** and then **Deploy** from the General tab
|
||||
|
||||
|
||||
### Public Images
|
||||
|
||||
For public images from any registry:
|
||||
|
||||
- **Docker Image**: Full image path (e.g., `quay.io/prometheus/prometheus:latest`)
|
||||
- **Registry URL**: Registry domain (if not Docker Hub)
|
||||
- **Username**: Leave empty
|
||||
- **Password**: Leave empty
|
||||
|
||||
## Best Practices
|
||||
|
||||
<Callout type="tip">
|
||||
**Security Recommendations:**
|
||||
- Use access tokens instead of passwords when possible
|
||||
- Grant minimal required permissions to tokens
|
||||
- Regularly rotate access tokens
|
||||
- Use private registries for sensitive applications
|
||||
</Callout>
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Common issues and solutions:
|
||||
|
||||
- **Authentication Failed**: Verify your credentials and token permissions
|
||||
- **Image Not Found**: Check the image name and tag spelling
|
||||
- **Pull Rate Limits**: Consider using authenticated requests or private registries
|
||||
- **Registry Timeout**: Verify the registry URL is accessible from your Dokploy instance
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
---
|
||||
title: Bitbucket
|
||||
description: 'Configure your Bitbucket repositories for deployments. This includes setting up access tokens, repository names, and branches.'
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
Dokploy offer a way to connect your Bitbucket Repository to your Dokploy panel, you can use Groups Names or personal accounts.
|
||||
|
||||
Go to `Git` and select `Bitbucket` as the source, then you can use the following options:
|
||||
|
||||
- **Bitbucket Username**: Set the username that you want to connect to Dokploy.
|
||||
- **App Password**: Set the app password you've created.
|
||||
- **Workspace(Optional)**: Assign a workspace name, this is useful if you want to connect to another workspace.
|
||||
|
||||
Follow the steps to connect your Bitbucket account to Dokploy.
|
||||
|
||||
1. Go to `https://bitbucket.org/account/settings/app-passwords/new` .
|
||||
2. Set Label: eg. `Dokploy-Bitbucket-App`. you can choose any name that you want.
|
||||
3. In permissions make sure to select `Account: Read`, `Workspace membership: Read`, `Projects: Read`
|
||||
, `Repositories: Read` `Pull requests: Read` and `Webhooks: Read and write`.
|
||||
4. Click on `Create`.
|
||||
5. Copy the `App Password` and paste it in Dokploy `Bitbucket` Modal section.
|
||||
6. Set your `Bitbucket Username`.
|
||||
7. (Optional) If you want to use Workspaces, go to `https://bitbucket.org/account/workspaces/`, eg. If you have
|
||||
`dokploy-workspace` copy and paste it in Workspace Name, please make sure to use the slugified name, if you use names like Dokploy Workspace in this field can cause issues.
|
||||
7. Click on `Configure Bitbucket`.
|
||||
8. If everything is correct, you can update enter to the Update Icon, and click on `Test Connection` to make sure everything is working.
|
||||
9. Now you can use the repositories from your Gitlab Account in `Applications` or `Docker Compose` services.
|
||||
|
||||
<Callout type='warn'>
|
||||
Dokploy doesn't support Bitbucket Automatic deployments on each push you make to your repository.
|
||||
</Callout>
|
||||
|
||||
|
||||
## Setup Automatic Deployments
|
||||
|
||||
You can configure automatic deployments in Dokploy for the Following Services:
|
||||
|
||||
1. **Applications**
|
||||
2. **Docker Compose**
|
||||
|
||||
The steps are the same for both services.
|
||||
|
||||
1. Go to either `Applications` or `Docker Compose` and go to `Deployments` Tab.
|
||||
2. Copy the `Webhook URL`.
|
||||
3. Go to your Bitbucket Account and select the repository.
|
||||
4. In the left menu, select `Repository Settings` and then `Webhooks`.
|
||||
5. Click on `Add Webhook`.
|
||||
6. Set any `Title` and the `URL` to the one you copied in the previous step.
|
||||
7. In the Trigger section, select `Push Events`.
|
||||
8. Click on `Add Webhook`.
|
||||
10. Now you have automatic deployments enabled for the selected repository.
|
||||
|
||||
|
||||
## Clarification on Automatic Deployments
|
||||
|
||||
By default, Dokploy will automatically deploy your application on the Branch you have selected.
|
||||
|
||||
eg. Let's suppose you have a `application` in this way:
|
||||
|
||||
Repository: `my-app`
|
||||
Branch: `feature`
|
||||
|
||||
If you try to make a push on another branch eg. `main`, Dokploy will not automatically deploy your application, because
|
||||
your application have selected `feature` as the Branch.
|
||||
|
||||
<Callout>
|
||||
In the case you want to have multiple applications in the same repository, eg. (development, staging, production), you can create 3 `Applications` in Dokploy
|
||||
and select the branch in each of them.
|
||||
|
||||
This is very usefull if you want to have multiple environments for the same application.
|
||||
</Callout>
|
||||
@@ -1,77 +0,0 @@
|
||||
---
|
||||
title: Gitea
|
||||
description: 'Configure Gitea repositories for deployments. This includes setting up access tokens, repository names, and branches.'
|
||||
---
|
||||
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
Dokploy offers a way to connect your Gitea Repository to your Dokploy panel, you can use Organizations or personal accounts.
|
||||
|
||||
|
||||
Go to `Git` and select `Gitea` as the source, then you can use the following options:
|
||||
|
||||
- **Application ID**: Select the application ID that you want to connect to Dokploy.
|
||||
- **Personal Secret**: Select the secret that you want to connect to Dokploy.
|
||||
- **Organization Name(Optional)**: Select the organization name that you want to connect to Dokploy (Ideal for Gitea Organizations).
|
||||
|
||||
Follow the steps to connect your Gitea account to Dokploy:
|
||||
|
||||
1. Go to your Gitea instance's settings (e.g., `https://gitea.com/user/settings/applications`) and scroll to the `Create a new OAuth2 Application`.
|
||||
2. Set Application Name: e.g., `Dokploy-Gitea-App`. Choose any name you want.
|
||||
3. Redirect URI: Copy the `Redirect URI` from Dokploy. e.g., `https://dokploy.com/api/providers/gitea/callback`.
|
||||
4. Check Confidential Client
|
||||
5. Click on `Create Application`.
|
||||
6. Copy the `Client ID` and `Client Secret` from Gitea and paste them in Dokploy's `Gitea` Modal section.
|
||||
7. Click on `Configure Gitea App`.
|
||||
8. That operation will save the Gitea Provider configuration and redirect you to Gitia to authorize Dokploy to have access.
|
||||
9. Click on `Authorize`.
|
||||
10. You will be redirected to the `Git` section of Dokploy.
|
||||
11. Now you can use the repositories from your Gitea Account in `Applications` or `Docker Compose` services.
|
||||
|
||||
<Callout type='warn'>
|
||||
Dokploy doesn't support Gitea Automatic deployments on each push you make to your repository.
|
||||
</Callout>
|
||||
|
||||
|
||||
## Setup Automatic Deployments
|
||||
|
||||
You can configure automatic deployments in Dokploy for the Following Services:
|
||||
|
||||
1. **Applications**
|
||||
2. **Docker Compose**
|
||||
|
||||
The steps are the same for both services.
|
||||
|
||||
1. Go to either `Applications` or `Docker Compose` and go to `Deployments` Tab.
|
||||
2. Copy the `Webhook URL`.
|
||||
3. Go to your Gitea Account and select the repository.
|
||||
4. In the left menu, select `Settings` and then `Webhooks`.
|
||||
5. Click on `Add Webhook`.
|
||||
6. Set the `URL` to the one you copied in the previous step.
|
||||
7. In the Trigger section, select `Push Events`.
|
||||
8. Click on `Add Webhook`.
|
||||
9. Click on `Save`.
|
||||
10. Now you have automatic deployments enabled for the selected repository.
|
||||
|
||||
|
||||
## Clarification on Automatic Deployments
|
||||
|
||||
By default, Dokploy will automatically deploy your application on the Branch you have selected.
|
||||
|
||||
e.g., Let's suppose you have an `application` in this way:
|
||||
|
||||
Repository: `my-app`
|
||||
Branch: `feature`
|
||||
|
||||
If you try to make a push on another branch e.g., `main`, Dokploy will not automatically deploy your application, because
|
||||
your application has selected `feature` as the Branch.
|
||||
|
||||
<Callout>
|
||||
In the case you want to have multiple applications in the same repository, e.g., (development, staging, production), you can create 3 `Applications` in Dokploy
|
||||
and select the branch in each of them.
|
||||
|
||||
This is very useful if you want to have multiple environments for the same application.
|
||||
</Callout>
|
||||
|
||||
<userStyle>Normal</userStyle>
|
||||
@@ -1,48 +0,0 @@
|
||||
---
|
||||
title: GitHub
|
||||
description: 'Configure GitHub repositories for deployments. This includes setting up access tokens, repository names, and branches.'
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
Dokploy offer a way to connect your Github Repository to your Dokploy panel, you can use organizations or personal accounts.
|
||||
|
||||
Go to `Git` and select `Github` as the source, then you can use the following options:
|
||||
|
||||
- **Organization**: Select the organization that you want to connect to Dokploy.
|
||||
- **Personal Account(Default)**: Select the account that you want to connect to Dokploy.
|
||||
|
||||
Follow the steps to connect your Github account to Dokploy.
|
||||
|
||||
1. Click on `Create Github App` to create a new Github App.
|
||||
2. Set Github App Name: eg. `Dokploy-Github-App`. make sure this name is unique.
|
||||
3. Click on `Create Github App`, then you will redirect to the `Git` section of Dokploy.
|
||||
4. Now it will show a `Install` Button, click on it.
|
||||
5. You can select the repositories that you want to dokploy be able to access, you can choose
|
||||
select all repositories or select specific repositories.
|
||||
6. Click on `Install & Authorize` to install the Dokploy App.
|
||||
7. You will be redirected to the `Git` section of Dokploy.
|
||||
8. Now you can use the repositories from your Github Account in `Applications` or `Docker Compose` services.
|
||||
|
||||
<Callout>
|
||||
When you use this method, By default you will have Automatic deployments on each push you make to your repository.
|
||||
</Callout>
|
||||
|
||||
## Clarification on Automatic Deployments
|
||||
|
||||
By default, Dokploy will automatically deploy your application on the Branch you have selected.
|
||||
|
||||
eg. Let's suppose you have a `application` in this way:
|
||||
|
||||
Repository: `my-app`
|
||||
Branch: `feature`
|
||||
|
||||
If you try to make a push on another branch eg. `main`, Dokploy will not automatically deploy your application, because
|
||||
your application have selected `feature` as the Branch.
|
||||
|
||||
<Callout>
|
||||
In the case you want to have multiple applications in the same repository, eg. (development, staging, production), you can create 3 `Applications` in Dokploy
|
||||
and select the branch in each of them.
|
||||
|
||||
This is very usefull if you want to have multiple environments for the same application.
|
||||
</Callout>
|
||||
@@ -1,79 +0,0 @@
|
||||
---
|
||||
title: Gitlab
|
||||
description: 'Configure Gitlab repositories for deployments. This includes setting up access tokens, repository names, and branches.'
|
||||
---
|
||||
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
Dokploy offer a way to connect your Gitlab Repository to your Dokploy panel, you can use Groups Names or personal accounts.
|
||||
|
||||
|
||||
Go to `Git` and select `Gitlab` as the source, then you can use the following options:
|
||||
|
||||
- **Application ID**: Select the application ID that you want to connect to Dokploy.
|
||||
- **Personal Secret**: Select the secret that you want to connect to Dokploy.
|
||||
- **Group Name(Optional)**: Select the group name that you want to connect to Dokploy(Ideal for Gitlab Groups).
|
||||
|
||||
Follow the steps to connect your Gitlab account to Dokploy.
|
||||
|
||||
1. Go to `https://gitlab.com/-/profile/applications` and click on ` Add New Application`.
|
||||
2. Set Application Name: eg. `Dokploy-Gitlab-App`. choose any name that you want.
|
||||
3. Redirect URI: Copy the `Redirect URI` from Dokploy. eg. `https://dokploy.com/api/providers/gitlab/callback`.
|
||||
4. Select Permissions: `api`, `read_user`, `read_repository`.
|
||||
5. Click on `Save Application`.
|
||||
6. Copy the `Application ID` and `Secret` from Gitlab and paste it in Dokploy `Gitlab` Modal section.
|
||||
7. (Optional) If you want to use Groups, go to `https://gitlab.com/dashboard/groups` enter the group name you
|
||||
want to connect, and look at the URL in the address bar, it will be something like this
|
||||
`https://gitlab.com/dokploy-panel/frontend` you can use Nested Groups and SubGroups and copy the `dokploy-panel/frontend` from Gitlab and paste
|
||||
it in Dokploy `Gitlab` Modal section.
|
||||
8. Click on `Continue`.
|
||||
9. Go Back to Dokploy and click on `Install` button.
|
||||
10. Click on `Authorize`.
|
||||
11. You will be redirected to the `Git` section of Dokploy.
|
||||
12. Now you can use the repositories from your Gitlab Account in `Applications` or `Docker Compose` services.
|
||||
|
||||
<Callout type='warn'>
|
||||
Dokploy doesn't support Gitlab Automatic deployments on each push you make to your repository.
|
||||
</Callout>
|
||||
|
||||
|
||||
## Setup Automatic Deployments
|
||||
|
||||
You can configure automatic deployments in Dokploy for the Following Services:
|
||||
|
||||
1. **Applications**
|
||||
2. **Docker Compose**
|
||||
|
||||
The steps are the same for both services.
|
||||
|
||||
1. Go to either `Applications` or `Docker Compose` and go to `Deployments` Tab.
|
||||
2. Copy the `Webhook URL`.
|
||||
3. Go to your Gitlab Account and select the repository.
|
||||
4. In the left menu, select `Settings` and then `Webhooks`.
|
||||
5. Click on `Add Webhook`.
|
||||
6. Set the `URL` to the one you copied in the previous step.
|
||||
7. In the Trigger section, select `Push Events`.
|
||||
8. Click on `Add Webhook`.
|
||||
9. Click on `Save`.
|
||||
10. Now you have automatic deployments enabled for the selected repository.
|
||||
|
||||
|
||||
## Clarification on Automatic Deployments
|
||||
|
||||
By default, Dokploy will automatically deploy your application on the Branch you have selected.
|
||||
|
||||
eg. Let's suppose you have a `application` in this way:
|
||||
|
||||
Repository: `my-app`
|
||||
Branch: `feature`
|
||||
|
||||
If you try to make a push on another branch eg. `main`, Dokploy will not automatically deploy your application, because
|
||||
your application have selected `feature` as the Branch.
|
||||
|
||||
<Callout>
|
||||
In the case you want to have multiple applications in the same repository, eg. (development, staging, production), you can create 3 `Applications` in Dokploy
|
||||
and select the branch in each of them.
|
||||
|
||||
This is very usefull if you want to have multiple environments for the same application.
|
||||
</Callout>
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
title: Discord
|
||||
description: 'Configure discord notifications for your applications.'
|
||||
---
|
||||
|
||||
Discord notifications are a great way to stay up to date with important events in your Dokploy panel. You can choose to receive notifications for specific events or all events.
|
||||
|
||||
## Discord Notifications
|
||||
|
||||
For start receiving discord notifications, you need to fill the form with the following details:
|
||||
|
||||
- **Name**: Enter any name you want.
|
||||
- **Webhook URL**: Enter the webhook URL. eg. `https://discord.com/api/webhooks/000000000000000/00000000-0000-0000-0000-000000000000`
|
||||
|
||||
To Setup the Discord notifications, follow these steps:
|
||||
|
||||
1. Go to Discord, and search your Discord server.
|
||||
2. Go to `Server Settings` and click on `Integrations`.
|
||||
3. Click on `Create a Webhook`.
|
||||
4. Set a name for your webhook, eg. `dokploy_webhook`.
|
||||
5. Click on the `Webhook` you've created and click on copy the `Webhook URL`.
|
||||
6. Go to Dokploy `Notifications` and select `Discord` as the notification provider.
|
||||
7. Use the `Webhook URL` you copied in the previous step.
|
||||
8. Click on `Test` to make sure everything is working.
|
||||
9. Click on `Create` to save the notification.
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: Email
|
||||
description: 'Configure email notifications for your applications.'
|
||||
---
|
||||
|
||||
|
||||
Email notifications are a great way to stay up to date with important events in your Dokploy panel. You can choose to receive notifications for specific events or all events.
|
||||
|
||||
## Email Notifications
|
||||
|
||||
For start receiving email notifications, you need to fill the form with the following details:
|
||||
|
||||
|
||||
1. **Name**: Enter any name you want.
|
||||
2. **SMTP Server**: Enter the SMTP server address. eg. `smtp.gmail.com`
|
||||
3. **SMTP Port**: Enter the SMTP server port. eg. `587`
|
||||
4. **SMTP Username**: Enter the SMTP server username. eg. `your-email@gmail.com`
|
||||
5. **SMTP Password**: Enter the SMTP server password.
|
||||
6. **From Address** Enter the email address that will be used as the sender.
|
||||
7. **To Address** Enter the email address that will be used as the recipient, you can add multiple addresses.
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: Gotify
|
||||
description: 'Configure gotify notifications for your applications.'
|
||||
---
|
||||
|
||||
Gotify notifications are a great way to stay up to date with important events in your Dokploy panel. You can choose to receive notifications for specific events or all events.
|
||||
|
||||
## Gotify Notifications
|
||||
|
||||
For start receiving gotify notifications, you need to fill the form with the following details:
|
||||
|
||||
- **Name**: Enter any name you want.
|
||||
- **Server URL**: Enter the gotify server URL. eg. `https://gotify.example.com`
|
||||
- **App Token**: Enter the gotify token.
|
||||
- **Priority**: Enter the priority of the notification, default is `5` (1-10).
|
||||
|
||||
To Setup the Gotify notifications, you can read the [Gotify Documentation](https://gotify.net/docs/install).
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
title: Ntfy
|
||||
description: 'Configure ntfy notifications for your applications.'
|
||||
---
|
||||
|
||||
Ntfy notifications are a great way to stay up to date with important events in your Dokploy panel. You can choose to receive notifications for specific events or all events.
|
||||
|
||||
## Ntfy Notifications
|
||||
|
||||
For start receiving ntfy notifications, you need to fill the form with the following details:
|
||||
|
||||
- **Name**: Enter any name you want.
|
||||
- **Server URL**: Enter the ntfy server URL. eg. `https://ntfy.example.com`
|
||||
- **Access Token**: Enter the ntfy token. You can create one under `https://ntfy.example.com/account`
|
||||
- **Topic**: Enter the topic you want the notifications to be received.
|
||||
- **Priority**: Enter the priority of the notification, default is `3` (1-5).
|
||||
|
||||
To Setup the ntfy notifications, you can read the [Notify Documentation](https://docs.ntfy.sh/).
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: Overview
|
||||
description: 'Configure general notifications for your applications and services.'
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
Dokploy offer multiples notifications options to notify about some events.
|
||||
|
||||
1. **App Deploy**: Notify when a new version of your application is deployed.
|
||||
2. **App Deploy Error**: Notify when a new version of your application fails to deploy.
|
||||
3. **Docker Cleanup**: Notify when a Docker cleanup is triggered.
|
||||
4. **Dokploy Restart**: Notify when Dokploy Server restarts.
|
||||
5. **Database Backup**: Notify when a new database backup is created(Success or Error).
|
||||
|
||||
## Providers:
|
||||
|
||||
1. **Slack**: Slack is a platform for team communication and collaboration.
|
||||
2. **Telegram**: Telegram is a messaging platform that allows users to send and receive messages.
|
||||
3. **Discord**: Discord is generally used for communication between users in a chat or voice channel.
|
||||
4. **Email**: Email is a popular method for sending messages to a group of recipients.
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
title: Slack
|
||||
description: 'Configure slack notifications for your applications.'
|
||||
---
|
||||
|
||||
|
||||
Slack notifications are a great way to stay up to date with important events in your Dokploy panel. You can choose to receive notifications for specific events or all events.
|
||||
|
||||
## Slack Notifications
|
||||
|
||||
For start receiving slack notifications, you need to fill the form with the following details:
|
||||
|
||||
- **Name**: Enter any name you want.
|
||||
- **Webhook URL**: Enter the webhook URL. eg. `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX`
|
||||
- **Channel**: Enter the channel name that you want to send the notifications to.
|
||||
|
||||
To Setup the slack notifications, follow these steps:
|
||||
|
||||
|
||||
1. Go to `https://dokploy.slack.com/marketplace/A0F7XDUAZ-webhooks-entrantes` and click on `Add To Slack`.
|
||||
2. Select the channel that you want to send the notifications to.
|
||||
3. Click on `Add webhook to channel`.
|
||||
4. Copy the `Webhook URL`.
|
||||
5. Go to Dokploy `Notifications` and select `Slack` as the notification provider.
|
||||
6. Use the `Webhook URL` you copied in the previous step.
|
||||
7. In Channel section, select the channel that you want to send the notifications to.
|
||||
7. Click on `Create` to save the notification.
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Telegram
|
||||
description: 'Configure telegram notifications for your applications.'
|
||||
---
|
||||
|
||||
|
||||
Telegram notifications are a great way to stay up to date with important events in your Dokploy panel. You can choose to receive notifications for specific events or all events.
|
||||
|
||||
## Telegram Notifications
|
||||
|
||||
For start receiving telegram notifications, you need to fill the form with the following details:
|
||||
|
||||
- **Name**: Enter any name you want.
|
||||
- **Bot Token**: Enter the bot token. eg. `123456789:ABCdefGHIjklMNOPqrstUVWXYZ`
|
||||
- **Chat ID**: Enter the chat ID. eg. `123456789`
|
||||
|
||||
To Setup the telegram notifications, follow these steps:
|
||||
|
||||
1. Go to `https://telegram.me/botfather` and click on `Start Bot`.
|
||||
2. Type `/newbot` and click on `Start`.
|
||||
3. Set a name for your bot, eg. `dokploy_bot` make sure the name ends with `_bot`.
|
||||
4. Copy the `Bot Token` and paste it in Dokploy `Telegram` Modal section.
|
||||
5. Now you need to get the Chat ID, or create a new Channel
|
||||
6. Search this bot in the search bar `@userinfobot`.
|
||||
7. Type `/start` and it will return the chat ID.
|
||||
8. Copy the `Chat ID` and paste it in Dokploy `Telegram` Modal section.
|
||||
9. Click on test to make sure everything is working.
|
||||
10. Click on `Create` to save the notification.
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
title: Actions
|
||||
description: 'Manage S3 destinations.'
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
The S3 Destinations section are essential for backing up your databases.
|
||||
|
||||
## Actions:
|
||||
|
||||
1. **Create**: Create a new S3 destination.
|
||||
2. **Delete**: Delete a S3 destination.
|
||||
3. **Edit**: Edit a S3 destination.
|
||||
4. **Test**: Test a S3 destination.
|
||||
|
||||
### Create
|
||||
|
||||
In order to create a new S3 Bucket, you need to fill the form.
|
||||
|
||||
- **Name**: This could be anything you want, it will be the name.
|
||||
- **Access Key**: This is the access key that you will use to access your bucket.
|
||||
- **Secret Key**: This is the secret key that you will use to access your bucket.
|
||||
- **Bucket**: This is the bucket that you will use to access your bucket.
|
||||
- **Region**: This is the region that you will use to access your bucket.
|
||||
- **Endpoint**: This is the endpoint that you will use to access your bucket.
|
||||
|
||||
<Callout type='info'>
|
||||
There is a Button `Test` that will test the connection to your bucket, if it is correct it will show you a success message.
|
||||
</Callout>
|
||||
@@ -1,63 +0,0 @@
|
||||
---
|
||||
title: AWS S3
|
||||
description: 'Configure S3 buckets for backup storage. This includes setting up access keys, secret keys, bucket names, regions, and endpoints.'
|
||||
---
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
|
||||
AWS provides a simple and cost-effective way to store and retrieve data. It is a cloud-based service that allows you to store and retrieve data from anywhere in the world. This is a great option for storing backups, as it is easy to set up and manage.
|
||||
|
||||
1. Create a new bucket and set any name you want.
|
||||
2. Search for `IAM` in the search bar.
|
||||
3. Click on `Policies` in the left menu.
|
||||
4. Click on `Create Policy`.
|
||||
5. Select `JSON` and paste the following policy:
|
||||
Make sure to replace the bucket name with your bucket name.
|
||||
```json
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "AllowListBucket",
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:ListBucket",
|
||||
"Resource": "arn:aws:s3:::bucket-name"
|
||||
},
|
||||
{
|
||||
"Sid": "AllowBucketObjectActions",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:GetObject",
|
||||
"s3:PutObject",
|
||||
"s3:DeleteObject"
|
||||
],
|
||||
// Make sure to set the name of your bucket
|
||||
"Resource": "arn:aws:s3:::bucket-name/*"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
6. Click on `Review Policy`.
|
||||
7. Assign a name to the policy.
|
||||
8. Click on `Create Policy`.
|
||||
9. Click on User Group and assign a Name.
|
||||
10. Click on `Add User to Group`.
|
||||
11. Add the user you want to assign to the group.
|
||||
12. In the `Attached Policies` section, filter by type `Customer Managed` and select the policy you created.
|
||||
13. Click on `Attach Policy`.
|
||||
14. Go to `Users` and select the user you've assigned to the group.
|
||||
15. Go to Security Credentials.
|
||||
16. Click on `Create Access Key`.
|
||||
17. Select `Programmatic Access`.
|
||||
18. Click on `Create New Access Key`.
|
||||
|
||||
Now copy the following variables:
|
||||
|
||||
- `Access Key` -> `Access Key (Dokploy)` = eg. `AK2AV244NFLS5JTUZ554`
|
||||
- `Secret Key` -> `Secret Key (Dokploy)` = eg. `I0GWCo9fSGOr7z6Lh+NvHmSsaE+62Vwk2ua2CEwR`
|
||||
- `Bucket` -> `Bucket (Dokploy)` = eg. `dokploy-backups` use the name of the bucket you created.
|
||||
- `Region` -> `Region (Dokploy)` = eg. `us-east-1, us-west-2, etc` it will depend on the region you are using.
|
||||
- `Endpoint` -> `Endpoint (Dokploy) (Optional)` = eg. `https://s3.<region>.amazonaws.com` you will find this endpoint in the Bucket Card at the Home Page.
|
||||
|
||||
|
||||
Test the connection and you should see a success message.
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: Backblaze B2
|
||||
description: 'Configure buckets from Backblaze B2 for backup storage. This includes setting up access keys, secret keys, bucket names, regions, and endpoints.'
|
||||
---
|
||||
|
||||
|
||||
Backblaze B2 is a cloud-based service that allows you to store and retrieve data from anywhere in the world. This is a great option for storing backups, as it is easy to set up and manage.
|
||||
|
||||
|
||||
## Backblaze B2 Example Bucket
|
||||
|
||||
1. Create a new bucket and set any name you want.
|
||||
2. Go to `Application Keys` and create a new key.
|
||||
3. Set a Key Name.
|
||||
4. Set the Allow Access to Bucket(s) to `All Buckets` or `Specific Buckets`.
|
||||
4. Set type of access `Read & Write` Permission.
|
||||
|
||||
Now copy the following variables:
|
||||
|
||||
- `Access Key` -> `Access Key (Dokploy)` = eg. `002s6acf2639910000d000005`
|
||||
- `Secret Key` -> `Secret Key (Dokploy)` = eg. `K00+rIsWqPMhmcgqcyOyb9bqby7pbpE`
|
||||
- `Region` -> `Region (Dokploy)` = eg. `eu-central-003, us-east-005, us-west-002, us-west-001, us-west-004, etc` it will depend on the region you are using.
|
||||
- `Endpoint` -> `Endpoint (Dokploy)` = eg. `https://s3.us-west-002.backblazeb2.com` you will find this endpoint in the Bucket Card at the Home Page.
|
||||
- `Bucket` -> `Bucket (Dokploy)` = eg. `dokploy-backups` use the name of the bucket you created.
|
||||
|
||||
Test the connection and you should see a success message.
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: Cloudflare R2
|
||||
description: 'Configure R2 buckets for backup storage. This includes setting up access keys, secret keys, bucket names, regions, and endpoints.'
|
||||
---
|
||||
|
||||
|
||||
Cloudflare is a popular choice for hosting static assets, such as images, videos, and documents. It is a cloud-based service that allows you to store and retrieve data from anywhere in the world. This is a great option for storing backups, as it is easy to set up and manage.
|
||||
|
||||
1. Go to `R2 Object Storage`, and create a new bucket with any name you want by clicking `Create bucket` button.
|
||||
2. Go back to `R2 Object Storage`, and select `Manage API tokens` from the select box.
|
||||
3. Create a new `User API Token`, and give it a meaninful name.
|
||||
4. Set `Object Read & Write` Permission.
|
||||
5. (Optional) Set Specify bucket, by default it will include all buckets.
|
||||
6. Create the token.
|
||||
|
||||
Now copy the following variables:
|
||||
|
||||
| (from) Cloudflare | (to) Dokploy | Example value |
|
||||
|---------------------|---------------------|----------------------------------------------------------------------|
|
||||
| `Access Key ID` | `Access Key Id` | `f3811c6d27415a9s6cv943b6743ad784` |
|
||||
| `Secret Access Key` | `Secret Access Key` | `aa55ee40b4049e93b7252bf698408cc22a3c2856d2530s7c1cb7670e318f15e58` |
|
||||
| `Region` | `Region` | `WNAM, ENAM, etc` it will depend on the region you are using. |
|
||||
| `Endpoint` | `Endpoint` | `https://8ah554705io7842d54c499fbee1156c1c.r2.cloudflarestorage.com` |
|
||||
| `Bucket` | `Bucket` | `dokploy-backups` use the name of the bucket you created. |
|
||||
|
||||
Test the connection and you should see a success message.
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: Permissions
|
||||
description: 'Add permissions to your users to manage your applications and services.'
|
||||
---
|
||||
|
||||
Manage user roles and permissions within Dokploy. Note that only one admin role is allowed per instance.
|
||||
|
||||
## Permissions
|
||||
|
||||
Dokploy offers multiple permissions to manage your users effectively:
|
||||
|
||||
- **Create Projects**: Allows the user to create new projects.
|
||||
- **Create Services**: Allows the user to create new applications or databases.
|
||||
- **Access Traefik Files Tab**: Allows the user to access the Traefik files tab.
|
||||
- **Delete Projects**: Allows the user to delete projects.
|
||||
- **Delete Services**: Allows the user to delete services.
|
||||
- **Access Docker Tab**: Allows the user to access the Docker tab.
|
||||
- **Access API/CLI**: Allows the user to access the API/CLI, including the Swagger route.
|
||||
- **Access to Git Providers**: Allows the user to access the Git Providers.
|
||||
- **Access to SSH Keys**: Allows the user to access the SSH Keys.
|
||||
|
||||
You can also grant permissions to specific users for accessing particular projects or services.
|
||||
|
||||
### Project Permissions
|
||||
|
||||
Based on your projects and services, you can assign permissions to specific users to give them access to particular projects or services.
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: 11ty
|
||||
description: Deploy a simple 11ty application.
|
||||
---
|
||||
|
||||
This example will deploy a simple 11ty application.
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/11ty`
|
||||
- Publish Directory: `./_site` (Nixpacks)
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `80`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
title: Astro SSR
|
||||
description: Deploy a simple Astro SSR application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Astro SSR application.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/astro-ssr`
|
||||
|
||||
2. **Add Environment Variables**:
|
||||
- Navigate to the "Environments" tab and add the following variable:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
|
||||
3. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
4. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
title: Astro
|
||||
description: Deploy a simple Astro application.
|
||||
---
|
||||
|
||||
This example will deploy a simple Astro application.
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/astro`
|
||||
- Publish Directory: `./dist` (Nixpacks)
|
||||
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `80`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
title: Deno
|
||||
description: Deploy a simple Deno application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Deno application.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/deno`
|
||||
- Select `Dockerfile` as Build Type
|
||||
- Type `Dockerfile` in the Dockerfile path field
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `8080`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: HTML
|
||||
description: Deploy a simple HTML application.
|
||||
---
|
||||
|
||||
This example will deploy a simple HTML application.
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/html`
|
||||
- use `Static` as build type
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `80`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
title: Lit
|
||||
description: Deploy a simple Lit application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Lit application.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/lit`
|
||||
- Publish Directory: `./dist` (Nixpacks)
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `80`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,21 +0,0 @@
|
||||
---
|
||||
title: Nest.js
|
||||
description: Deploy a simple Nest.js application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Nest.js application.
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/nestjs`
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: Next.js
|
||||
description: Deploy a simple Next.js application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Next.js application.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/nextjs`
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
1. Click on generate domain button.
|
||||
2. A new domain will be generated for you.
|
||||
3. You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
title: Preact
|
||||
description: Deploy a simple Preact application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Preact application.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/preact`
|
||||
- Publish Directory: `./dist` (Nixpacks)
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `80`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
title: Qwik
|
||||
description: Deploy a simple Qwik application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Qwik application.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/qwik`
|
||||
|
||||
2. **Add Environment Variables**:
|
||||
- Navigate to the "Environments" tab and add the following variable:
|
||||
```cmd
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
|
||||
3. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
4. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: Remix
|
||||
description: Deploy a simple Remix application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Remix application.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/remix`
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
title: Solid.js
|
||||
description: Deploy a simple Solid.js application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Solid.js application.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/solidjs`
|
||||
- Publish Directory: `./dist` (Nixpacks)
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `80`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
title: Svelte
|
||||
description: Deploy a simple Svelte application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Svelte application.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/svelte`
|
||||
- Publish Directory: `./dist` (Nixpacks)
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `80`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: Tanstack
|
||||
description: Deploy a simple Tanstack application.
|
||||
---
|
||||
|
||||
This example will deploy a simple Tanstack application.
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/tanstack`
|
||||
- use `Nixpacks` as build type
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `3000`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
title: Turborepo
|
||||
description: Deploy a simple Turborepo application.
|
||||
---
|
||||
|
||||
|
||||
This repository contains an example of turborepo application that is deployed on Dokploy.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/turborepo` (Nixpacks)
|
||||
|
||||
2. **Environment Variables**:
|
||||
- Add environment variables to the env tab.
|
||||
|
||||
```bash
|
||||
NIXPACKS_TURBO_APP_NAME="web"
|
||||
NIXPACKS_BUILD_CMD="turbo run build --filter=web"
|
||||
NIXPACKS_START_CMD="turbo run start --filter=web"
|
||||
```
|
||||
|
||||
3. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `3000`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
title: Vite React
|
||||
description: Deploy a simple Vite React application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Vite React application.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/vite`
|
||||
- Publish Directory: `./dist` (Nixpacks)
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `80`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
title: Vue.js
|
||||
description: Deploy a simple Vue.js application.
|
||||
---
|
||||
|
||||
|
||||
This example will deploy a simple Vue.js application.
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/vuejs`
|
||||
- Publish Directory: `./dist` (Nixpacks)
|
||||
|
||||
2. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
3. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- Set Port `80`
|
||||
- You can use this domain to access your application.
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
@@ -1,174 +0,0 @@
|
||||
---
|
||||
title: Advanced
|
||||
description: Learn how to use advanced features in your application.
|
||||
---
|
||||
|
||||
This section is designed for experienced users who need to manage complex configurations and orchestration settings in Dokploy. Here, you can execute custom commands, manage cluster replicas, select Docker registries, and configure Docker Swarm settings.
|
||||
|
||||
### Run Command
|
||||
|
||||
- **Purpose**: Allows users to execute custom shell commands directly within the container.
|
||||
- **Usage**: Enter the command you need to run in the provided field and click 'Save' to execute it within the container environment. This tool is particularly useful for debugging or specific administrative tasks.
|
||||
|
||||
### Cluster Settings
|
||||
|
||||
- **Purpose**: Manages the scaling and distribution of the application across multiple servers or nodes.
|
||||
- **Replicas**: Set the number of instances of your application that should be running.
|
||||
- **Registry Selection**: Choose the Docker registry from which your container images will be pulled. This is crucial for ensuring that the correct images are used during deployment.
|
||||
|
||||
#### Important Note
|
||||
Always click 'Redeploy' after modifying the cluster settings to apply the changes.
|
||||
|
||||
### Swarm Settings
|
||||
|
||||
Swarm settings allow for detailed configuration of how containers are orchestrated within the Docker Swarm.
|
||||
|
||||
#### Health Check
|
||||
|
||||
- **Purpose**: Ensures that containers are running smoothly and restarts them if they fail.
|
||||
- **Configuration**: Specify parameters like test commands, intervals, timeouts, start periods, and retries.
|
||||
|
||||
#### Restart Policy
|
||||
|
||||
Defines how containers should be handled if they exit or fail, the configuration is as follows:
|
||||
|
||||
- **Condition**: Specifies under what condition a restart should occur.
|
||||
- **Delay**: Sets the time delay between restarts.
|
||||
- **Max Attempts**: Limits the number of restart attempts.
|
||||
- **Window**: Defines the time window used to evaluate the restart policy.
|
||||
|
||||
#### Update Config
|
||||
|
||||
Manages the deployment and update process of services in the swarm, the configuration is as follows:
|
||||
|
||||
|
||||
- **Parallelism**: Number of containers to update simultaneously.
|
||||
- **Delay**: Time between updates.
|
||||
- **Failure Action**: Action to take if an update fails.
|
||||
- **Monitor**: Duration to monitor a container after an update.
|
||||
- **Max Failure Ratio**: The fraction of containers that are allowed to fail before the update is considered a failure.
|
||||
- **Order**: The order in which containers are stopped and started during an update.
|
||||
|
||||
#### Placement
|
||||
|
||||
Controls where containers are placed within the swarm based on specific rules and preferences, the configuration is as follows:
|
||||
|
||||
- **Constraints**: Conditions that must be met for a container to be placed on a node.
|
||||
- **Preferences**: Preferences for placing containers across nodes to spread load evenly.
|
||||
|
||||
### Rollback Config
|
||||
|
||||
Manages the rollback process for services when updates fail, the configuration is as follows:
|
||||
|
||||
- **Parallelism**: Number of containers to rollback simultaneously.
|
||||
- **Delay**: Time between rollbacks.
|
||||
- **FailureAction**: Action to take if a rollback fails.
|
||||
- **Monitor**: Duration to monitor a container after a rollback.
|
||||
- **MaxFailureRatio**: The fraction of containers that are allowed to fail before the rollback is considered a failure.
|
||||
- **Order**: The order in which containers are stopped and restarted during a rollback.
|
||||
|
||||
### Mode
|
||||
|
||||
Defines how services are replicated within the swarm, the configuration is as follows:
|
||||
|
||||
- **Replicated**: Services are replicated across nodes as specified.
|
||||
- **Replicas**: Number of replicas per service.
|
||||
- **Global**: A single instance of the service runs on every node.
|
||||
- **ReplicatedJob**: Runs a job in a replicated manner.
|
||||
- **MaxConcurrent**: Maximum number of jobs running concurrently.
|
||||
- **TotalCompletions**: Total number of times the jobs need to complete.
|
||||
|
||||
### Network
|
||||
|
||||
Configures network settings for the services, the configuration is as follows:
|
||||
|
||||
- **Target**: Specifies the network name.
|
||||
- **Aliases**: Provides aliases for the network.
|
||||
- **DriverOpts**: Network driver options like MTU size and host binding.
|
||||
|
||||
### Labels
|
||||
|
||||
Assigns metadata to containers to help identify and organize them, the configuration is as follows:
|
||||
|
||||
- **Labels**: Key-value pairs assigned to the service. For example:
|
||||
1. `com.example.app.name`: "my-app"
|
||||
2. `com.example.app.version`: "1.0.0"
|
||||
|
||||
|
||||
### Note
|
||||
Modifying Swarm Settings requires careful consideration as incorrect configurations can disrupt the entire container orchestration. Always ensure you understand the implications of the changes you are making.
|
||||
|
||||
|
||||
## Resources
|
||||
|
||||
Manage the memory and CPU resources allocated to your applications or databases.
|
||||
|
||||
- **Memory Reservation**: The minimum amount of memory guaranteed to the application.
|
||||
- **Memory Limit**: The maximum amount of memory the application can use.
|
||||
- **CPU Limit**: The maximum number of CPU units that the application can utilize.
|
||||
- **CPU Reservation**: The minimum number of CPU units reserved for the application.
|
||||
|
||||
|
||||
### Volumes/Mounts
|
||||
|
||||
Configure persistent storage for your application to ensure data remains intact across container restarts and deployments.
|
||||
|
||||
|
||||
**Bind Mount**: Maps a host file or directory to a container file or directory. Typically used for specific configurations or databases.
|
||||
1. **Host Path**: Path on the host.
|
||||
2. **Mount Path**: Path in the container.
|
||||
|
||||
**Volume Mount**: Uses Docker-managed volumes that are easier to back up and migrate than bind mounts.
|
||||
1. **Volume Name**: Name of the Docker-managed volume.
|
||||
2. **Mount Path**: Path in the container where the volume is mounted.
|
||||
|
||||
**File Mount**: Specifically for single files, useful for configuration files.
|
||||
1. **Content**: The content to store in the file.
|
||||
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.
|
||||
|
||||
<ImageZoom src="/assets/file-mount-configuration.webp" width={800} height={630} className="rounded-lg"/>
|
||||
|
||||
<ImageZoom src="/assets/file-mount.png" width={800} height={630} className="rounded-lg"/>
|
||||
|
||||
### Redirects
|
||||
|
||||
Redirect requests to your application to another URL based on specified rules, enhancing navigational efficiency and SEO.
|
||||
|
||||
- **Regex**: Enter a regular expression to match the URLs that need redirecting.
|
||||
- **Replacement**: Specify the target URL where traffic should be redirected.
|
||||
- **Permanent**: Toggle this option to apply a permanent (HTTP 301) redirection, indicating to browsers and search engines that the page has moved permanently.
|
||||
|
||||
#### Example
|
||||
To redirect all traffic from "http://localhost" to "http://mydomain", set the Regex as `http://localhost/(.*)` and the Replacement as `http://mydomain/$1`.
|
||||
|
||||
|
||||
### Security
|
||||
|
||||
Add basic authentication to your application to restrict access.
|
||||
|
||||
- **Username**: Enter a username.
|
||||
- **Password**: Enter a password.
|
||||
|
||||
#### Important Note
|
||||
Adding basic authentication will prompt users for a username and password before allowing access to the application. Use this for environments where an additional layer of security is required.
|
||||
|
||||
|
||||
### Ports
|
||||
|
||||
Expose your application to the internet by configuring network ports, allowing external access.
|
||||
|
||||
- **Published Port**: The port number on the host that will route traffic to your application.
|
||||
- **Target Port**: The port number inside the container that the application uses.
|
||||
- **Protocol**: Choose between TCP and UDP based on your application's requirements.
|
||||
|
||||
#### Important Note
|
||||
Ensure that the published port does not conflict with other services on the host to avoid port binding errors, also this port is used mostly for accesing the application from the outside, eg your-ip:port, this is not for accessing the application trought a domain.
|
||||
|
||||
### Traefik
|
||||
|
||||
Provides a dynamic and robust method to manage HTTP traffic to your services, including load balancing and SSL termination.
|
||||
|
||||
- **Rules**: Define complex routing, load balancing, and security configurations using Traefik's powerful rule-based configuration system.
|
||||
@@ -1,99 +0,0 @@
|
||||
---
|
||||
title: Build Type
|
||||
description: "Learn about the different build types available in Dokploy, including Nixpacks, Dockerfile, and Buildpack options."
|
||||
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
|
||||
Dokploy offers three distinct build types for deploying applications, each suited to different development needs and preferences.
|
||||
|
||||
### Nixpacks
|
||||
|
||||
This is the default build type in Dokploy. When you select Nixpacks, Dokploy builds your application as a Nixpack, which is optimized for ease of use and efficiency.
|
||||
|
||||
Nixpacks expose multiples variables to be configured via environment variables. All of these variables are prefixed with `NIXPACKS_`, you can define them in the `Environment Variables` tab.
|
||||
|
||||
| Variable | Description |
|
||||
| :---------------------------- | :------------------------------------------------------------------------------------------- |
|
||||
| `NIXPACKS_INSTALL_CMD` | Override the install command to use |
|
||||
| `NIXPACKS_BUILD_CMD` | Override the build command to use |
|
||||
| `NIXPACKS_START_CMD` | Override command to run when starting the container |
|
||||
| `NIXPACKS_PKGS` | Add additional [Nix packages](https://search.nixos.org/packages?channel=unstable) to install |
|
||||
| `NIXPACKS_APT_PKGS` | Add additional Apt packages to install (comma delimited) |
|
||||
| `NIXPACKS_LIBS` | Add additional Nix libraries to make available |
|
||||
| `NIXPACKS_INSTALL_CACHE_DIRS` | Add additional directories to cache during the install phase |
|
||||
| `NIXPACKS_BUILD_CACHE_DIRS` | Add additional directories to cache during the build phase |
|
||||
| `NIXPACKS_NO_CACHE` | Disable caching for the build |
|
||||
| `NIXPACKS_CONFIG_FILE` | Location of the Nixpacks configuration file relative to the root of the app |
|
||||
| `NIXPACKS_DEBIAN` | Enable Debian base image, used for supporting OpenSSL 1.1 |
|
||||
|
||||
If you need more manage about nixpacks process, you can create a `nixpacks.toml` file in the root of your application you can read here [Nixpacks Configuration](https://nixpacks.com/docs/configuration/file).
|
||||
|
||||
Nixpacks support monorepo such as NX Monorepo, Turborepo, Moon Repo, you can read more about it [here](https://nixpacks.com/docs/providers/node#build).
|
||||
|
||||
You can read more about Nixpacks [here](https://nixpacks.com/).
|
||||
|
||||
Since Nixpacks have a [static builder](https://nixpacks.com/docs/providers/staticfile) Dokploy expose a field called `Publish Directory` where basically you can specify
|
||||
the directory that you want to publish after the build process is finished, example:
|
||||
|
||||
Astro applications after you build it usually create a `dist` directory, so you can specify the `dist` directory as the publish directory and then Dokploy will
|
||||
copy all the files in the `dist` directory to the root of your application, and will use a NGINX Optimized Dockerfile to run your application.
|
||||
|
||||
|
||||
### Railpack (NEW)
|
||||
|
||||
Railpack is a new build type optimized and is the successor of Nixpacks.
|
||||
|
||||
Railpack exposes multiple Build Variables, you can define them in the `Environment Variables` tab.
|
||||
|
||||
| Name | Description |
|
||||
| :-------------------- | :--------------------------------------------------------------------------------------------------------- |
|
||||
| `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).
|
||||
|
||||
Railpack supports Nodejs, Python, Go, PHP, Go, StaticFile, Shell Scripts.
|
||||
|
||||
### Dockerfile
|
||||
|
||||
If your project includes a Dockerfile, you can specify its path. Dokploy will use this Dockerfile to build your application directly, giving you full control over the build environment and dependencies
|
||||
|
||||
Dokploy expose 3 Fields to be configured:
|
||||
|
||||
- `Dockerfile Path (Required)`: The path to the Dockerfile to use for building the application, eg. If your Dockerfile is in the root of your application you can just specify the `Dockerfile` file.
|
||||
- `Docker Context Path`: This is where the Dockerfile is located, eg. If your Dockerfile is in the root of your application you can just specify the `.` (dot) character, is basically to tell docker what context will use to build your application, you can read [Dockerfile Context](https://docs.docker.com/build/concepts/context/) for more information.
|
||||
- `Docker Build Stage`: This is the build stage to use for building the application, eg. If you want to use the `builder` stage you can specify the `builder` stage, read more about build stages [here](https://docs.docker.com/build/building/multi-stage/).
|
||||
|
||||
|
||||
|
||||
### Buildpack
|
||||
|
||||
Dokploy supports two types of buildpacks:
|
||||
|
||||
- **Heroku**: Adapted from Heroku's popular cloud platform, these buildpacks are designed for compatibility and ease of migration, you can optional specify the Heroku Version to use, by default Dokploy will use the 24.
|
||||
- **Paketo**: Provides cloud-native buildpacks that leverage modern standards and practices for building applications.
|
||||
|
||||
By choosing the appropriate build type, you can tailor the deployment process to best fit your application's requirements and your operational preferences.
|
||||
|
||||
|
||||
### Static
|
||||
|
||||
Static build type is used to server static applications, it will use a NGINX Optimized Dockerfile to run your application.
|
||||
|
||||
Dokploy will copy everything from the `Root` directory and will mount it to the `/usr/share/nginx/html` directory, and will use a NGINX Optimized Dockerfile to run your application.
|
||||
|
||||
<Callout type="info">
|
||||
Ensure to use the port `80` when creating a domain.
|
||||
</Callout>
|
||||
|
||||
## Recomendations
|
||||
|
||||
- For prototyping and development purposes, we recommend using the `Nixpacks` build type.
|
||||
- For production purposes, we recommend follow this [Production Guide](/docs/core/applications/going-production) to have a rock solid deployment.
|
||||
- For static applications, we recommend using the `Static` build type.
|
||||
@@ -1,213 +0,0 @@
|
||||
---
|
||||
title: Going Production
|
||||
description: Learn how to deploy your application in production in Dokploy.
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
By default, dokploy offer multiple [Builds Types](/docs/core/applications/build-type) to deploy your application, the most common is `nixpacks` and `heroku buildpacks`
|
||||
however this also comes with problems, first is the resources that are required to build your application which some times can lead to timeout on your server or even freezeing your server
|
||||
and all your application will be down for this reasson, this is mainly problem from `Docker` since the comsumption of resources such as RAM, CPU is very high to build an application.
|
||||
|
||||
|
||||
|
||||
## Solution
|
||||
|
||||
You have two options to solve this problem:
|
||||
|
||||
1. Increase the resources of your server CPU, RAM, Disk (Probably is not a good idea and cheapest solution)
|
||||
2. Build & Publish the application in a CI/CD pipeline eg. Github Actions, Gitlab CI, Gitea Actions, etc. (Recommended)
|
||||
|
||||
|
||||
### Build & Publish the application in a CI/CD pipeline
|
||||
|
||||
We will use Github Actions as an example, but you can use any CI/CD pipeline that you want.
|
||||
|
||||
We will use the following configuration:
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/production-example`
|
||||
- Branch: `main`
|
||||
- Build path: `/`
|
||||
|
||||
<Callout type="info">
|
||||
The repo have everything you need, however you can follow the same idea for your own applications.
|
||||
|
||||
</Callout>
|
||||
|
||||
|
||||
3. The repository already have a Dockerfile, so we will use that, in the case your application is different create your own Dockerfile is required for this guide.
|
||||
4. We will use `Dockerhub` as an example, but you can use any container registry that you want.
|
||||
5. Make sure to create the repository in the `Dockerhub` , `namespace` is your username and `repository` is `example`.
|
||||
6. Create a new Github Actions workflow in `.github/workflows/deploy.yml`
|
||||
7. Add the following code to the workflow:
|
||||
|
||||
```yaml
|
||||
name: Build Docker images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
build-and-push-dockerfile-image:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }} # Make sure to add the secrets in your repository in -> Settings -> Secrets (Actions) -> New repository secret
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }} # Make sure to add the secrets in your repository in -> Settings -> Secrets (Actions) -> New repository secret
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
# Make sure to replace with your own namespace and repository
|
||||
tags: |
|
||||
namespace/example:latest
|
||||
platforms: linux/amd64
|
||||
```
|
||||
8. Create your own Dockerfile, in this case we will use the `Dockerfile` from the repository.
|
||||
|
||||
```properties
|
||||
FROM node:18-alpine AS base
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
|
||||
FROM base AS build
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
ENV NODE_ENV=production
|
||||
RUN pnpm run build
|
||||
|
||||
FROM base AS dokploy
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Copy only the necessary files
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/package.json ./package.json
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["pnpm", "start"]
|
||||
```
|
||||
|
||||
9. Now when you make a commit to your repository, the workflow will be triggered and the application will build and push to `Dockerhub`.
|
||||
10. Now let's create application in Dokploy.
|
||||
11. In `Source Type` select `Docker`
|
||||
12. In the docker image field enter `namespace/example:latest`
|
||||
13. Click on `Save`.
|
||||
14. Click on `Deploy`.
|
||||
15. Go to `Domains` and click `Dices` icon to generate a domain and the port set to `3000`.
|
||||
16. Now you can access your application.
|
||||
|
||||
### Auto deploy
|
||||
|
||||
When using Dockerhub as a registry you can also enable auto deploy, this will automatically deploy your application whenever you push to your repository.
|
||||
|
||||
To setup auto deploys for Dockerhub, follow the steps below:
|
||||
|
||||
1. Go to your application and select `Deployments` tab.
|
||||
2. Copy the `Webhook URL`.
|
||||
3. Go to your Dockerhub repository and select `Webhooks` tab.
|
||||
4. Set a name for the webhook and paste the `Webhook URL` copied in step 2.
|
||||
5. That's it, now every time you push to your repository, your application will trigger a deployment in dokploy.
|
||||
|
||||
The deployment will trigger only if the `Tag` matches the one specified in Dokploy.
|
||||
|
||||
|
||||
#### External Registry
|
||||
|
||||
If you have a registry that is not Dockerhub, you can trigger a deployment after pushing to your repository in Github Actions.
|
||||
|
||||
Your workflow will look like this:
|
||||
|
||||
This method use the [Api Method](/docs/core/auto-deploy#api-method) to trigger a deployment.
|
||||
|
||||
```yaml
|
||||
name: Build Docker images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
build-and-push-dockerfile-image:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
...Same as step 7 from the previous example
|
||||
|
||||
- name: Trigger Dokploy Deployment
|
||||
uses: dokploy/dokploy-action@v1
|
||||
run: |
|
||||
curl -X 'POST' \
|
||||
'https://<your-dokploy-domain>/api/trpc/application.deploy' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'x-api-key: YOUR-GENERATED-API-KEY' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"json":{
|
||||
"applicationId": "YOUR-APPLICATION-ID"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
You can also use this Github Action [Action](https://github.com/marketplace/actions/dokploy-deployment) to automate the deployment.
|
||||
|
||||
## Healthcheck & Rollbacks
|
||||
|
||||
When using Dokploy you can also configure healthchecks and rollbacks, this will allow you to configure your application to be able to recover from failures.
|
||||
|
||||
In the repo we are using from the `Step 1.` we have a healthcheck endpoint `/health` that returns a 200 status code and running in the port 3000.
|
||||
|
||||
Go to `Advanced` Tab and go to Cluster Settings and enter to `Swarm Settings`
|
||||
|
||||
There are a couple options that you can use, in this case we will focus on `Health Check` and `Update Config`.
|
||||
|
||||
Make sure the API Route exists in your application
|
||||
|
||||
```json
|
||||
{
|
||||
"Test": [
|
||||
"CMD",
|
||||
"curl",
|
||||
"-f",
|
||||
"http://localhost:3000/health"
|
||||
],
|
||||
"Interval": 30000000000,
|
||||
"Timeout": 10000000000,
|
||||
"StartPeriod": 30000000000,
|
||||
"Retries": 3
|
||||
}
|
||||
```
|
||||
|
||||
Now in the `Update Config`
|
||||
|
||||
Now when the application is getting unhealthy response from the health check, the container will rollback to the previous version.
|
||||
|
||||
Paste the following code:
|
||||
```json
|
||||
{
|
||||
"Parallelism": 1,
|
||||
"Delay": 10000000000,
|
||||
"FailureAction": "rollback",
|
||||
"Order": "start-first"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Now you everything a production ready application with automated deployments, zero downtime, rollbacks and healthchecks.
|
||||
|
||||
We recommend strongly to use this approach in production since this will make your server never build the application, will only in charge of the deployment keeping your server without any downtime.
|
||||
@@ -1,78 +0,0 @@
|
||||
---
|
||||
title: Applications
|
||||
description: "Explore the multiple deployment methods available in Dokploy, including GitHub, Git, Docker, and automated deployments via webhooks."
|
||||
---
|
||||
|
||||
Applications in Dokploy are treated as a single service, entity or container, making it easy and intuitive for users to work with each application in its own workspace.
|
||||
|
||||
We offer multiple functionalities that you can use to manage your applications, such as:
|
||||
|
||||
## General
|
||||
|
||||
Configure the source of your code, the way your application is built, and also manage actions like deploying, updating, and deleting your application, and stopping it.
|
||||
|
||||
## Environment
|
||||
|
||||
If you need to assign environment variables to your application, you can do so here.
|
||||
|
||||
In case you need to use a multiline variable, you can wrap it in double quotes just like this `'"here_is_my_private_key"'`.
|
||||
|
||||
## Monitoring
|
||||
|
||||
Four graphs will be displayed for the use of memory, CPU, disk, and network. Note that the information is only updated if you are viewing the current page, otherwise it will not be updated.
|
||||
|
||||
## Logs
|
||||
|
||||
If you want to see any important logs from your application that is running, you can do so here and determine if your application is displaying any errors or not.
|
||||
|
||||
## Deployments
|
||||
|
||||
You can view the last 10 deployments of your application. When you deploy your application in real time, a new deployment record will be created and it will gradually show you how your application is being built.
|
||||
|
||||
We also offer a button to cancel deployments that are in queue. Note that those in progress cannot be canceled.
|
||||
|
||||
We provide a webhook so that you can trigger your own deployments by pushing to your GitHub, Gitea, GitLab, Bitbucket, DockerHub repository.
|
||||
|
||||
## Domains
|
||||
|
||||
This is where you will assign your domain so that your application can be accessed from the internet.
|
||||
|
||||
There are two ways to assign a domain:
|
||||
|
||||
1. Create a custom domain.
|
||||
2. Use a generated domain, we use traefik.me to generate free domains.
|
||||
|
||||
## Advanced Settings
|
||||
|
||||
This section provides advanced configuration options for experienced users. It includes tools for custom commands within the container, managing Docker Swarm settings, and adjusting cluster settings such as replicas and registry selection. These tools are typically not required for standard application deployment and are intended for complex management and troubleshooting tasks.
|
||||
|
||||
- **Run Command**: Execute custom commands directly in the container, after the application has been build & running.
|
||||
- **Cluster Settings**: Configure the number of replicas and select the Docker registry for your deployment to manage how your application scales and where it pulls images from.
|
||||
- **Swarm Settings**: Access additional Docker Swarm configurations for detailed orchestration and scaling across multiple nodes.
|
||||
- **Resources**: Adjust the CPU and memory allocation for your application.
|
||||
- **Volumes**: To ensure data persistence across deployments, configure storage volumes for your application, you can create Volumes, Binds, File Mounts.
|
||||
- **Ports**: Expose your application to the internet by configuring network ports.
|
||||
- **Traefik**: Modify Traefik settings to manage HTTP request handling for your application.
|
||||
|
||||
## Keyboard Shortcuts
|
||||
|
||||
To help speed up navigating there are some built in keyboard shortcuts for
|
||||
navigating tabs on application pages. Similar to GitHub these are all prefixed
|
||||
with the `g` key so to use them press `g` and then the shortcut key.
|
||||
|
||||
| Key | Tab |
|
||||
| --- | ------------------- |
|
||||
| `g` | General |
|
||||
| `e` | Environment |
|
||||
| `u` | Domains |
|
||||
| `p` | Preview Deployments |
|
||||
| `s` | Schedules |
|
||||
| `v` | Volume Backups |
|
||||
| `d` | Deployments |
|
||||
| `l` | Logs |
|
||||
| `m` | Monitoring |
|
||||
| `a` | Advanced |
|
||||
|
||||
### Note
|
||||
|
||||
Adjust these settings carefully as incorrect configurations can significantly impact your application’s functionality and availability.
|
||||
@@ -1,75 +0,0 @@
|
||||
---
|
||||
title: Preview Deployments
|
||||
description: "Preview deployments allow you to test and review your application changes in an isolated environment before merging to production."
|
||||
---
|
||||
|
||||
Preview deployments are a powerful feature specifically designed for applications with GitHub integration. This feature is disabled by default but can be easily enabled to enhance your development workflow.
|
||||
|
||||
<ImageZoom src="/assets/images/preview-deployments.png" width={800} height={630} alt='Preview deployments' className="rounded-lg" />
|
||||
|
||||
<Callout type="info">
|
||||
We recommend not using preview deployments for public repositories, since external people can execute builds and deployments in your server.
|
||||
</Callout>
|
||||
|
||||
## Configuration
|
||||
|
||||
By default, Dokploy generates dynamic domains using traefik.me domains, which are free and require no additional configuration. The default port is 3000, but you can adjust this based on your application's requirements. You can also limit the number of preview deployments per application (default is 3).
|
||||
|
||||
### Custom Domains
|
||||
|
||||
If you prefer using a custom domain, you can configure it like this:
|
||||
|
||||
```
|
||||
*.mydomain.com
|
||||
```
|
||||
|
||||
Dokploy will generate domains following this pattern:
|
||||
|
||||
```
|
||||
preview-${appName}-${uniqueId}.traefik.me
|
||||
```
|
||||
|
||||
To make this work, you need to point your wildcard DNS record (*) to your server's IP address.
|
||||
|
||||
## How It Works
|
||||
|
||||
Once enabled, preview deployments are automatically created whenever a pull request is opened against your target branch (configured in your provider settings).
|
||||
|
||||
For example:
|
||||
- If your provider is configured to use the `main` branch
|
||||
- And you create a pull request from `feature/new-feature` to `main`
|
||||
- A preview deployment will be automatically created for the `feature/new-feature` branch
|
||||
|
||||
Note: Pull requests to branches other than your configured target branch will not trigger preview deployments.
|
||||
|
||||
### Filtering labels
|
||||
|
||||
If you only want pull requests with a specific label to create preview deployments, you can specify one or multiple in the preview settings.
|
||||
Dokploy will check that at least one of the labels is present on the pull request. If you leave the settings field empty, Dokploy will create
|
||||
preview deployments for all pull requests, regardless of labels.
|
||||
|
||||
### Monitoring Deployments
|
||||
|
||||
When you open a pull request, you can monitor the deployment progress in the preview deployments section:
|
||||
|
||||
<ImageZoom src="/assets/images/preview-deploy.png" width={800} height={630} alt='Preview deployments build' className="rounded-lg" />
|
||||
|
||||
In this section, you can:
|
||||
- View the deployment status
|
||||
- Access the preview URL once deployed
|
||||
- Check build and deployment logs
|
||||
- Monitor deployment updates
|
||||
- Update domain configuration
|
||||
|
||||
### Automatic Updates
|
||||
|
||||
The preview deployment will automatically:
|
||||
- Update with each new commit to the pull request
|
||||
- Create a new build and deployment
|
||||
- Clean up when the pull request is closed or merged
|
||||
|
||||
This continuous preview system allows teams to review and test changes in isolation before merging to production.
|
||||
|
||||
<Callout type="info">
|
||||
If you have security or redirects created in your application, it will inherit the same configuration for the preview deployment.
|
||||
</Callout>
|
||||
@@ -1,84 +0,0 @@
|
||||
---
|
||||
title: Rollbacks
|
||||
description: Learn how to rollback your application in Dokploy.
|
||||
---
|
||||
|
||||
Rollbacks are a powerful feature that allows you to easily revert changes to your application. This is particularly useful when you encounter issues or want to revert to a previous version of your application.
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
1. Have a `/health` endpoint in your application.
|
||||
2. Have `curl` available in your container (if you use alpine for example, it won't be installed by default).
|
||||
|
||||
## Steps to Rollback
|
||||
|
||||
|
||||
Let's suppose we have a NodeJS application that has a health check route `/api/health` that returns a 200 status code and running in the port 3000.
|
||||
|
||||
1. In your application is necessary to have a `Path` or `Health Route` to be able to achieve zero downtime deployments eg. in the case of a NodeJS app you can have a route `/api/health` that returns a 200 status code.
|
||||
2. Go to `Advanced` Tab and go to Cluster Settings and enter to `Swarm Settings`
|
||||
3. There are a couple options that you can use, in this case we will focus on `Health Check` and `Update Config`.
|
||||
4. Paste this code in the health check field:
|
||||
Make sure the API Route exists in your application
|
||||
|
||||
```json
|
||||
{
|
||||
"Test": [
|
||||
"CMD",
|
||||
"curl",
|
||||
"-f",
|
||||
"http://localhost:3000/api/health"
|
||||
],
|
||||
"Interval": 30000000000,
|
||||
"Timeout": 10000000000,
|
||||
"StartPeriod": 30000000000,
|
||||
"Retries": 3
|
||||
}
|
||||
```
|
||||
5. Now in the `Update Config`
|
||||
|
||||
Now when the application is getting unhealthy response from the health check, the container will rollback to the previous version.
|
||||
|
||||
Paste the following code:
|
||||
```json
|
||||
{
|
||||
"Parallelism": 1,
|
||||
"Delay": 10000000000,
|
||||
"FailureAction": "rollback",
|
||||
"Order": "start-first"
|
||||
}
|
||||
```
|
||||
|
||||
## Rollback to a specific version
|
||||
|
||||
The previous steps covered Docker Swarm's automatic rollback feature. Since v0.23.0, Dokploy also supports manual rollbacks to specific deployment points, giving you more control over your application versions.
|
||||
|
||||
### Enabling Rollback Feature
|
||||
|
||||
To start saving deployment snapshots for rollbacks:
|
||||
|
||||
1. Navigate to your application
|
||||
2. Go to **Deployments** → **Rollback Settings**
|
||||
3. Enable the **Rollback** option
|
||||
|
||||
### How it works
|
||||
|
||||
- **Automatic snapshots**: Every time you deploy, Dokploy creates a rollback point associated with that deployment
|
||||
- **Manual rollback**: Click the **Rollback** button next to any deployment to revert to that specific version
|
||||
- **Automatic cleanup**: When old deployments are deleted, their associated rollback snapshots and images are also removed to save space
|
||||
|
||||
### Performing a rollback
|
||||
|
||||
1. Go to your application's **Deployments** section
|
||||
2. Find the deployment version you want to rollback to
|
||||
3. Click the **Rollback** button next to that deployment
|
||||
4. Confirm the rollback action
|
||||
|
||||
<Callout type="info">
|
||||
Having rollbacks enabled will increase storage usage, as it saves previous versions of your application. Consider your storage capacity when enabling this feature.
|
||||
</Callout>
|
||||
|
||||
<Callout type="warning">
|
||||
**Important**: If you manually clean Docker images using commands like `docker image prune` or `docker system prune`, the rollback snapshots may be lost. Avoid cleaning Docker images if you want to preserve your rollback history.
|
||||
</Callout>
|
||||
@@ -1,76 +0,0 @@
|
||||
---
|
||||
title: Zero Downtime
|
||||
description: Learn how to configure zero downtime deployments in Dokploy.
|
||||
---
|
||||
|
||||
|
||||
Dokploy allows you to configure zero downtime deployments, which means that you can deploy your application without any downtime.
|
||||
|
||||
By default when you create a new deployment it will stop the latest running container and start the new one. This is the default behavior of Docker Swarm and this leads to Bad Gateway since
|
||||
the containers are initializing at the same time,
|
||||
but Dokploy allows you to configure zero downtime deployments.
|
||||
|
||||
## Steps to configure Zero Downtime Deployments
|
||||
|
||||
Let's suppose we have a NodeJS application that has a health check route `/api/health` that returns a 200 status code and running in the port 3000.
|
||||
|
||||
1. In your application is necessary to have a `Path` or `Health Route` to be able to achieve zero downtime deployments eg. in the case of a NodeJS app you can have a route `/api/health` that returns a 200 status code.
|
||||
2. Go to `Advanced` Tab and go to Cluster Settings and enter to `Swarm Settings`
|
||||
3. There are a couple options that you can use, in this case we will focus on `Health Check`.
|
||||
4. Paste this code in the health check field:
|
||||
Make sure the API Route exists in your application
|
||||
|
||||
```json
|
||||
{
|
||||
"Test": [
|
||||
"CMD",
|
||||
"curl",
|
||||
"-f",
|
||||
"http://localhost:3000/api/health"
|
||||
],
|
||||
"Interval": 30000000000,
|
||||
"Timeout": 10000000000,
|
||||
"StartPeriod": 30000000000,
|
||||
"Retries": 3
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
1. We will use this example [Github Repo](https://github.com/Dokploy/swarm-test)
|
||||
2. It Have a endpoint called `health` [endpoint](https://github.com/Dokploy/swarm-test/blob/main/index.js#L20) which is the one that will tell us if our application is healthy.
|
||||
3. For testing purpose I've added a sleep to simulate the delay between the deployments and you can see the bad gateway error.
|
||||
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/swarm-test`
|
||||
- Branch: `main`
|
||||
- Build path: `/`
|
||||
|
||||
If you want to test that there is no zero downtime yet, you can simply deploy the application and then create another deployment and while doing the deployment reload the page in the path /health and you will see that a bad gateway will appear.
|
||||
|
||||
Now go to the advanced section of our application, and go to the Swarm Settings section, we are going to modify the first section of Healtchecks.
|
||||
|
||||
We will use this configuration specifically, paste and save it
|
||||
|
||||
```json
|
||||
{
|
||||
"Test": [
|
||||
"CMD",
|
||||
"curl",
|
||||
"-f",
|
||||
"http://localhost:3000/health"
|
||||
],
|
||||
"Interval": 30000000000,
|
||||
"Timeout": 10000000000,
|
||||
"StartPeriod": 30000000000,
|
||||
"Retries": 3
|
||||
}
|
||||
```
|
||||
|
||||
This configuration basically tells to Docker to do:
|
||||
|
||||
Make a request inside the container to http://localhost:3000/health and then we are also saying to make in interval of 30000000000 nanosec, and also makes 3 retries before switching to the new container
|
||||
|
||||
that would be all, Now you have Zero Downtime Deployments 🎊.
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
title: 'Architecture of Dokploy'
|
||||
description: 'Overview of the core architecture components of Dokploy.'
|
||||
---
|
||||
|
||||
Understanding the architecture of Dokploy is crucial for both deploying and scaling applications. Below is a diagram illustrating the core components:
|
||||
|
||||
<ImageZoom src="/assets/architecture.png" alt="Architecture Diagram" width={1000} height={600} className="rounded-lg"/>
|
||||
|
||||
|
||||
## Installation Process
|
||||
|
||||
When Dokploy is installed, it automatically sets up the following components:
|
||||
|
||||
1. **Next.js Application**: Serves as the frontend interface. Utilizing Next.js allows for an integrated server-side rendering experience, streamlining the UI and backend into a single cohesive application.
|
||||
2. **PostgreSQL Database**: Acts as the primary database for Dokploy, chosen for its robustness and widespread adoption. It stores all the configuration and operational data.
|
||||
3. **Redis Database**: Employed for managing deployment queues. This ensures that multiple deployments do not trigger simultaneously, which could lead to high server load and potential freezing.
|
||||
4. **Traefik**: Used as a reverse proxy and load balancer. Traefik facilitates dynamic routing and service discovery which simplifies the configuration process by allowing declarative setup through the UI.
|
||||
|
||||
## Purpose and Functionality
|
||||
|
||||
Each component in the Dokploy architecture plays a vital role:
|
||||
|
||||
- **Next.js**: Provides a scalable and easy-to-manage frontend framework, encapsulating both server and client-side logic in one platform. This simplifies deployment and development workflows.
|
||||
- **PostgreSQL**: Delivers reliable and secure data storage capabilities. Its use within Dokploy ensures consistency and high performance for all database operations.
|
||||
- **Redis**: Handles concurrency and job scheduling. By using Redis, Dokploy can efficiently manage deployment tasks, avoiding collisions and server overload during simultaneous operations.
|
||||
- **Traefik**: Enhances Docker integration. Its ability to read from and write to Docker configurations declaratively allows Dokploy to automate and streamline network traffic management and service discovery.
|
||||
|
||||
This structure ensures that Dokploy is not only efficient in deploying applications but also robust in handling traffic and data at scale.
|
||||
@@ -1,111 +0,0 @@
|
||||
---
|
||||
title: Auto Deploy
|
||||
description: Automatically deploying your application to Dokploy can be achieved through two primary methods using Webhooks or the Dokploy API. Each method supports various platforms and provides a streamlined deployment process.
|
||||
---
|
||||
|
||||
## Supported Services:
|
||||
|
||||
Auto deploy is only valid for the following services:
|
||||
|
||||
- Applications
|
||||
- Docker Compose
|
||||
|
||||
## Github
|
||||
|
||||
For Github, we provide autodeploy without any configuration. This will automatically deploy your application whenever you push to your repository.
|
||||
|
||||
## Webhook URL
|
||||
|
||||
Webhooks allow you to automatically deploy your application whenever changes are made in your source repository.
|
||||
|
||||
- GitHub
|
||||
- GitLab
|
||||
- Bitbucket
|
||||
- Gitea
|
||||
- DockerHub (Only for Applications)
|
||||
|
||||
|
||||
|
||||
### Configuration Steps
|
||||
|
||||
1. **Enable Auto Deploy**: Toggle the 'Auto Deploy' button found in the general tab of your application settings in Dokploy.
|
||||
2. **Obtain Webhook URL**: Locate the Webhook URL from the deployment logs.
|
||||
|
||||
<ImageZoom
|
||||
src="/assets/webhook-url.png"
|
||||
alt="Webhook URL"
|
||||
width={1000}
|
||||
height={500}
|
||||
/>
|
||||
|
||||
3. **Configure Your Repository**:
|
||||
- Navigate to your repository settings on your chosen platform.
|
||||
- Add the webhook URL provided by Dokploy.
|
||||
- Ensure the settings match the configuration necessary for triggering the webhook.
|
||||
|
||||
<ImageZoom
|
||||
src="/assets/webhook-github.png"
|
||||
alt="Webhook URL"
|
||||
width={1000}
|
||||
height={500}
|
||||
/>
|
||||
|
||||
#### Important Notes
|
||||
|
||||
- **Branch Matching**: When using Git-based providers (GitHub, GitLab, Gitea, etc.), ensure that the branch configured in Dokploy matches the branch you intend to push to. Misalignment will result in a "Branch Not Match" error.
|
||||
- **Docker Tags**: For deployments using DockerHub, ensure the tag pushed matches the one specified in Dokploy.
|
||||
- The steps are the same for all the providers.
|
||||
|
||||
|
||||
<Callout type="info">
|
||||
The steps are almost the same for all the Git providers, GitHub, GitLab, Bitbucket, Gitea.
|
||||
</Callout>
|
||||
|
||||
|
||||
## Dockerhub (Only Applications)
|
||||
|
||||
To setup auto deploys for Dockerhub, follow the steps below:
|
||||
|
||||
1. Go to your application and select `Deployments` tab.
|
||||
2. Copy the `Webhook URL`.
|
||||
3. Go to your Dockerhub repository and select `Webhooks` tab.
|
||||
4. Set a name for the webhook and paste the `Webhook URL` copied in step 2.
|
||||
5. That's it, now every time you push to your repository, your application will trigger a deployment in dokploy.
|
||||
|
||||
The deployment will trigger only if the `Tag` matches the one specified in Dokploy.
|
||||
|
||||
## API Method
|
||||
|
||||
Deploy your application programmatically using the Dokploy API from anywhere, this is useful when you want to trigger a deployment from a CI/CD pipeline or from a script.
|
||||
|
||||
### Steps to Deploy Using API
|
||||
|
||||
Steps:
|
||||
|
||||
1. **Generate a Token**: Create an API token in your profile settings on Dokploy.
|
||||
2. **Retrieve Application ID**:
|
||||
|
||||
```http
|
||||
curl -X 'GET' \
|
||||
'https://your-domain/api/project.all' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'x-api-key: <token>'
|
||||
```
|
||||
|
||||
This command lists all projects and services. Identify the applicationId for the application you wish to deploy.
|
||||
|
||||
3. **Trigger Deployment**:
|
||||
|
||||
```http
|
||||
curl -X 'POST' \
|
||||
'https://your-domain/api/application.deploy' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'x-api-key: <token>' \
|
||||
-d '{
|
||||
"applicationId": "string"
|
||||
}'
|
||||
```
|
||||
|
||||
This API method allows for flexible, scriptable deployment options, suitable for automated systems or situations where direct repository integration is not feasible.
|
||||
In this way you can deploy your application from anywhere, you can use the webhook URL or the API.
|
||||
@@ -1,60 +0,0 @@
|
||||
---
|
||||
title: Backups
|
||||
description: 'Learn how to create and restore backups of your Dokploy applications and services.'
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
Dokploy provides a comprehensive backup and restore system that saves your entire Dokploy file system and database to ensure your data is safe and recoverable.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before using the backup feature, you need to have an S3 destination configured in your system. This is where your backups will be stored.
|
||||
|
||||
## Creating Backups
|
||||
|
||||
To create a backup:
|
||||
|
||||
1. Navigate to Web Server → Backups
|
||||
2. Select "Create Backup"
|
||||
3. Choose your S3 destination
|
||||
4. Configure the backup schedule using cron syntax (optional)
|
||||
|
||||
When a backup is created, Dokploy will:
|
||||
- Back up the PostgreSQL database (`dokploy-postgres`)
|
||||
- Save the Dokploy file system (`/etc/dokploy`)
|
||||
- Combine and compress both into a single backup file (.zip)
|
||||
- Upload the backup to your specified S3 destination
|
||||
|
||||
## Restoring Backups
|
||||
|
||||
To restore a backup:
|
||||
|
||||
1. Navigate to Web Server → Backups
|
||||
2. Select "Restore Backup"
|
||||
3. Choose the S3 destination containing your backup
|
||||
4. Browse and select the backup file you want to restore
|
||||
5. Review the summary of files to be restored
|
||||
|
||||
During restoration, Dokploy will:
|
||||
- Clear the existing `/etc/dokploy` directory and replace it with the backup contents
|
||||
- Drop the existing `dokploy-postgres` database
|
||||
- Disconnect current database users
|
||||
- Restore the database from the backup
|
||||
|
||||
<Callout type="info">
|
||||
After restoration is complete, you may need to log in again. If necessary, you can restart Traefik to ensure all services are properly configured.
|
||||
</Callout>
|
||||
|
||||
## Post-Restoration Steps
|
||||
|
||||
After restoring a backup, especially if you're restoring to a different server, consider the following:
|
||||
|
||||
1. If your server IP has changed:
|
||||
- Update the IP address in Web Server → Server → Update IP
|
||||
- Reconfigure Git providers if they were set up using IP addresses
|
||||
- Update your DNS records to point to the new IP
|
||||
- Recreate Traefik.me domains if you're using them
|
||||
|
||||
2. If you're using domain names instead of IPs for Git providers, no additional configuration is needed.
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
title: Certificates
|
||||
description: 'Configure your certificates to secure your applications.'
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
Dokploy offers a UI to manage your certificates.
|
||||
|
||||
|
||||
We expose a UI to create and delete the certificates, we ask two fields:
|
||||
|
||||
1. **Name**: Enter a name for the certificate (this can be anything you choose).
|
||||
2. **Certificate Data**: Provide the certificate details.
|
||||
3. **Private Key**: Enter the private key.
|
||||
4. **(Optional) Server**: If you want to create a certificate for a server, you can select it here.
|
||||
|
||||
<Callout type='warn'>
|
||||
This action will create the files, but that doesn't mean it will work automatically. You need to adjust the Traefik configuration to use it, this configuration will make
|
||||
to traefik can recognize the certificate.
|
||||
</Callout>
|
||||
|
||||
## Traefik.me HTTPS Setup
|
||||
|
||||
By default, all the domains from `traefik.me` are HTTP only, if you want to use HTTPS you need to create a certificate and use it in the domain settings.
|
||||
|
||||
You need to download the full https://traefik.me/fullchain.pem and https://traefik.me/privkey.pem, this are valid for 30 days.s
|
||||
|
||||
The fullchain.pem paste in the `Certificate Data` field and the privkey.pem paste in the `Private Key` field.
|
||||
|
||||
Now when using the traefik.me domains, make sure to enable `HTTPS` toggle and select the certificate provider set `None`
|
||||
|
||||
If you want to remove the certificate, just remove the certificate and in your domains settings remove the `HTTPS` toggle.
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: Dokploy Cloud
|
||||
description: "Deploy your apps to multiple servers remotely without worrying about the underlying infrastructure."
|
||||
---
|
||||
|
||||
|
||||
Dokploy Cloud allows you to deploy your apps to a cloud provider of your choice. This means that you can deploy your apps to any cloud provider, such as AWS, GCP, Azure, or DigitalOcean, without having to worry about the underlying infrastructure.
|
||||
|
||||
|
||||
By default when you install Dokploy in a Self Hosted version, if you deploy all your applications by default they will be deployed on the same server where Dokploy UI is installed. This means that you will need to build and run your applications where Dokploy
|
||||
UI is installed, which can be a challenge if you don't have the resources to do so, also self hosted support for remote instances.
|
||||
|
||||
|
||||
Dokploy cloud starts from $4.50 per month per server, the next is 3.50$, and you can deploy as many applications you want to your remote server connected to a dokploy cloud, multi server feature is recommended for HA and scalability projects.
|
||||
|
||||
You can start by registering on the [Dokploy Cloud](https://app.dokploy.com) website and follow the steps to deploy your apps, see the [Pricing](https://dokploy.com#pricing) page for more information.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
---
|
||||
title: Cluster
|
||||
description: 'Manage server cluster settings.'
|
||||
---
|
||||
|
||||
When you deploy applications in dokploy, all of them run on the same node. If you wish to run an application on a different server, you can use the cluster feature.
|
||||
|
||||
The idea of using clusters is to allow each server to host a different application and, using Traefik along with the load balancer, redirect the traffic from the dokploy server to the servers you choose.
|
||||
|
||||
## Server Scaling Methods
|
||||
|
||||
There are two primary ways to scale your server:
|
||||
|
||||
1. **Vertical Scaling**: This involves adding more resources to the same dokploy server, such as more CPU and RAM.
|
||||
2. **Horizontal Scaling**: This method involves adding multiple servers.
|
||||
|
||||
### Vertical Scaling
|
||||
|
||||
We recommend using vertical scaling to increase the processing capacity of your applications since it's faster and requires less additional configuration.
|
||||
|
||||
To perform vertical scaling, you need to add more resources to your dokploy server, that is, more CPU and RAM. This is done through your VPS provider.
|
||||
|
||||
It's ideal to first check the vertical scaling limit you can handle. If you find it insufficient, you may consider horizontal scaling.
|
||||
|
||||
### Horizontal Scaling
|
||||
|
||||
Horizontal scaling usually requires more additional configuration and involves adding more servers (VPS).
|
||||
|
||||
If you choose the second option, we will proceed to configure the different servers.
|
||||
|
||||
## Requirements for Cluster Setup
|
||||
|
||||
1. dokploy server running (Manager).
|
||||
2. Have at least one extra server with the same architecture as the dokploy server.
|
||||
3. Have a Docker registry.
|
||||
|
||||
## Configuring the Docker Registry
|
||||
|
||||
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.
|
||||
|
||||
### External Registry
|
||||
|
||||
You can use any external registry of your choice. Here are some popular options:
|
||||
|
||||
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
|
||||
|
||||
Make sure to enter the correct credentials and test the connection before adding the registry to your cluster configuration.
|
||||
|
||||
Once configured, the Cluster section will be unlocked.
|
||||
|
||||
## Understanding Docker Swarm
|
||||
|
||||
We suggest you read this information to better understand how Docker Swarm works and its orchestration: [Docker Swarm documentation](https://docs.docker.com/engine/swarm/) and its architecture: [How Swarm mode works](https://docs.docker.com/engine/swarm/how-swarm-mode-works/nodes/).
|
||||
|
||||
## Managing Your Cluster
|
||||
|
||||
Now you can do two things:
|
||||
|
||||
1. Add workers.
|
||||
2. Add managers.
|
||||
|
||||
Managers have two functionalities:
|
||||
|
||||
1. Manage the cluster state.
|
||||
2. Schedule the services.
|
||||
|
||||
Workers have a single purpose, which is to run the containers, acting under the rules created or established by the manager.
|
||||
|
||||
## Adding Nodes
|
||||
|
||||
You can click the 'Add Node' button, which will display the instructions you need to follow to add your servers as nodes and join them to the dokploy manager node.
|
||||
|
||||
<ImageZoom src="/assets/add-node.png" width={800} height={630} className="rounded-lg"/>
|
||||
|
||||
Once you follow the instructions, the workers or managers will appear in the table.
|
||||
|
||||
<ImageZoom src="/assets/nodes.png" width={800} height={630} className="rounded-lg"/>
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
title: "Comparison"
|
||||
description: "A comparison of Dokploy, CapRover, Dokku, and Coolify"
|
||||
---
|
||||
|
||||
Comparison of the following deployment tools:
|
||||
|
||||
| Feature | Dokploy | CapRover | Dokku | Coolify |
|
||||
| --------------------------------------- | ------- | --------------------- | --------------------- | ------- |
|
||||
| **User Interface** | ✅ | ✅ | ❌ | ✅ |
|
||||
| **Docker compose support** | ✅ | ❌ | ❌ | ✅ |
|
||||
| **API/CLI** | ✅ | ✅ | ✅ | ✅ |
|
||||
| **Multi node support** | ✅ | ✅ | ❌ | ✅ |
|
||||
| **Traefik Integration** | ✅ | ✅ | Available via Plugins | ✅ |
|
||||
| **User Permission Management** | ✅ | ❌ | ❌ | ✅ |
|
||||
| **Bitbucket Integration** | ✅ | ❌ | ❌ | ❌ |
|
||||
| **Gitlab Integration** | ✅ | ❌ | ❌ | ❌ |
|
||||
| **Gitea Integration** | ✅ | ❌ | ✅ | ❌ |
|
||||
| **Advanced User Permission Management** | ✅ | ❌ | ❌ | ❌ |
|
||||
| **Terminal Access Built In** | ✅ | ❌ | ❌ | ✅ |
|
||||
| **Database Support** | ✅ | ✅ | ❌ | ✅ |
|
||||
| **Monitoring** | ✅ | ✅ | ❌ | ❌ |
|
||||
| **Backups** | ✅ | Available via Plugins | Available via Plugins | ✅ |
|
||||
| **Open Source** | ✅ | ✅ | ✅ | ✅ |
|
||||
| **Notifications** | ✅ | ❌ | ❌ | ✅ |
|
||||
| **Multi Server Support** | ✅ | ❌ | ❌ | ✅ |
|
||||
| **Open Source Templates** | ✅ | ✅ | ❌ | ✅ |
|
||||
| **Rollbacks** | ✅ | ✅ | ❌ | ✅ |
|
||||
| **Shared Enviroment Variables** | ✅ | ❌ | ❌ | ✅ |
|
||||
| **Environments** | ✅ | ❌ | ❌ | ✅ |
|
||||
| **Schedules Jobs** | ✅ | ❌ | ❌ | ✅ |
|
||||
| **Cloudflare Tunnels** | ❌ | ❌ | ❌ | ✅ |
|
||||
| **Volume Backups** | ✅ | ❌ | ❌ | ❌ |
|
||||
| **Preview Deployments** | ✅ | ❌ | ❌ | ✅ |
|
||||
| **Teams** | ✅ | ❌ | ❌ | ✅ |
|
||||
| **Cloud/Paid Version** | ✅ | ✅ | ✅ | ✅ |
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: Backups
|
||||
description: "Learn how to schedule and manage backups for your databases in Dokploy, with options for storage in S3 buckets."
|
||||
---
|
||||
|
||||
Dokploy provides an integrated solution for backing up your databases, ensuring data safety and recovery capabilities.
|
||||
|
||||
## Backing Up Your Database
|
||||
|
||||
To configure database backups, navigate to the `Backup` tab within your Dokploy dashboard. Here’s what you’ll need to set up:
|
||||
|
||||
- **Select Destination S3 Bucket**: Specify where your backups will be stored. Buckets can be configured in the `/dashboard/settings/destinations` route.
|
||||
- **Database Name**: Enter the name of the database you want to backup.
|
||||
- **Schedule Cron**: Define the schedule for your backups using cron syntax.
|
||||
- **Prefix**: Choose a prefix under which backups will be stored in your bucket.
|
||||
- **Enabled**: Toggle whether backups are active. The default setting is enabled.
|
||||
|
||||
### Testing Your Backup Configuration
|
||||
|
||||
To ensure your backup settings are correctly configured:
|
||||
|
||||
1. Click the `Test` button.
|
||||
2. This will initiate a test backup to the S3 bucket you selected.
|
||||
3. Check the bucket to see the result of the test backup.
|
||||
|
||||
This feature provides peace of mind by verifying that your backup process is set up correctly before relying on it for operational backups.
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
title: Connection
|
||||
description: "Learn how to connect to your database using Dokploy."
|
||||
---
|
||||
|
||||
This section explains how to configure database access for applications in Dokploy, including both internal connections within your network and external connections accessible over the internet.
|
||||
|
||||
### Internal Credentials
|
||||
|
||||
Used for connecting to the database from within the same network, without exposing the database to the internet.
|
||||
|
||||
- **User**: Username for the database access.
|
||||
- **Password**: Secure password for database access.
|
||||
- **Database Name**: The name of the database to connect to.
|
||||
- **Internal Host**: The hostname or internal identifier for the database within the network.
|
||||
- **Internal Port (Container)**: The port used within the container to connect to the database.
|
||||
- **Internal Connection URL**: The full connection string used internally to connect to the database.
|
||||
|
||||
### External Credentials
|
||||
|
||||
Enables the database to be reachable from the internet, necessary for remote management or external applications.
|
||||
|
||||
- **External Port (Internet)**: Assign a port that is not currently used by another service to expose the database externally.
|
||||
|
||||
#### Steps to Configure External Access
|
||||
1. Ensure the external port is available and not in conflict with other services.
|
||||
2. Enter the external port you wish to use to expose your database.
|
||||
3. The system will automatically generate an external connection URL, which can be used to access the database from any database management tool over the internet, like phpMyAdmin, MySQL Workbench, PgAdmin, etc.
|
||||
|
||||
### Important Note
|
||||
|
||||
For security reasons, internal credentials should be used for applications running within the same network or environment to prevent unauthorized access. External credentials should only be used when necessary and with proper security measures in place, such as VPNs or IP whitelisting.
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: MariaDB
|
||||
description: This guide will cover how to connect from Beekeeper Studio to your mariadb databases in dokploy.
|
||||
---
|
||||
|
||||
1. Download and install Beekeeper Studio [Beekeeper Studio](https://www.beekeeperstudio.io/get).
|
||||
2. Go to your `mariadb` databases.
|
||||
3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `3307` and click `Save`.
|
||||
4. It will display the `External Connection URL` eg. `mysql://user:password@1.2.4.5:3306/database`.
|
||||
|
||||
Open Beekeeper Studio and follow the steps:
|
||||
|
||||
1. Click on `Add New Server`.
|
||||
2. Select `MariaDB` as the `Database Type`.
|
||||
3. Use `Import URL` to enter the `External Connection URL` from Dokploy eg. `mysql://user:password@1.2.4.5:3306/database`.
|
||||
4. Click on `Connect`.
|
||||
5. Click on `Save`.
|
||||
|
||||
Done! now you can manage the database from Beekeeper Studio.
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
title: Mongo Compass
|
||||
description: This guide will cover how to configure a Mongo Compass connection for your applications in dokploy or panel.
|
||||
---
|
||||
|
||||
1. Download and install Mongo Compass [Mongo Compass](https://www.mongodb.com/try/download/compass).
|
||||
2. Go to your `MongoDB` databases.
|
||||
3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `27017` and click `Save`.
|
||||
4. It will display the `External Connection URL` eg. `mongodb://user:password@1.2.4.5:27017/database`.
|
||||
|
||||
Open Mongo Compass and follow the steps:
|
||||
|
||||
1. Click on `Add Connection`.
|
||||
2. Copy and paste the `External Connection URL` eg. `mongodb://user:password@1.2.4.5:27017/database`.
|
||||
3. Click on `Connect`.
|
||||
|
||||
|
||||
Done! now you can manage the database from Mongo Compass.
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: MySQL
|
||||
description: This guide will cover how to connect from Beekeeper Studio to your mysql databases in dokploy.
|
||||
---
|
||||
|
||||
1. Download and install Beekeeper Studio [Beekeeper Studio](https://www.beekeeperstudio.io/get).
|
||||
2. Go to your `mysql` databases.
|
||||
3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `3306` and click `Save`.
|
||||
4. It will display the `External Connection URL` eg. `mysql://user:password@1.2.4.5:3306/database`.
|
||||
|
||||
Open Beekeeper Studio and follow the steps:
|
||||
|
||||
1. Click on `Add New Server`.
|
||||
2. Select `MySQL` as the `Database Type`.
|
||||
3. Use `Import URL` to enter the `External Connection URL` from Dokploy eg. `mysql://user:password@1.2.4.5:3306/database`.
|
||||
4. Click on `Connect`.
|
||||
5. Click on `Save`.
|
||||
|
||||
Done! now you can manage the database from Beekeeper Studio.
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
title: PG Admin
|
||||
description: This guide will cover how to connect from pgAdmin to your postgres databases in dokploy.
|
||||
---
|
||||
|
||||
1. Download and install pgAdmin [pgAdmin](https://www.pgadmin.org/download/).
|
||||
2. Go to your `postgres` databases.
|
||||
3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `5433` and click `Save`.
|
||||
4. It will display the `External Connection URL` eg. `postgres://user:password@1.2.4.5:5433/database`.
|
||||
|
||||
|
||||
Open pgAdmin and follow the steps:
|
||||
|
||||
1. Click on `Add New Server`.
|
||||
2. Enter the `Server Name` eg. `dokploy`.
|
||||
3. Enter to `Connection`.
|
||||
4. In Hostname/Address enter the IP from the server where the database is hosted eg. `1.2.4.5`.
|
||||
5. In Port enter the port where the database is running eg. `5433`.
|
||||
6. In Database enter the name of the database eg. `database`.
|
||||
7. In Username enter the username eg. `user`.
|
||||
8. In Password enter the password eg. `password`.
|
||||
9. Click on `Save`.
|
||||
|
||||
Done! now you can manage the database from pgAdmin.
|
||||
@@ -1,21 +0,0 @@
|
||||
---
|
||||
title: Redis
|
||||
description: This guide will cover how to connect from RedisInsight to your redis databases in dokploy.
|
||||
---
|
||||
|
||||
1. Download and install RedisInsight [RedisInsight](https://redis.io/insight/).
|
||||
2. Go to your `redis` databases.
|
||||
3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `6379` and click `Save`.
|
||||
4. It will display the `External Connection URL` eg. `redis://user:password@1.2.4.5:6379/database`.
|
||||
|
||||
Open RedisInsight and follow the steps:
|
||||
|
||||
|
||||
1. Add Redis Database.
|
||||
2. Enter the `Host` eg. `1.2.4.5`.
|
||||
3. Enter the `Port` eg. `6379`.
|
||||
4. Enter the username eg. `default`.
|
||||
5. Enter the `Password` eg. `password`.
|
||||
6. Click on `Save`.
|
||||
|
||||
Done! now you can manage the database from RedisInsight.
|
||||
@@ -1,67 +0,0 @@
|
||||
---
|
||||
title: Databases
|
||||
description: "Discover how to create and backup databases easily with Dokploy, supporting a variety of database systems."
|
||||
---
|
||||
|
||||
Dokploy simplifies the process of creating and managing databases, offering robust options for both setup and backups.
|
||||
|
||||
## Database Support
|
||||
|
||||
Dokploy currently supports a range of popular database systems, ensuring compatibility and flexibility for your projects:
|
||||
|
||||
- **Postgres**: Robust, SQL-compliant and highly reliable.
|
||||
- **MySQL**: Widely used relational database known for its performance and flexibility.
|
||||
- **MariaDB**: A fork of MySQL with additional features and improved performance.
|
||||
- **MongoDB**: A NoSQL database known for its high scalability and flexibility.
|
||||
- **Redis**: An in-memory key-value store often used as a database, cache, and message broker.
|
||||
|
||||
|
||||
We offer multiple functionalities that you can use to manage your databases, such as:
|
||||
|
||||
## General
|
||||
|
||||
Actions like deploying, updating, and deleting your database, and stopping it.
|
||||
|
||||
## Environment
|
||||
|
||||
If you need to assign environment variables to your application, you can do so here.
|
||||
|
||||
In case you need to use a multiline variable, you can wrap it in double quotes just like this `'"here_is_my_private_key"'`.
|
||||
|
||||
## Monitoring
|
||||
|
||||
Four graphs will be displayed for the use of memory, CPU, disk, and network. Note that the information is only updated if you are viewing the current page, otherwise it will not be updated.
|
||||
|
||||
## Backups
|
||||
|
||||
We offer automated backups for your databases, ensuring that you can recover your data quickly and easily in case of any issues, you can setup a S3 Destinations in settings to store your backups.
|
||||
|
||||
|
||||
## Logs
|
||||
|
||||
If you want to see any important logs from your application that is running, you can do so here and determine if your application is displaying any errors or not.
|
||||
|
||||
## Advanced
|
||||
|
||||
This section provides advanced configuration options for experienced users. It includes tools for custom commands within the container, managing Docker Swarm settings, and adjusting cluster settings such as replicas and registry selection. These tools are typically not required for standard application deployment and are intended for complex management and troubleshooting tasks.
|
||||
|
||||
- **Custom Docker Image**: You can change the Docker image used to run your database.
|
||||
- **Run Command**: Execute custom commands directly in the container for advanced management or troubleshooting.
|
||||
- **Volumes**: To ensure data persistence across deployments, configure storage volumes for your application.
|
||||
- **Resources**: Adjust the CPU and memory allocation for your application.
|
||||
- **Danger Zone**: If for some reason you want to start again and delete all the data, tables, etc. you can do it here.
|
||||
|
||||
## Keyboard Shortcuts
|
||||
|
||||
To help speed up navigating there are some built in keyboard shortcuts for
|
||||
navigating tabs on database pages. Similar to GitHub these are all prefixed
|
||||
with the `g` key so to use them press `g` and then the shortcut key.
|
||||
|
||||
| Key | Tab |
|
||||
| --- | ------------------- |
|
||||
| `g` | General |
|
||||
| `e` | Environment |
|
||||
| `l` | Logs |
|
||||
| `m` | Monitoring |
|
||||
| `b` | Backups |
|
||||
| `a` | Advanced |
|
||||
@@ -1,58 +0,0 @@
|
||||
---
|
||||
title: Restore
|
||||
description: "Learn how to restore your databases in Dokploy, with options for restoring from S3 buckets."
|
||||
---
|
||||
|
||||
|
||||
|
||||
## Restoring from S3 Buckets
|
||||
|
||||
To restore your database from an S3 bucket, navigate to the `Backup` tab and click on the `Restore` button within your Dokploy dashboard. Here’s what you’ll need to set up:
|
||||
|
||||
- **Select Source S3 Bucket**: Specify the S3 bucket where your backup files are stored.
|
||||
- **Search for Backup File**: Enter the name of the backup file you want to restore(it will autocomplete based on the files in the bucket)
|
||||
- **Database Name**: Enter the name of the database you want to restore to.
|
||||
- **Restore Database**: Click the `Restore` button to start the restoration process.
|
||||
|
||||
If you previously used the backups generated by dokploy, it will automatically use the correct commands to restore your database.
|
||||
|
||||
Other formats are not guaranteed to work.
|
||||
|
||||
<Callout type="info">
|
||||
If you have nested folders in your S3 Bucket, you can start typing the folder name and it will autocomplete.
|
||||
|
||||
eg. If you have a folder called `backups` and you have a backup file called `backup.sql.gz`, you can start typing `backups/` and it will autocomplete to `backups/backup.sql.gz`.
|
||||
</Callout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Default Backup Commands
|
||||
|
||||
This are the default commands that Dokploy uses to generate the backups.
|
||||
|
||||
### Postgres
|
||||
|
||||
```bash
|
||||
pg_dump -Fc --no-acl --no-owner -h localhost -U ${databaseUser} --no-password '${database}' | gzip"
|
||||
```
|
||||
|
||||
### MySQL
|
||||
|
||||
```bash
|
||||
mysqldump --default-character-set=utf8mb4 -u 'root' --password='${databaseRootPassword}' --single-transaction --no-tablespaces --quick '${database}' | gzip"
|
||||
```
|
||||
|
||||
### MariaDB
|
||||
|
||||
```bash
|
||||
mariadb-dump --user='${databaseUser}' --password='${databasePassword}' --databases ${database} | gzip"
|
||||
```
|
||||
|
||||
### MongoDB
|
||||
|
||||
```bash
|
||||
mongodump -d '${database}' -u '${databaseUser}' -p '${databasePassword}' --archive --authenticationDatabase=admin --gzip"
|
||||
```
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
---
|
||||
title: Domains
|
||||
description: Configure domains for your Docker Compose application.
|
||||
---
|
||||
|
||||
When using Docker Compose, adding a domain to a service is a straightforward process. This guide will walk you through the necessary steps to configure manual domains for your application.
|
||||
|
||||
Key Steps:
|
||||
|
||||
1. Add the service to the `dokploy-network`.
|
||||
2. Use Traefik labels to configure routing.
|
||||
|
||||
import { Callout } from "fumadocs-ui/components/callout";
|
||||
|
||||
<Callout title="Attention" type="info">
|
||||
Since v0.7.0 Dokploy support domains natively. This means that you can
|
||||
configure your domain directly in the Dokploy UI, without doing the rest of
|
||||
the steps check on the [domains section](/docs/core/domains).
|
||||
</Callout>
|
||||
|
||||
Example Scenario
|
||||
|
||||
Let's consider an application with three components: a frontend, a backend, and a database. We'll start with a basic Docker Compose file and then enhance it with domain configuration.
|
||||
|
||||
```yaml
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
ports:
|
||||
- "5000:5000"
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:password@database:5432/mydatabase
|
||||
depends_on:
|
||||
- database
|
||||
|
||||
database:
|
||||
image: postgres:13
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: mydatabase
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
```
|
||||
|
||||
## Step 1: Add the Network
|
||||
|
||||
First, we'll add the dokploy-network to our services:
|
||||
|
||||
```yaml
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
frontend:
|
||||
# ... (previous configuration)
|
||||
networks:
|
||||
- dokploy-network
|
||||
|
||||
backend:
|
||||
# ... (previous configuration)
|
||||
networks:
|
||||
- dokploy-network
|
||||
|
||||
database:
|
||||
# ... (previous configuration)
|
||||
networks:
|
||||
- dokploy-network
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
```
|
||||
|
||||
Step 2: Configuring Traefik Labels
|
||||
|
||||
Now, let's add Traefik labels to route domains to our services. We'll focus on the frontend and backend services:
|
||||
|
||||
```yaml
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
expose:
|
||||
- 3000
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- dokploy-network
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.frontend-app.rule=Host(`frontend.dokploy.com`)
|
||||
- traefik.http.routers.frontend-app.entrypoints=web
|
||||
- traefik.http.services.frontend-app.loadbalancer.server.port=3000
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
expose:
|
||||
- 5000
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:password@database:5432/mydatabase
|
||||
depends_on:
|
||||
- database
|
||||
networks:
|
||||
- dokploy-network
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.backend-app.rule=Host(`backend.dokploy.com`)
|
||||
- traefik.http.routers.backend-app.entrypoints=web
|
||||
- traefik.http.services.backend-app.loadbalancer.server.port=5000
|
||||
|
||||
database:
|
||||
# ... (same as before)
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
```
|
||||
|
||||
Understanding Traefik Labels
|
||||
|
||||
1. `traefik.enable=true` Enables Traefik routing for the service.
|
||||
2. `traefik.http.routers.<UNIQUE-RULE>.rule=Host('your-domain.dokploy.com')` Specifies the domain for the service
|
||||
3. `traefik.http.routers.<UNIQUE-RULE>.entrypoints=web` Sets the service to be accessible via HTTP.
|
||||
4. `traefik.http.services.<UNIQUE-RULE>.loadbalancer.server.port=3000` Specifies the port your service is using internally.
|
||||
|
||||
**Note**: Replace `<UNIQUE-RULE>` with a unique identifier for each service (e.g., frontend-app, backend-app, etc.).
|
||||
|
||||
## Important Considerations
|
||||
|
||||
1. **Port Exposure**: Use `expose` instead of `ports` to limit port access to the container network, avoiding exposure to the host machine.
|
||||
2. **DNS Configuration**: Ensure you create `A` records pointing to your domain in your DNS Provider Settings.
|
||||
3. **HTTPS**: For HTTPS, you can use Let's Encrypt or other SSL/TLS certificates.
|
||||
|
||||
## Deployment
|
||||
|
||||
With these configurations in place, you're now ready to deploy your application using Docker Compose. This setup should be sufficient to get your services up and running with custom domain routing through Traefik.
|
||||
|
||||
If you have any further questions or need assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc) and we'll be happy to help.
|
||||
@@ -1,110 +0,0 @@
|
||||
---
|
||||
title: "Example"
|
||||
description: "Learn how to use Docker Compose with Dokploy"
|
||||
|
||||
---
|
||||
|
||||
## Tutorial
|
||||
|
||||
In this tutorial, we will create a simple application using Docker Compose and route the traffic to an accessible domain.
|
||||
|
||||
|
||||
### Steps
|
||||
|
||||
1. Create a new project.
|
||||
2. Create a new service `Compose` and select the Compose Type `Docker Compose`.
|
||||
3. Fork this repository: [Repo](https://github.com/Dokploy/docker-compose-test).
|
||||
4. Select Provider type: GitHub or Git.
|
||||
5. Select the repository: `Dokploy/docker-compose-test`.
|
||||
6. Select the branch: `main`.
|
||||
7. Set the Compose Path to `./docker-compose.yml` and save.
|
||||

|
||||
|
||||
|
||||
### Updating Your `docker-compose.yml`
|
||||
|
||||
Add the following to your existing `docker-compose.yml` file:
|
||||
|
||||
1. Add the network `dokploy-network` to each service.
|
||||
2. Add labels for Traefik to make the service accessible through the domain.
|
||||
|
||||
Example:
|
||||
|
||||
Let's modify the following compose file to make it work with Dokploy:
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
next-app:
|
||||
build:
|
||||
context: ./next-app
|
||||
dockerfile: prod.Dockerfile
|
||||
args:
|
||||
ENV_VARIABLE: ${ENV_VARIABLE}
|
||||
NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE}
|
||||
restart: always
|
||||
ports:
|
||||
- 3000:3000
|
||||
networks:
|
||||
- my_network
|
||||
networks:
|
||||
my_network:
|
||||
external: true
|
||||
```
|
||||
|
||||
|
||||
Updated version with dokploy-network and Traefik labels:
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
<Callout type="warn">
|
||||
Don't set container_name property to the each service, it will cause issues with logs, metrics and other features
|
||||
</Callout>
|
||||
{/* :::danger
|
||||
Don't set container_name property to the each service, it will cause issues with logs, metrics and other features
|
||||
|
||||
::: */}
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
next-app:
|
||||
build:
|
||||
context: ./next-app
|
||||
dockerfile: prod.Dockerfile
|
||||
args:
|
||||
ENV_VARIABLE: ${ENV_VARIABLE}
|
||||
NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE}
|
||||
restart: always
|
||||
ports:
|
||||
- 3000
|
||||
networks:
|
||||
- dokploy-network
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.<unique-name>.rule=Host(`your-domain.com`)"
|
||||
- "traefik.http.routers.<unique-name>.entrypoints=websecure"
|
||||
- "traefik.http.routers.<unique-name>.tls.certResolver=letsencrypt"
|
||||
- "traefik.http.services.<unique-name>.loadbalancer.server.port=3000"
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
```
|
||||
|
||||
Make sure to point the A record to the domain you want to use for your service.
|
||||
|
||||
<ImageZoom src="/assets/images/compose/domain.png" width={800} height={630} alt='home og image' className="rounded-lg" />
|
||||
|
||||
Deploy the application by clicking on "deploy" and wait for the deployment to complete. Then give Traefik about 10 seconds to generate the certificates. You can then access the application through the domain you have set.
|
||||
|
||||
<ImageZoom src="/assets/images/compose/application.png" width={800} height={630} alt='home og image' className="rounded-lg" />
|
||||
|
||||
**Tips**:
|
||||
|
||||
1. Set unique names for each router: `traefik.http.routers.<unique-name>`
|
||||
2. Set unique names for each service: `traefik.http.services.<unique-name>`
|
||||
3. Ensure the network is linked to the `dokploy-network`
|
||||
4. Set the entry point to websecure and the certificate resolver to letsencrypt to generate certificates.
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
---
|
||||
title: Docker Compose
|
||||
description: "Learn how to use Docker Compose with Dokploy"
|
||||
---
|
||||
|
||||
import { Callout } from "fumadocs-ui/components/callout";
|
||||
|
||||
Dokploy integrates with Docker Compose and Docker Stack to provide flexible deployment solutions. Whether you are developing locally or deploying at scale, Dokploy facilitates application management through these powerful Docker tools.
|
||||
|
||||
### Configuration Methods
|
||||
|
||||
Dokploy provides two methods for creating Docker Compose configurations:
|
||||
|
||||
- **Docker Compose**: Ideal for standard Docker Compose configurations.
|
||||
- **Stack**: Geared towards orchestrating applications using Docker Swarm. Note that some Docker Compose features, such as `build`, are not available in this mode.
|
||||
|
||||
### General
|
||||
|
||||
Configure the source of your code, the way your application is built, and also manage actions like deploying, updating, and deleting your application, and stopping it.
|
||||
|
||||
### Enviroment
|
||||
|
||||
A code editor within Dokploy allows you to specify environment variables for your Docker Compose file. By default, Dokploy creates a `.env` file in the specified Docker Compose file path.
|
||||
|
||||
### Monitoring
|
||||
|
||||
Monitor each service individually within Dokploy. If your application consists of multiple services, each can be monitored separately to ensure optimal performance.
|
||||
|
||||
### Logs
|
||||
|
||||
Access detailed logs for each service through the Dokploy log viewer, which can help in troubleshooting and ensuring the stability of your services.
|
||||
|
||||
### Deployments
|
||||
|
||||
You can view the last 10 deployments of your application. When you deploy your application in real time, a new deployment record will be created and it will gradually show you how your application is being built.
|
||||
|
||||
We also offer a button to cancel deployments that are in queue. Note that those in progress cannot be canceled.
|
||||
|
||||
We provide a webhook so that you can trigger your own deployments by pushing to your GitHub, Gitea, GitLab, Bitbucket repository.
|
||||
|
||||
### Advanced
|
||||
|
||||
This section provides advanced configuration options for experienced users. It includes tools for custom commands within the container and volumes.
|
||||
|
||||
- **Command**: Dokploy has a defined command to run the Docker Compose file, ensuring complete control through the UI. However, you can append flags or options to the command.
|
||||
- **Volumes**: To ensure data persistence across deployments, configure storage volumes for your application.
|
||||
|
||||
<ImageZoom
|
||||
src="/assets/images/compose/overview.png"
|
||||
width={800}
|
||||
height={630}
|
||||
quality={100}
|
||||
priority
|
||||
alt="home og image"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
<Callout title="Volumes">
|
||||
Docker volumes are a way to persist data generated and used by Docker containers. They are particularly useful for maintaining data between container restarts or for sharing data among different containers.
|
||||
|
||||
To bind a volume to the host machine, you can use the following syntax in your docker-compose.yml file, but this way will clean up the volumes when a new deployment is made:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- "/folder:/path/in/container" ❌
|
||||
```
|
||||
|
||||
It's recommended to use the ../files folder to ensure your data persists between deployments. For example:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- "../files/my-database:/var/lib/mysql" ✅
|
||||
- "../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
|
||||
|
||||
To help speed up navigating there are some built in keyboard shortcuts for
|
||||
navigating tabs on docker compose pages. Similar to GitHub these are all prefixed
|
||||
with the `g` key so to use them press `g` and then the shortcut key.
|
||||
|
||||
| Key | Tab |
|
||||
| --- | ------------------- |
|
||||
| `g` | General |
|
||||
| `e` | Environment |
|
||||
| `u` | Domains |
|
||||
| `d` | Deployments |
|
||||
| `b` | Backups |
|
||||
| `s` | Schedules |
|
||||
| `v` | Volume Backups |
|
||||
| `l` | Logs |
|
||||
| `m` | Monitoring |
|
||||
| `a` | Advanced |
|
||||
@@ -1,63 +0,0 @@
|
||||
---
|
||||
title: Utilities
|
||||
description: "Utilities for your Docker Compose application"
|
||||
---
|
||||
|
||||
Dokploy provides a set of utilities to enhance your Docker Compose application deployment experience.
|
||||
|
||||
## Isolated Deployments
|
||||
|
||||
All open source templates come with this feature enabled by default.
|
||||
|
||||
This feature allows you to deploy your application in a separate network, isolated from other applications. This isolation is particularly useful when you need to deploy multiple instances of the same application.
|
||||
|
||||
For example, if you want to deploy two WordPress instances, you would typically encounter service naming conflicts since they share the same network (dokploy-network). Docker doesn't allow services with identical names in the same network. Consider this typical WordPress service:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
wordpress:
|
||||
image: wordpress:latest
|
||||
ports:
|
||||
- "80"
|
||||
```
|
||||
|
||||
<ImageZoom
|
||||
src="/assets/images/compose-isolate.png"
|
||||
alt="Isolated Deployments"
|
||||
width={1000}
|
||||
height={600}
|
||||
/>
|
||||
|
||||
When Isolated Deployments is enabled, Dokploy will:
|
||||
|
||||
1. Add a prefix to all your defined networks
|
||||
2. Create a network based on your service's appName and associate it with each service in your compose file
|
||||
3. Connect the Traefik load balancer to this isolated network, maintaining service isolation while ensuring proper routing
|
||||
|
||||
When using this feature, you don't need to explicitly define dokploy-network in your networks section, as isolation is handled automatically.
|
||||
|
||||
## Randomize Compose
|
||||
|
||||
Dokploy offers functionality to randomize various compose properties:
|
||||
|
||||
1. Volumes
|
||||
2. Networks
|
||||
3. Services
|
||||
4. Configs
|
||||
5. Secrets
|
||||
|
||||
You can specify a custom prefix that will be used as a suffix for each compose property.
|
||||
|
||||
Note: If both Isolated Deployments and Randomize Compose are enabled, the Isolated Deployments configuration takes precedence.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
---
|
||||
title: Cloudflare
|
||||
description: This guide will cover how to configure a Cloudflare domain for your applications in dokploy or panel.
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
Cloudflare has multiple SSL's Modes:
|
||||
|
||||
1. **Strict (SSL-Only Origin Pull)**: Enforce encryption between Cloudflare and your origin. Use this mode to guarantee connections to your origin will always be encrypted, regardless of your visitor’s request.
|
||||
2. **Full (Strict)**: Enable encryption end-to-end and enforce validation on origin certificates. Use Cloudflare’s Origin CA to generate certificates for your origin.
|
||||
3. **Full**: Enable encryption end-to-end. Use this mode when your origin server supports SSL certification but does not use a valid, publicly trusted certificate.
|
||||
4. **Flexible**: Enable encryption only between your visitors and Cloudflare. This will avoid browser security warnings, but all connections between Cloudflare and your origin are made through HTTP.
|
||||
5. **Off (not secure)**: No encryption applied. Turning off SSL disables HTTPS and causes browsers to show a warning that your website is not secure.
|
||||
|
||||
We will cover two of SSL modes in this guide:
|
||||
|
||||
- **Full (Strict)**
|
||||
- **Flexible**
|
||||
|
||||
## Switch Mode
|
||||
|
||||
To switch between modes, follow these steps:
|
||||
|
||||
1. Go to cloudflare dashboard and then click on `Account Home` -> Select the Domain you want to change.
|
||||
2. On the left side, click `SSL/TLS`.
|
||||
3. Click on `Overview`.
|
||||
4. Click on Configure SSL/TLS Encryption.
|
||||
5. Select the desired mode Full (Strict) or Flexible.
|
||||
6. Click `Save`.
|
||||
|
||||
|
||||
|
||||
|
||||
## Assign a Domain Full (Strict)
|
||||
|
||||
|
||||
<Callout type="warn">
|
||||
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`.
|
||||
4. Click on `Add Record`.
|
||||
5. Select `A` record type.
|
||||
6. Enter the `Host` name, eg. `api` so it will be `api.dokploy.com`.
|
||||
7. Enter the `IPv4 Address` from your server where the application is hosted eg. `1.2.3.4`.
|
||||
8. Click `Save`.
|
||||
9. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose`.
|
||||
10. Go to `Domains` section.
|
||||
11. Click `Create Domain`.
|
||||
12. In the `Host` field, enter the domain name eg. `api.dokploy.com`.
|
||||
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 `Let's Encrypt`.
|
||||
17. Click `Create`.
|
||||
18. A domain will be automatically assigned to your application.
|
||||
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
|
||||
|
||||
We assume that you have enabled the `Flexible` mode in the previous step, is super important to follow the steps in the same order to prevent any issues.
|
||||
|
||||
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`.
|
||||
4. Click on `Add Record`.
|
||||
5. Select `A` record type.
|
||||
6. Enter the `Host` name, eg. `api` so it will be `api.dokploy.com`.
|
||||
7. Enter the `IPv4 Address` from your server where the application is hosted eg. `1.2.3.4`.
|
||||
8. Click `Save`.
|
||||
9. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose`.
|
||||
10. Go to `Domains` section.
|
||||
11. Click `Create Domain`.
|
||||
12. In the `Host` field, enter the domain name eg. `api.dokploy.com`.
|
||||
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 `OFF`.
|
||||
16. In the `Certificate` field select `None`.
|
||||
17. Click `Create`.
|
||||
18. A domain will be automatically assigned to your application.
|
||||
19. Wait a few seconds and refresh the application.
|
||||
20. You should see the application running on the domain you just created.
|
||||
|
||||
|
||||
### Important Clarification on Container Ports
|
||||
|
||||
The "Container Port" specified in the domain settings is exclusively for routing traffic to the correct application container through Traefik, and does not expose the port directly to the internet. This is fundamentally different from the port settings in the "Advanced -> Ports" section, which are used to directly expose application ports. The container port in the domain settings ensures that Traefik can internally direct traffic to the specified port within the container based on the domain configuration.
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: Generated
|
||||
description: This section outlines how to configure free HTTP domains for your applications in Dokploy, ensuring that your applications are accessible via custom URLs.
|
||||
---
|
||||
|
||||
|
||||
Dokploy use https://traefik.me to generate free domains for you.
|
||||
Quickly set up a domain for development or testing purposes without needing to register a domain.
|
||||
|
||||
|
||||
#### Steps to Generate a Domain
|
||||
|
||||
1. Go to the `domains` section.
|
||||
2. Click `Create Domain`.
|
||||
3. Click on the `Dice` Icon next to `Host` field it will generate a free domain for you.
|
||||
4. Path is `/`.
|
||||
5. `Container Port`, set the port where your application is running, eg usually for Next.js it is `3000`, for Astro is `4321`
|
||||
6. HTTPS is `OFF`.
|
||||
7. Certificate is `None`.
|
||||
8. Click `Create`.
|
||||
9. A free domain will be automatically assigned to your application.
|
||||
|
||||
|
||||
### Important Clarification on Container Ports
|
||||
|
||||
The "Container Port" specified in the domain settings is exclusively for routing traffic to the correct application container through Traefik, and does not expose the port directly to the internet. This is fundamentally different from the port settings in the "Advanced -> Ports" section, which are used to directly expose application ports. The container port in the domain settings ensures that Traefik can internally direct traffic to the specified port within the container based on the domain configuration.
|
||||
@@ -1,144 +0,0 @@
|
||||
---
|
||||
title: Domains
|
||||
description: This section outlines how to configure domains for your applications in Dokploy, ensuring that your applications are accessible via custom URLs.
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
import { Link } from 'next/link';
|
||||
|
||||
Dokploy Provide 2 ways to add a domain to your service:
|
||||
|
||||
1. **Free Domains** from Traefik.me
|
||||
2. **Buy a domain** from one of the providers above
|
||||
|
||||
<Callout type="warn">
|
||||
`traefik.me` domains are free, but they are limited to HTTP only, if you want to configure HTTPS for free domains
|
||||
you can [Create a certificate](/docs/core/certificates#traefikme-https-setup) and use it in the domain settings.
|
||||
</Callout>
|
||||
|
||||
If you don't have a domain, you can use our integrated free domains from Traefik.me in the Dokploy panel, without doing any configuration however is only for HTTP, if you want to have a HTTPS domain you need to buy a domain from one of the providers above.
|
||||
|
||||
Domains are supported for:
|
||||
|
||||
- **Applications**
|
||||
- **Docker Compose**
|
||||
|
||||
|
||||
## Requirements (Optional)
|
||||
|
||||
We recommend this if you want to have a HTTPS domain, you need to buy a domain from one of the providers above.
|
||||
|
||||
- [Cloudflare](https://www.cloudflare.com/)
|
||||
- [Porkbun](https://porkbun.com/)
|
||||
- [Namecheap](https://www.namecheap.com/domains/)
|
||||
- [Name.com](https://www.name.com/)
|
||||
- [GoDaddy](https://www.godaddy.com/)
|
||||
- [Domain.com](https://www.domain.com/)
|
||||
|
||||
### Add Domain
|
||||
|
||||
Associate custom domains with your application to make it accessible over the internet.
|
||||
|
||||
- **Host**: The domain name that you want to link to your application (e.g., `api.dokploy.com`).
|
||||
- **Path**: The specific path within the domain where the application should be accessible.
|
||||
- **Internal Path**: The internal path where your application expects to receive requests.
|
||||
- **Strip Path**: Removes the **Path** from the request before forwarding to the application.
|
||||
- **Container Port**: The port on the container that the domain should route to.
|
||||
- **HTTPS**: Toggle this on to enable HTTPS for your domain, providing secure, encrypted connections.
|
||||
- **Certificate**: Select (letsencrypt) or (None)
|
||||
|
||||
For how **Internal Path** and **Strip Path** work using Traefik middlewares, see the note below.
|
||||
|
||||
### Note
|
||||
|
||||
Proper domain configuration is crucial for the accessibility and security of your application. Always verify domain settings and ensure that DNS configurations are properly set up to point to the correct IP addresses. Enable HTTPS to enhance security and trust, especially for production environments.
|
||||
|
||||
### Understanding Internal Path and Strip Path
|
||||
|
||||
Dokploy uses Traefik middlewares to modify request paths before they reach your application. These powerful tools allow you to create flexible routing configurations that match your application's expected URL structure.
|
||||
|
||||
<Callout type="warn">
|
||||
**Warning: Potential Redirect Issues**
|
||||
|
||||
When using Internal Path and Strip Path middlewares, ensure your application is properly configured to handle the modified paths. If your application generates redirects or absolute URLs that don't match the expected path structure, it may cause redirect loops or broken functionality. Use these middlewares with caution and test thoroughly to ensure your application works correctly with the path transformations.
|
||||
</Callout>
|
||||
|
||||
**Internal Path Middleware**
|
||||
|
||||
The Internal Path middleware adds a prefix to the request path before forwarding it to your container. This is useful when your application expects all requests to start with a specific base path.
|
||||
|
||||
**Example:**
|
||||
- Domain: `api.dokploy.com`
|
||||
- Path: `/v1`
|
||||
- Internal Path: `/backend/api`
|
||||
- Request: `api.dokploy.com/v1/users`
|
||||
- Forwarded to container as: `/backend/api/users`
|
||||
|
||||
In this example, the middleware adds `/backend/api` to the beginning of the request path, which is helpful when your application is structured to expect requests at a specific internal directory.
|
||||
|
||||
**Strip Path Middleware**
|
||||
|
||||
The Strip Path middleware removes a specified path prefix from the request before forwarding it to your container. This is perfect when you want to organize your public URLs with prefixes but your application expects clean, unprefixed paths.
|
||||
|
||||
**Example:**
|
||||
- Domain: `app.dokploy.com`
|
||||
- Path: `/dashboard`
|
||||
- Strip Path: Enabled
|
||||
- Request: `app.dokploy.com/dashboard/settings`
|
||||
- Forwarded to container as: `/settings`
|
||||
|
||||
Here, the middleware removes the `/dashboard` prefix, so your application receives the request as if it was made directly to `/settings`.
|
||||
|
||||
**Using Both Internal Path and Strip Path Together**
|
||||
|
||||
You can combine both middlewares to create sophisticated routing scenarios. When both are enabled, Strip Path is applied first, then Internal Path is added.
|
||||
|
||||
**Example:**
|
||||
- Domain: `service.dokploy.com`
|
||||
- Path: `/public`
|
||||
- Strip Path: Enabled
|
||||
- Internal Path: `/app/v2`
|
||||
- Request: `service.dokploy.com/public/api/users`
|
||||
- Processing:
|
||||
1. Strip Path removes `/public`: `/api/users`
|
||||
2. Internal Path adds `/app/v2`: `/app/v2/api/users`
|
||||
- Final forwarded path: `/app/v2/api/users`
|
||||
|
||||
This powerful combination allows you to:
|
||||
- Remove public-facing path prefixes that users see
|
||||
- Add internal path prefixes that your application requires
|
||||
- Create clean separation between your public URL structure and internal application structure
|
||||
|
||||
**When to Use Each Option**
|
||||
|
||||
- **Internal Path only**: When your application requires a specific base path that differs from your public URL
|
||||
- **Strip Path only**: When you want organized public URLs but your application expects clean paths
|
||||
- **Both together**: When you need to transform public URLs to match complex internal application structures
|
||||
|
||||
These middlewares ensure your application receives requests in the exact format it expects, regardless of how you structure your public domain paths.
|
||||
|
||||
|
||||
### Important Clarification on Container Ports
|
||||
|
||||
The "Container Port" specified in the domain settings is exclusively for routing traffic to the correct application container through Traefik, and does not expose the port directly to the internet. This is fundamentally different from the port settings in the "Advanced -> Ports" section, which are used to directly expose application ports. The container port in the domain settings ensures that Traefik can internally direct traffic to the specified port within the container based on the domain configuration.
|
||||
|
||||
## Static Build Type
|
||||
|
||||
When using the `Static` build type or `Nixpacks` and `Publish Directory` build type, you need to use the port `80` when creating a domain.
|
||||
|
||||
|
||||
## Adding WWW to your domain
|
||||
|
||||
If you want to add WWW to your domain, you can do it by adding a CNAME record to your DNS provider.
|
||||
|
||||
For example, if your domain is `example.com`, you can add a CNAME record to your DNS provider with the following configuration:
|
||||
|
||||
- TYPE: CNAME
|
||||
- NAME: www
|
||||
- VALUE: example.com
|
||||
|
||||
Create the domain in dokploy, using the host `www.example.com`
|
||||
|
||||
Now in dokploy, you can go to application -> advanced -> redirects (Select the preset www to non-www) and click on save.
|
||||
|
||||
now everytime you access `www.example.com` it will redirect to `example.com`
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
title: Others
|
||||
description: This guide will cover how to configure a domain from other providers for your applications in dokploy or panel.
|
||||
---
|
||||
|
||||
|
||||
In the case you don't want to use Cloudflare, you can use any domain from any provider:
|
||||
|
||||
|
||||
1. Go to your DNS Panel.
|
||||
2. Go to `Records` section.
|
||||
3. Click on `Add Record`.
|
||||
4. Select `A` record type.
|
||||
5. Enter the `Host` name, eg. `api` so it will be `api.dokploy.com`.
|
||||
6. Enter the `IPv4 Address` from your server where the application is hosted eg. `1.2.3.4`.
|
||||
7. Click `Save`.
|
||||
8. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose`.
|
||||
9. Go to `Domains` section.
|
||||
10. Click `Create Domain`.
|
||||
11. In the `Host` field, enter the domain name eg. `api.dokploy.com`.
|
||||
12. In the `Path` field, enter the path eg. `/`.
|
||||
13. In the `Container Port` field, enter the port where your application is running eg. `3000`.
|
||||
14. In the `HTTPS` field enable `ON`.
|
||||
15. In the `Certificate` field select `Let's Encrypt`.
|
||||
16. Click `Create`.
|
||||
17. A domain will be automatically assigned to your application.
|
||||
18. Wait a few seconds and refresh the application.
|
||||
19. You should see the application running on the domain you just created.
|
||||
|
||||
|
||||
### Important Clarification on Container Ports
|
||||
|
||||
The "Container Port" specified in the domain settings is exclusively for routing traffic to the correct application container through Traefik, and does not expose the port directly to the internet. This is fundamentally different from the port settings in the "Advanced -> Ports" section, which are used to directly expose application ports. The container port in the domain settings ensures that Traefik can internally direct traffic to the specified port within the container based on the domain configuration.
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
---
|
||||
title: 'Features'
|
||||
description: 'Explore the comprehensive suite of features available in Dokploy for optimized application deployment and management.'
|
||||
---
|
||||
|
||||
Dokploy provides a comprehensive suite of features designed to simplify and enhance the application deployment process.
|
||||
|
||||
## Application Deployment
|
||||
|
||||
Dokploy supports two primary methods for deploying applications:
|
||||
|
||||
1. **Applications**: This straightforward method allows for effortless deployment. Ideal for single applications, it offers a near plug-and-play experience.
|
||||
2. **Docker Compose**: A more advanced option, requiring the creation of Dockerfiles and `docker-compose.yml`. This method provides greater control over deployment settings and full utilization of Docker Compose capabilities.
|
||||
|
||||
### Applications Management
|
||||
|
||||
Manage your applications through a range of features:
|
||||
|
||||
**Basic Operations**:
|
||||
1. Deploy, stop, and delete applications.
|
||||
2. Open a terminal directly in the application container.
|
||||
|
||||
**Source and Build Configuration**:
|
||||
1. Choose source providers (GitHub, Git, Docker).
|
||||
2. Select build types (Docker, Nixpacks, Heroku Buildpacks, Paketo Buildpacks).
|
||||
|
||||
|
||||
**Environment Management**:
|
||||
1. Add and manage environment variables.
|
||||
|
||||
**Monitoring Tools**:
|
||||
1. Monitor CPU, memory, disk, and network usage.
|
||||
|
||||
**Logs**:
|
||||
1. Access real-time logs.
|
||||
|
||||
**Deployments**:
|
||||
1. View and manage deployments, you can see the logs of the building application.
|
||||
2. Cancel queued deployments in case you have a lot of deployments in the queue, the most common is when you push alot of times in your repository, you can cancel the incoming queues, not the deployments that are already running.
|
||||
|
||||
**Domain Management**:
|
||||
1. Add, delete, and generate domains.
|
||||
|
||||
**Advanced Settings**:
|
||||
1. Customize initial commands and cluster settings.
|
||||
2. Set resource limits and manage volumes for data persistence.
|
||||
3. Configure redirects, security headers, and port settings.
|
||||
4. Detailed Traefik configuration for specific needs.
|
||||
|
||||
### Docker Compose Management
|
||||
|
||||
Enhance your Docker Compose experience with these advanced functionalities:
|
||||
|
||||
**Lifecycle Management**:
|
||||
1. Deploy, stop, and delete Docker Compose setups.
|
||||
2. Open a terminal with service selection capability.
|
||||
|
||||
**Source Configuration**:
|
||||
1. Choose source providers (GitHub, Git, Raw).
|
||||
|
||||
**Environment Management**:
|
||||
1. Add and manage environment variables.
|
||||
|
||||
**Monitoring Tools**:
|
||||
1. Monitor CPU, memory, disk, and network usage of each service.
|
||||
|
||||
**Logs**:
|
||||
1. View real-time logs of each service.
|
||||
|
||||
**Deployments**:
|
||||
1. View and manage deployments, you can see the logs of the building application.
|
||||
2. Cancel queued deployments in case you have a lot of deployments in the queue, the most common is when you push alot of times in your repository, you can cancel the incoming queues, not the deployments that are already running.
|
||||
|
||||
**Advanced Settings**:
|
||||
1. Append command, by default we use a internal command to build the docker compose however, you can append a command to the existing one.
|
||||
2. Manage volumes and mounts.
|
||||
|
||||
## Database Deployment
|
||||
|
||||
Deploy and manage a variety of databases:
|
||||
|
||||
|
||||
**Supported Databases**:
|
||||
1. MySQL, PostgreSQL, MongoDB, Redis, MariaDB.
|
||||
|
||||
**General Management**:
|
||||
1. Deploy, stop, and delete databases.
|
||||
2. Open a terminal within the database container.
|
||||
|
||||
**Environment and Monitoring**:
|
||||
1. Manage environment variables.
|
||||
2. Monitor CPU, memory, disk, and network usage.
|
||||
|
||||
**Backups and Logs**:
|
||||
1. Configure manual and scheduled backups.
|
||||
2. View real-time logs.
|
||||
|
||||
**Advanced Configuration**:
|
||||
1. Use custom Docker images and initial commands.
|
||||
2. Configure volumes and resource limits.
|
||||
|
||||
These features are designed to offer flexibility and control over your deployment environments, ensuring that Dokploy meets the diverse needs of modern application deployment and management.
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
title: Goodies
|
||||
description: "Dokploy has certain goodies that are external that can be used with Dokploy."
|
||||
---
|
||||
|
||||
1. **Ansible Dokploy**: Ansible role to deploy Dokploy [Ansible Role](https://github.com/jacobtipp/ansible-dokploy)
|
||||
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)
|
||||
8. **Dokli TUI**: Dokli TUI [Github](https://github.com/jonykalavera/dokli)
|
||||
|
||||
Want to submit your own? [Submit a PR](https://github.com/Dokploy/website/blob/main/README.md)
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
title: Welcome to Dokploy
|
||||
description: Dokploy is a open source alternative to Heroku, Vercel, and Netlify.
|
||||
|
||||
---
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card';
|
||||
|
||||
|
||||
Dokploy is a stable, easy-to-use deployment solution designed to simplify the application management process. Think of Dokploy as your free self hostable alternative to platforms like Heroku, Vercel, and Netlify, leveraging the robustness of [Docker](https://www.docker.com/) and the flexibility of [Traefik](https://traefik.io/).
|
||||
|
||||
|
||||
|
||||
{/* <ImageZoom src="/logo.png" width={1300} height={630} alt='home og image' /> */}
|
||||
|
||||

|
||||
|
||||
## Why Choose Dokploy?
|
||||
|
||||
- **Simplicity:** Easy setup and management of deployments.
|
||||
- **Flexibility:** Supports a wide range of applications and databases.
|
||||
- **Open Source:** Free and open-source software, available for anyone to use.
|
||||
|
||||
|
||||
## Setting up Dokploy
|
||||
|
||||
Getting started with Dokploy is straightforward. Follow our guides to install and configure your applications and databases effectively.
|
||||
|
||||
## Setting up
|
||||
|
||||
Please go to get started.
|
||||
|
||||
|
||||
<Cards>
|
||||
<Card
|
||||
href="/docs/core/installation"
|
||||
title="Installation"
|
||||
description="Learn how to install Dokploy."
|
||||
/>
|
||||
<Card
|
||||
href="/docs/core/applications"
|
||||
title="Applications"
|
||||
description="Learn how to deploy applications."
|
||||
/>
|
||||
<Card
|
||||
href="/docs/core/databases"
|
||||
title="Databases"
|
||||
description="Learn how to deploy databases."
|
||||
/>
|
||||
<Card
|
||||
href="/docs/core/traefik/overview"
|
||||
title="Traefik"
|
||||
description="Learn how to deploy Traefik."
|
||||
/>
|
||||
</Cards>
|
||||
@@ -1,126 +0,0 @@
|
||||
---
|
||||
title: Installation
|
||||
description: "Get Dokploy up and running on your server within minutes with this easy-to-follow installation guide."
|
||||
---
|
||||
|
||||
Follow these steps in order to set up Dokploy locally and deploy it to your server, effectively managing Docker containers and applications:
|
||||
|
||||
You need to follow this steps in the same order:
|
||||
|
||||
1. [Virtual Private Server (VPS)](#virtual-private-server-vps)
|
||||
|
||||
## Virtual Private Server (VPS)
|
||||
|
||||
There are multiple VPS providers to choose from:
|
||||
|
||||
We have tested on the following Linux Distros:
|
||||
|
||||
- Ubuntu 24.04 LTS
|
||||
- Ubuntu 23.10
|
||||
- Ubuntu 22.04 LTS
|
||||
- Ubuntu 20.04 LTS
|
||||
- Ubuntu 18.04 LTS
|
||||
- Debian 12
|
||||
- Debian 11
|
||||
- Debian 10
|
||||
- Fedora 40
|
||||
- Centos 9
|
||||
- Centos 8
|
||||
|
||||
### Providers
|
||||
|
||||
- [Hostinger](https://www.hostinger.com/vps-hosting?ref=dokploy) Get 20% Discount using this referral link: [Referral Link](https://www.hostinger.com/vps-hosting?REFERRALCODE=1SIUMAURICI97)
|
||||
- [AmericanCloud](https://app.americancloud.com/register?ref=dokploy) Receive 20$ credits for free: [Referral Link](https://app.americancloud.com/register?ref=dokploy)
|
||||
- [Teramont](https://teramont.net/dokploy) Get 15% discount for free: [Referral Link](https://teramont.net/?partner_coupon=DOKPLOY&aff_link=https%3A%2F%2Fbilling.teramont.net%2Faff.php%3Faff%3D53%26url%3Dhttps%3A%2F%2Fteramont.net%2Fdokploy-hosting)
|
||||
- [Hetzner](https://www.hetzner.com/cloud/) Get 20€ credits for free with this referral link: [Referral Link](https://hetzner.cloud/?ref=vou4fhxJ1W2D)
|
||||
- [DigitalOcean](https://www.digitalocean.com/pricing/droplets#basic-droplets) Get 200$ credits for free with this referral link: [Referral Link](https://m.do.co/c/db24efd43f35)
|
||||
- [Vultr](https://www.vultr.com/pricing/#cloud-compute) Referral Link: [Referral Link](https://www.vultr.com/?ref=9679828)
|
||||
- [Linode](https://www.linode.com/es/pricing/#compute-shared)
|
||||
- [Scaleway](https://www.scaleway.com/en/pricing/?tags=baremetal,available)
|
||||
- [Google Cloud](https://cloud.google.com/)
|
||||
- [AWS](https://aws.amazon.com/ec2/pricing/)
|
||||
|
||||
### Requirements
|
||||
|
||||
To ensure a smooth experience with Dokploy, your server should have at least 2GB of RAM and 30GB of disk space. This specification helps to handle the resources consumed by Docker during builds and prevents system freezes.
|
||||
|
||||
import { Callout } from "fumadocs-ui/components/callout";
|
||||
|
||||
<Callout>
|
||||
**Suggestion:** For cost efficiency with reliable service, we recommend
|
||||
Hetzner as the best value-for-money VPS provider.
|
||||
</Callout>
|
||||
|
||||
### Port Requirements
|
||||
|
||||
Before installing Dokploy, ensure the following ports are available on your server:
|
||||
|
||||
- **Port 80**: HTTP traffic (used by Traefik)
|
||||
- **Port 443**: HTTPS traffic (used by Traefik)
|
||||
- **Port 3000**: Dokploy web interface
|
||||
|
||||
<Callout type='warn'>
|
||||
**Important:** The installation will fail if any of these ports are already in use. Make sure to stop any services using these ports before running the installation script.
|
||||
</Callout>
|
||||
|
||||
### Docker
|
||||
|
||||
Dokploy utilizes Docker, so it is essential to have Docker installed on your server. If Docker is not already installed, Dokploy's installation script will install it automatically. Use the following command to install Dokploy:
|
||||
|
||||
|
||||
<div className="flex flex-col gap-10 px-4 bg-green-200 dark:bg-[#031F10] text-green-900 dark:text-green-300 rounded-lg">
|
||||
|
||||
Dokploy Cloud: Use Dokploy directly without worrying about maintenance or updates. Enjoy a hassle-free experience with Dokploy Cloud. <a href="https://app.dokploy.com/register" className="text-green-600 underline">Sign up</a>
|
||||
</div>
|
||||
|
||||
```bash
|
||||
curl -sSL https://dokploy.com/install.sh | sh
|
||||
```
|
||||
|
||||
## Completing the Setup
|
||||
|
||||
After running the installation script, Dokploy and its dependencies will be set up on your server. Here's how to finalize the setup and start using Dokploy:
|
||||
|
||||
### Accessing Dokploy
|
||||
|
||||
Open your web browser and navigate to `http://your-ip-from-your-vps:3000`. You will be directed to the initial setup page where you can configure the administrative account for Dokploy.
|
||||
|
||||
<Callout type='warn'>
|
||||
**Important:** Ensure that your server's firewall allows traffic on port
|
||||
3000 to access the Dokploy web interface.
|
||||
</Callout>
|
||||
|
||||
### Initial Configuration
|
||||
|
||||
1. **Create an Admin Account:** Fill in the necessary details to set up your administrator account. This account will be the admin account for Dokploy.
|
||||
|
||||
{" "}
|
||||
|
||||
<ImageZoom
|
||||
src="/assets/images/setup.png"
|
||||
width={1300}
|
||||
height={650}
|
||||
alt="home og image"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
### Secure Your Installation
|
||||
After setting up your admin account, it's crucial to secure your Dokploy installation by enabling HTTPS.
|
||||
|
||||
To configure a domain with SSL/TLS certificates for your Dokploy panel, please refer to the [Domains](/docs/core/domains) section where you'll find detailed instructions for different SSL configurations including Let's Encrypt, Cloudflare, and custom certificates.
|
||||
|
||||
### Disable access via ip:port (Optional but Recommended)
|
||||
To enhance security, it's advisable to restrict access to Dokploy via the server's IP address and port.
|
||||
|
||||
<Callout type='warn'>
|
||||
**Important:** Before disabling IP:port access, make sure you have configured a domain with HTTPS working properly. Otherwise, you will lose access to your Dokploy installation. See the [Domains](/docs/core/domains) section to set this up first.
|
||||
</Callout>
|
||||
|
||||
Once you have verified that your domain is working correctly, you can disable IP:port access by running this command on the server:
|
||||
|
||||
```bash
|
||||
docker service update --publish-rm "published=3000,target=3000,mode=host" dokploy
|
||||
```
|
||||
|
||||
To further secure your installation, consider reading the [Security recommendations](/docs/core/multi-server/security#security-recommendations) section.
|
||||
|
||||
@@ -1,294 +0,0 @@
|
||||
---
|
||||
title: 'Manual Installation'
|
||||
description: 'Learn how to manually install Dokploy on your server.'
|
||||
---
|
||||
|
||||
If you wish to customize the Dokploy installation on your server, you can modify several enviroment variables:
|
||||
|
||||
1. **PORT** - Ideal for avoiding conflicts with other services.
|
||||
2. **TRAEFIK_SSL_PORT** - Set to another port if you want to use a different port for SSL.
|
||||
3. **TRAEFIK_PORT** - Set to another port if you want to use a different port for Traefik.
|
||||
4. **ADVERTISE_ADDR** - Set to another IP address if you want to use a different IP address for Swarm.
|
||||
5. **RELEASE_TAG** - Set to a dokploy docker hub tag(latest, canary, feature, etc)
|
||||
6. **DATABASE_URL** - Set to another database url if you want to use a different database.
|
||||
7. **REDIS_HOST** - Set to another redis url if you want to use a different redis.
|
||||
|
||||
## Installation Script
|
||||
|
||||
Here is a Bash script for installing Dokploy on a Linux server. Make sure you run this as root on a Linux environment that is not a container, and ensure ports 80, 443, and 3000 are free.
|
||||
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
install_dokploy() {
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "This script must be run as root" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if is Mac OS
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
echo "This script must be run on Linux" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if is running inside a container
|
||||
if [ -f /.dockerenv ]; then
|
||||
echo "This script must be run on Linux" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if something is running on port 80
|
||||
if ss -tulnp | grep ':80 ' >/dev/null; then
|
||||
echo "Error: something is already running on port 80" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if something is running on port 443
|
||||
if ss -tulnp | grep ':443 ' >/dev/null; then
|
||||
echo "Error: something is already running on port 443" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if something is running on port 3000
|
||||
if ss -tulnp | grep ':3000 ' >/dev/null; then
|
||||
echo "Error: something is already running on port 3000" >&2
|
||||
echo "Dokploy requires port 3000 to be available. Please stop any service using this port." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
command_exists() {
|
||||
command -v "$@" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
if command_exists docker; then
|
||||
echo "Docker already installed"
|
||||
else
|
||||
curl -sSL https://get.docker.com | sh
|
||||
fi
|
||||
|
||||
docker swarm leave --force 2>/dev/null
|
||||
|
||||
get_ip() {
|
||||
local ip=""
|
||||
|
||||
# Try IPv4 first
|
||||
# First attempt: ifconfig.io
|
||||
ip=$(curl -4s --connect-timeout 5 https://ifconfig.io 2>/dev/null)
|
||||
|
||||
# Second attempt: icanhazip.com
|
||||
if [ -z "$ip" ]; then
|
||||
ip=$(curl -4s --connect-timeout 5 https://icanhazip.com 2>/dev/null)
|
||||
fi
|
||||
|
||||
# Third attempt: ipecho.net
|
||||
if [ -z "$ip" ]; then
|
||||
ip=$(curl -4s --connect-timeout 5 https://ipecho.net/plain 2>/dev/null)
|
||||
fi
|
||||
|
||||
# If no IPv4, try IPv6
|
||||
if [ -z "$ip" ]; then
|
||||
# Try IPv6 with ifconfig.io
|
||||
ip=$(curl -6s --connect-timeout 5 https://ifconfig.io 2>/dev/null)
|
||||
|
||||
# Try IPv6 with icanhazip.com
|
||||
if [ -z "$ip" ]; then
|
||||
ip=$(curl -6s --connect-timeout 5 https://icanhazip.com 2>/dev/null)
|
||||
fi
|
||||
|
||||
# Try IPv6 with ipecho.net
|
||||
if [ -z "$ip" ]; then
|
||||
ip=$(curl -6s --connect-timeout 5 https://ipecho.net/plain 2>/dev/null)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$ip" ]; then
|
||||
echo "Error: Could not determine server IP address automatically (neither IPv4 nor IPv6)." >&2
|
||||
echo "Please set the ADVERTISE_ADDR environment variable manually." >&2
|
||||
echo "Example: export ADVERTISE_ADDR=<your-server-ip>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$ip"
|
||||
}
|
||||
|
||||
advertise_addr="${ADVERTISE_ADDR:-$(get_ip)}"
|
||||
echo "Using advertise address: $advertise_addr"
|
||||
|
||||
docker swarm init --advertise-addr $advertise_addr
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to initialize Docker Swarm" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Swarm initialized"
|
||||
|
||||
docker network rm -f dokploy-network 2>/dev/null
|
||||
docker network create --driver overlay --attachable dokploy-network
|
||||
|
||||
echo "Network created"
|
||||
|
||||
mkdir -p /etc/dokploy
|
||||
|
||||
chmod 777 /etc/dokploy
|
||||
|
||||
docker service create \
|
||||
--name dokploy-postgres \
|
||||
--constraint 'node.role==manager' \
|
||||
--network dokploy-network \
|
||||
--env POSTGRES_USER=dokploy \
|
||||
--env POSTGRES_DB=dokploy \
|
||||
--env POSTGRES_PASSWORD=amukds4wi9001583845717ad2 \
|
||||
--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=dokploy-redis,target=/data \
|
||||
redis:7
|
||||
|
||||
docker pull traefik:v3.6.1
|
||||
docker pull dokploy/dokploy:latest
|
||||
|
||||
# Installation
|
||||
docker service create \
|
||||
--name dokploy \
|
||||
--replicas 1 \
|
||||
--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,target=/root/.docker \
|
||||
--publish published=3000,target=3000,mode=host \
|
||||
--update-parallelism 1 \
|
||||
--update-order stop-first \
|
||||
--constraint 'node.role == manager' \
|
||||
-e ADVERTISE_ADDR=$advertise_addr \
|
||||
dokploy/dokploy:latest
|
||||
|
||||
|
||||
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:ro \
|
||||
-p 80:80/tcp \
|
||||
-p 443:443/tcp \
|
||||
-p 443:443/udp \
|
||||
traefik:v3.6.1
|
||||
|
||||
docker network connect dokploy-network dokploy-traefik
|
||||
|
||||
|
||||
# Optional: Use docker service create instead of docker run
|
||||
# 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,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.6.1
|
||||
|
||||
GREEN="\033[0;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
BLUE="\033[0;34m"
|
||||
NC="\033[0m" # No Color
|
||||
|
||||
format_ip_for_url() {
|
||||
local ip="$1"
|
||||
if echo "$ip" | grep -q ':'; then
|
||||
# IPv6
|
||||
echo "[${ip}]"
|
||||
else
|
||||
# IPv4
|
||||
echo "${ip}"
|
||||
fi
|
||||
}
|
||||
|
||||
formatted_addr=$(format_ip_for_url "$advertise_addr")
|
||||
echo ""
|
||||
printf "${GREEN}Congratulations, Dokploy is installed!${NC}\n"
|
||||
printf "${BLUE}Wait 15 seconds for the server to start${NC}\n"
|
||||
printf "${YELLOW}Please go to http://${formatted_addr}:3000${NC}\n\n"
|
||||
}
|
||||
|
||||
update_dokploy() {
|
||||
echo "Updating Dokploy..."
|
||||
|
||||
# Pull the latest image
|
||||
docker pull dokploy/dokploy:latest
|
||||
|
||||
# Update the service
|
||||
docker service update --image dokploy/dokploy:latest dokploy
|
||||
|
||||
echo "Dokploy has been updated to the latest version."
|
||||
}
|
||||
|
||||
# Main script execution
|
||||
if [ "$1" = "update" ]; then
|
||||
update_dokploy
|
||||
else
|
||||
install_dokploy
|
||||
fi
|
||||
|
||||
```
|
||||
|
||||
This script includes checks for common pitfalls, installs Docker if it’s not already installed, initializes a Docker Swarm, creates a network, and then pulls and deploys Dokploy. After the script runs, it provides a success message and instructions for accessing Dokploy.
|
||||
|
||||
This structured format clearly lays out the prerequisites, steps, and post-installation information, making it user-friendly and accessible for those performing manual installations.
|
||||
|
||||
## Customize install
|
||||
#### Customize swarm advertise address
|
||||
|
||||
The --advertise-addr parameter in the docker swarm init command specifies the IP address or interface that the Docker Swarm manager node should advertise to other nodes in the Swarm. This address is used by other nodes to communicate with the manager.
|
||||
|
||||
By default, this script uses the external IP address of the server, obtained using the `curl -s ifconfig.me` command. However, you might need to customize this address based on your network configuration, especially if your server has multiple network interfaces or if you're setting up Swarm in a private network.
|
||||
|
||||
To customize the --advertise-addr parameter, replace the line: `advertise_addr=$(curl -s ifconfig.me)` with your desired IP address or interface, for example:
|
||||
`advertise_addr="192.168.1.100"`
|
||||
|
||||
:warning: This IP address should be accessible to all nodes that will join the Swarm.
|
||||
|
||||
|
||||
## Existing Docker swarm
|
||||
|
||||
If you already have a Docker swarm running on your server and you want to use dokploy, you can use the following command to join it:
|
||||
|
||||
|
||||
```bash
|
||||
docker network create --driver overlay --attachable dokploy-network
|
||||
|
||||
mkdir -p /etc/dokploy
|
||||
|
||||
chmod -R 777 /etc/dokploy
|
||||
|
||||
docker pull dokploy/dokploy:latest
|
||||
|
||||
# Installation
|
||||
docker service create \
|
||||
--name dokploy \
|
||||
--replicas 1 \
|
||||
--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 \
|
||||
--publish published=3000,target=3000,mode=host \
|
||||
--update-parallelism 1 \
|
||||
--update-order stop-first \
|
||||
dokploy/dokploy:latest
|
||||
```
|
||||
|
||||
## Manual Upgrade
|
||||
|
||||
To upgrade Dokploy manually, you can use the following command:
|
||||
|
||||
```bash
|
||||
curl -sSL https://dokploy.com/install.sh | sh -s update
|
||||
```
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
{
|
||||
"title": "Core",
|
||||
"description": "The core of Dokploy",
|
||||
"icon": "Package",
|
||||
"root": true,
|
||||
"pages": [
|
||||
"---Introduction---",
|
||||
"index",
|
||||
"architecture",
|
||||
"features",
|
||||
"installation",
|
||||
"manual-installation",
|
||||
"reset-password",
|
||||
"uninstall",
|
||||
"videos",
|
||||
"...",
|
||||
"---Cloud---",
|
||||
"cloud",
|
||||
"monitoring",
|
||||
"differences",
|
||||
"---Server---",
|
||||
"(S3-Destinations)",
|
||||
"(Git-Sources)",
|
||||
"(Users)",
|
||||
"(Notifications)",
|
||||
"registry",
|
||||
"ssh-keys",
|
||||
"certificates",
|
||||
"backups",
|
||||
"---Services---",
|
||||
"variables",
|
||||
"domains",
|
||||
"applications",
|
||||
"docker-compose",
|
||||
"databases",
|
||||
"templates",
|
||||
"(examples)",
|
||||
"auto-deploy",
|
||||
"schedule-jobs",
|
||||
"volume-backups",
|
||||
"providers",
|
||||
"watch-paths",
|
||||
"---Remote Servers---",
|
||||
"remote-servers/index",
|
||||
"remote-servers/instructions",
|
||||
"remote-servers/deployments",
|
||||
"remote-servers/ec2-instructions",
|
||||
"remote-servers/security",
|
||||
"remote-servers/validate",
|
||||
"---Advanced---",
|
||||
"cluster"
|
||||
]
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
---
|
||||
title: Monitoring
|
||||
description: "Monitor your applications and servers with Dokploy"
|
||||
---
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Before setting up monitoring for your applications and servers, ensure you have completed the server deployment setup. You can verify this by:
|
||||
|
||||
1. Navigate to Remote Servers → Select your server → Setup Server
|
||||
2. Validate that you see a green checkmark in every section
|
||||
|
||||
### Configuration Options
|
||||
|
||||
Once the prerequisites are met, you can access the Monitoring Section where you'll find the following configuration options:
|
||||
|
||||
#### Refresh Rates
|
||||
- **Server Refresh Rate**: Determines how frequently the server metrics are collected (default: 20 seconds). Lower values provide more accurate metrics but increase server load.
|
||||
- **Container Refresh Rate**: Sets the frequency for container metric collection (default: 20 seconds). Similar to server refresh rate, lower values mean more precise data but higher resource usage.
|
||||
|
||||
#### Data Management
|
||||
- **Cron Job**: Automated task that cleans old metrics based on the retention period settings.
|
||||
- **Server Retention Days**: Specifies how long metrics data is stored (default: 2 days).
|
||||
- **Port**: The designated port for the metrics server (default: 4500).
|
||||
|
||||
#### Service Selection
|
||||
- **Include Services**: Choose which services to monitor. Options include:
|
||||
- All services
|
||||
- Specific compose services
|
||||
- Specific applications
|
||||
- Both compose and applications
|
||||
- **Exclude Services**: Specify services to exclude from monitoring using the same options as above.
|
||||
|
||||
#### Alert Thresholds
|
||||
- **CPU Threshold (%)**: Set the CPU usage percentage that triggers an alert. Set to 0 to disable alerts.
|
||||
- **Memory Threshold (%)**: Set the memory usage percentage that triggers an alert. Set to 0 to disable alerts.
|
||||
|
||||
#### Security and Integration
|
||||
- **Metrics Token**: Authentication token for metrics requests. You can:
|
||||
- Use the automatically generated token
|
||||
- Generate a new token in the server section
|
||||
- **Metrics Callback URL**: The endpoint that receives metrics data. Default URL is:
|
||||
```
|
||||
https://app.dokploy.com/api/trpc/notification.receiveNotification
|
||||
```
|
||||
You can use this default or configure your own callback URL.
|
||||
|
||||
In order to enable just click on `Save Changes` button.
|
||||
|
||||
|
||||
### Notifications
|
||||
If you have configured notifications with Server Threshold properties, metric alerts will be sent to your enabled notification providers, the notifications will sent only if the threshold is exceeded based on the Server itself not individual services.
|
||||
|
||||
### Important Security Note
|
||||
**Make sure port 4500 is open on your server** to allow proper communication of monitoring metrics. This is essential for the monitoring system to function correctly.
|
||||
|
||||
If you have errors like failed to fetch metrics, or no data available, just give it a few minutes and check again, this is normal, the server needs to collect data first.
|
||||
|
||||
You should see something like this for your server:
|
||||
<ImageZoom src="/monitoring.png" alt="Architecture Diagram" width={1000} height={600} className="rounded-lg"/>
|
||||
|
||||
For your services you should see something like this:
|
||||
<ImageZoom src="/monitoring-services.png" alt="Architecture Diagram" width={1000} height={600} className="rounded-lg"/>
|
||||
|
||||
|
||||
This is feature only available on Cloud Version of Dokploy.
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
---
|
||||
title: Providers
|
||||
description: Learn how to use providers in your application or docker compose.
|
||||
---
|
||||
|
||||
Dokploy offers several deployment methods, streamlining the process whether you're utilizing GitHub, any Git provider, Docker, or automated deployments.
|
||||
|
||||
1. GitHub
|
||||
2. Gitlab
|
||||
3. Bitbucket
|
||||
4. Gitea
|
||||
5. Git
|
||||
6. Docker (Only Applications)
|
||||
7. Drag and Drop .zip (Only Applications)
|
||||
8. Raw (Only Docker Compose)
|
||||
|
||||
## GitHub, Gitlab, Bitbucket, Gitea
|
||||
|
||||
1. [Github](/docs/core/github) Guide.
|
||||
2. [Gitlab](/docs/core/gitlab) guide.
|
||||
3. [Bitbucket](/docs/core/bitbucket) guide.
|
||||
4. [Gitea](/docs/core/gitea) guide.
|
||||
|
||||
## Git
|
||||
|
||||
For deployments from any Git repository, whether public or private, you can use either SSH or HTTPS:
|
||||
|
||||
### Public Repositories (HTTPS)
|
||||
|
||||
1. Enter the repository URL in `HTTPS URL`.
|
||||
2. Type the branch name.
|
||||
3. Click on `Save`.
|
||||
|
||||
### Private Repositories
|
||||
|
||||
For private repositories, is required to first create an SSH Key The Steps are almost similar for all providers.
|
||||
|
||||
1. Go to [SSH Keys Section](/docs/core/ssh-keys) and click on `Create SSH Key`.
|
||||
2. Click on `Generate RSA SSH Key` and copy the `Public Key`.
|
||||
3. Go to your Git Provider, either Github, Gitlab, Bitbucket, Gitea or any other.
|
||||
4. Go to `Settings` and search for `SSH Keys`.
|
||||
5. Click on `Add SSH Key`.
|
||||
6. Paste the SSH Key and click on `Add Key`.
|
||||
|
||||
|
||||
You can then copy the SSH key and paste it into the settings of your account.
|
||||
|
||||
This is for Github, but the same applies for Gitlab, Bitbucket, Gitea, etc.
|
||||
|
||||
<ImageZoom
|
||||
src="/assets/private-repository.png"
|
||||
width={800}
|
||||
height={630}
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
This enables you to pull repositories from your private repository, a method consistent across nearly all providers,
|
||||
remember to use the SSH URL `git@github.com:user/repo.git` and not the HTTPS URL `https://github.com/user/repo.git`.
|
||||
|
||||
## Docker (Applications)
|
||||
|
||||
For Docker deployments you have two options:
|
||||
|
||||
1. Login to your registry using the [Registry Section](/docs/core/registry) and it automatically will pull the image from the registry in the case of a private registry.
|
||||
2. Provide the username and password directly in the application settings.
|
||||
|
||||
|
||||
## Drag and Drop .zip (Applications)
|
||||
|
||||
You can upload a zip file directly from your computer and trigger a deployment.
|
||||
|
||||
|
||||
|
||||
## Raw (Docker Compose)
|
||||
|
||||
You specify a docker compose file directly in the code editor and trigger a deployment.
|
||||
|
||||
<userStyle>Normal</userStyle>
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: Digital Ocean
|
||||
description: 'Configure a Digital Ocean Container Registry to store your images and artifacts.'
|
||||
---
|
||||
|
||||
To configure a Digital Ocean Container Registry, you need to fill the form with the following details:
|
||||
|
||||
1. Insert the Registry Name eg. `My Registry`.
|
||||
2. Go to `https://cloud.digitalocean.com/registry/new` and click on `Create a Container Registry`.
|
||||
3. Insert a lowercase name eg. `dokploy-username`.
|
||||
4. Click on `Create Registry`.
|
||||
5. Click on `Actions` and then `Download Docker Credentials`.
|
||||
6. In Permissions select `Read` and `Write`.
|
||||
7. Open the downloaded file and copy the auth value and type as `Password` in Dokploy Modal.
|
||||
7. Go to `https://cloud.digitalocean.com/account/api/tokens` and click on `Generate New Token`.
|
||||
8. In permissions select `Registry`.
|
||||
7. Click on `Create`.
|
||||
8. Copy the `access token` and paste it in Dokploy Modal as a `Username` field.
|
||||
9. (Optional) If you pretend to use Cluster Feature, make sure to set a `Image Prefix`.
|
||||
10. Registry URL: set `registry.digitalocean.com`
|
||||
11. Click on `Test` to make sure everything is working.
|
||||
12. Click on `Create` to save the registry.
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: Docker Hub
|
||||
description: 'Configure Docker Hub to store your images and artifacts.'
|
||||
---
|
||||
|
||||
To configure a Docker Hub registry, you need to fill the form with the following details:
|
||||
|
||||
1. Insert the Registry Name eg. `My Registry`.
|
||||
2. Insert the Username eg. `dockerhub_username`.
|
||||
3. Insert the Password, you can use your own dockerhub password or generate a token here `https://app.docker.com/settings/personal-access-tokens`
|
||||
4. Click on Generate Token.
|
||||
5. Insert the Token Description eg. `dockerhub_token`.
|
||||
6. In permissions make sure to select `Read` and `Write`.
|
||||
7. Click on `Create`.
|
||||
8. Copy the `access token` and paste it in Dokploy `Docker Hub` Modal section.
|
||||
9. (Optional) If you pretend to use Cluster Feature, make sure to set a `Image Prefix` and `Registry URL`.
|
||||
10. Click on `Test` to make sure everything is working.
|
||||
11. Click on `Create` to save the registry.
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: GHCR
|
||||
description: 'Configure GitHub Container Registry to store your images and artifacts.'
|
||||
---
|
||||
|
||||
To configure a GitHub Container Registry, you need to fill the form with the following details:
|
||||
|
||||
1. Insert the Registry Name eg. `My Registry`.
|
||||
2. Insert the Username eg. `github_username`.
|
||||
3. Insert the Password, you can use your own github password or generate a token here `https://github.com/settings/tokens`
|
||||
4. Click on Generate Token (Classic).
|
||||
5. Insert the Note Description eg. `github_token`.
|
||||
6. In permissions make sure to select `write:packages`.
|
||||
7. Click on `Create`.
|
||||
8. Copy the `access token` and paste it in Dokploy Modal as a Password field.
|
||||
9. (Optional) If you pretend to use Cluster Feature, make sure to set a `Image Prefix`.
|
||||
10. Registry URL: set `ghcr.io`
|
||||
11. Click on `Test` to make sure everything is working.
|
||||
12. Click on `Create` to save the registry.
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: Registry
|
||||
description: 'Configure your registry settings to store your images and artifacts.'
|
||||
---
|
||||
|
||||
Dokploy offers a UI to connect to any Docker Registry.
|
||||
|
||||
|
||||
|
||||
## Registry Settings
|
||||
|
||||
You need to fill the form with the following details:
|
||||
|
||||
- **Registry Name**: Enter a name for your registry eg. `My Registry`.
|
||||
- **Username**: Enter the username you want to use to connect to your registry.
|
||||
- **Password**: Enter the password you want to use to connect to your registry.
|
||||
- **Image Prefix(Optional)**: Useful when using Cluster feature, to tag your images with a prefix eg. `dokploy` will convert to `dokploy/my-app:latest`.
|
||||
- **Registry URL**: Enter the URL of your registry eg. `https://index.docker.io/v1`.
|
||||
|
||||
This approach allows you to authenticate and store your credentials on the machine,
|
||||
making it convenient when using multiple applications. You won't need to provide credentials
|
||||
for each one individually. It also enables seamless login to remote servers. If no server is selected,
|
||||
Dokploy will default to using its own server.
|
||||
@@ -1,81 +0,0 @@
|
||||
---
|
||||
title: Reset Password & 2FA
|
||||
description: "Reset your password to access your Dokploy account and disable 2FA."
|
||||
---
|
||||
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
|
||||
## Reset Password
|
||||
|
||||
To reset your password, follow these steps:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
Log in to your VPS.
|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
|
||||
Run the command below to get the container ID of the dokploy container.
|
||||
|
||||
```bash
|
||||
docker ps
|
||||
```
|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
|
||||
Run command below to open a shell in the dokploy container.
|
||||
```bash
|
||||
docker exec -it <container-id> bash -c "pnpm run reset-password"
|
||||
```
|
||||
|
||||
|
||||
</Step>
|
||||
<Step>
|
||||
|
||||
It will display a random password. Copy it and use it to access again to the dashboard.
|
||||
|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Reset 2FA
|
||||
|
||||
To disable 2FA, follow these steps:
|
||||
|
||||
To reset your 2FA, follow these steps:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
Log in to your VPS.
|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
|
||||
Run the command below to get the container ID of the dokploy container.
|
||||
|
||||
```bash
|
||||
docker ps
|
||||
```
|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
|
||||
Run command below to open a shell in the dokploy container.
|
||||
```bash
|
||||
docker exec -it <container-id> bash -c "pnpm run reset-2fa"
|
||||
```
|
||||
|
||||
|
||||
</Step>
|
||||
<Step>
|
||||
|
||||
You can now login again without having to supply a 2FA code.
|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
@@ -1,80 +0,0 @@
|
||||
---
|
||||
title: "Schedule Jobs"
|
||||
description: "Learn how to automate tasks using Dokploy's Schedule Jobs feature"
|
||||
---
|
||||
|
||||
|
||||
Schedule Jobs in Dokploy allows you to create and manage automated tasks that run on a specified schedule using cron expressions. Each job execution creates a log entry where you can monitor the output and execution status.
|
||||
|
||||
## Job Types
|
||||
|
||||
Dokploy supports four types of scheduled jobs:
|
||||
|
||||
1. **Application Jobs**: Run commands inside specific application containers
|
||||
2. **Compose Jobs**: Execute commands in Docker Compose services
|
||||
3. **Server Jobs**: Run scripts on remote servers
|
||||
4. **Dokploy Server Jobs**: Execute tasks on the Dokploy server itself
|
||||
|
||||
## Container-based Jobs (Application and Compose)
|
||||
|
||||
For application and compose jobs, you can run single commands that will be executed inside the target container. Dokploy internally uses Docker exec to run these commands:
|
||||
|
||||
```bash
|
||||
docker exec -it <container_id> <command>
|
||||
```
|
||||
|
||||
### Example
|
||||
Assuming you with a nginx container and you want to check the nginx version in a container:
|
||||
1. Create a new schedule job
|
||||
2. Set the command to: `nginx -v`
|
||||
3. Configure your desired schedule using cron syntax
|
||||
4. Save and monitor the execution logs
|
||||
|
||||
<Callout>
|
||||
The target container must be running for the job to execute successfully.
|
||||
</Callout>
|
||||
|
||||
<Callout >
|
||||
For docker compose jobs, is required to not change the COMPOSE_PROJECT_NAME environment variable, since this is used to identify the project.
|
||||
</Callout>
|
||||
|
||||
## Server-based Jobs (Server and Dokploy Server)
|
||||
|
||||
For remote servers and the Dokploy server, you can write bash scripts to perform various tasks. These scripts can use any command or tool available on the target system.
|
||||
|
||||
<Callout type="info">
|
||||
Make sure any required dependencies are installed on the target server before using them in your scripts.
|
||||
</Callout>
|
||||
|
||||
### Example 1: Automatic Docker Cleanup
|
||||
This script cleans up unused Docker containers. You could schedule it to run every 15 minutes using the cron expression `*/15 * * * *`:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
docker system prune --force
|
||||
```
|
||||
|
||||
### Example 2: Custom Database Backup
|
||||
You can create scripts to backup databases that aren't natively supported by Dokploy. Here's an example structure for a custom backup script:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# Backup script for custom database
|
||||
backup_date=$(date +%Y%m%d_%H%M%S)
|
||||
backup_file="database_${backup_date}.backup"
|
||||
|
||||
# search the container name
|
||||
container_name=$(docker ps --filter "name=clickhouse" --format "{{.Names}}")
|
||||
|
||||
# Add your backup commands here
|
||||
docker exec -it $container_name clickhouse-client --query "BACKUP DATABASE mydb TO '/backups/$backup_file'"
|
||||
|
||||
# Upload to S3 (if needed)
|
||||
# aws s3 cp /backups/$backup_file s3://your-bucket/backups/
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. Always test your commands or scripts manually before scheduling them
|
||||
2. Use appropriate error handling in your scripts
|
||||
3. Consider the impact of scheduled jobs on system resources
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
title: SSH Keys
|
||||
description: 'Configure your SSH keys to access your servers or clone Private Repositories.'
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
|
||||
Dokploy provides a section exclusively for SSH keys, allowing you to manage your SSH keys in a centralized location.
|
||||
|
||||
SSH Keys can be used for two purposes:
|
||||
|
||||
- **Private Repositories**: You can use SSH Keys, to access to private repositories, this is only for `Git` provider
|
||||
in your application or docker compose.
|
||||
- **Multi Server**: You can use SSH Keys, to access remotely to your servers via SSH.
|
||||
|
||||
To create a SSH Key, is a very easy process, just click on `Create SSH Key`
|
||||
|
||||
We offer two SSH Keys Generation types:
|
||||
|
||||
1. **RSA Key**: This is the most commonly used key type, and generates a 2048-bit RSA key.
|
||||
2. **Ed25519 Key**: This is a newer key type that generates a 256-bit Ed25519 key.
|
||||
|
||||
<Callout>
|
||||
You can also create or paste your own SSH Key, you can edit the `Private Key` and `Public Key` fields without restrictions,
|
||||
make sure to use the correct format for the key type you are using.
|
||||
</Callout>
|
||||
|
||||
<Callout type='warn'>
|
||||
Once you create a SSH Key you will not be able to read the `Private Key` anymore.
|
||||
</Callout>
|
||||
@@ -1,122 +0,0 @@
|
||||
---
|
||||
title: Open Source Templates
|
||||
description: Deploy open source templates with Dokploy
|
||||
---
|
||||
|
||||
By default we include a set of templates, that you can use to spin up templates quickly. You can also create your own templates.
|
||||
|
||||
## Templates
|
||||
|
||||
The following templates are available (100):
|
||||
|
||||
- **Appwrite**: End-to-end backend server for Web, Mobile, Native, or Backend apps with user authentication, database, storage, and more.
|
||||
- **Outline**: Self-hosted knowledge base and documentation platform.
|
||||
- **Supabase**: The open-source Firebase alternative with a dedicated Postgres database for web, mobile, and AI applications.
|
||||
- **Pocketbase**: Open-source backend for your next SaaS and Mobile app in 1 file.
|
||||
- **Plausible**: Open-source, privacy-focused, self-hosted web analytics platform.
|
||||
- **Calcom**: Open-source alternative to Calendly for creating scheduling and booking services.
|
||||
- **Grafana**: Open-source platform for data visualization and monitoring.
|
||||
- **Directus**: API-first, open-source headless CMS for building custom backends.
|
||||
- **Baserow**: Open-source database management tool.
|
||||
- **Budibase**: Open-source low-code platform for building forms, portals, and approval apps.
|
||||
- **Ghost**: Professional publishing platform built on Node.js.
|
||||
- **Uptime Kuma**: Free and open-source monitoring tool.
|
||||
- **n8n**: Open-source low-code platform for automating workflows.
|
||||
- **Wordpress**: Free and open-source CMS for publishing websites.
|
||||
- **Odoo**: Free and open-source business management software.
|
||||
- **Appsmith**: Open-source platform for building internal tools.
|
||||
- **Excalidraw**: Open-source online diagramming tool.
|
||||
- **Documenso**: Open-source alternative to DocuSign.
|
||||
- **NocoDB**: Airtable alternative for databases.
|
||||
- **Meilisearch**: Free and open-source search engine.
|
||||
- **Phpmyadmin**: Web interface for MySQL/MariaDB management.
|
||||
- **Rocketchat**: Open-source web chat platform.
|
||||
- **Minio**: Open-source object storage server.
|
||||
- **Metabase**: Open-source business intelligence tool.
|
||||
- **Glitchtip**: Simple, open-source error tracking.
|
||||
- **Open WebUI**: Open-source ChatGPT alternative.
|
||||
- **Listmonk**: Self-hosted newsletter manager.
|
||||
- **Double Zero**: Self-hostable SES dashboard.
|
||||
- **Umami**: Privacy-focused analytics alternative.
|
||||
- **Jellyfin**: Free software media system.
|
||||
- **Teable**: No-code database with spreadsheet interface.
|
||||
- **Zipline**: ShareX/file upload server.
|
||||
- **Soketi**: Open-source WebSockets server.
|
||||
- **Aptabase**: Self-hosted analytics platform.
|
||||
- **Typebot**: Open-source chatbot builder.
|
||||
- **Gitea**: Self-hosted software development service.
|
||||
- **Roundcube**: Open-source webmail software.
|
||||
- **File Browser**: Web-based file manager.
|
||||
- **Tolgee**: Web-based localization platform.
|
||||
- **Portainer**: Container management tool.
|
||||
- **InfluxDB**: Time-series data platform.
|
||||
- **Infisical**: Configuration and secrets manager.
|
||||
- **Docmost**: Collaborative wiki software.
|
||||
- **Vaultwarden**: Bitwarden-compatible server.
|
||||
- **Hi.events**: Event management platform.
|
||||
- **Windows/MacOS**: Dockerized operating systems.
|
||||
- **Coder**: Cloud development environment.
|
||||
- **Stirling PDF**: PDF tools suite.
|
||||
- **Lobe Chat**: Modern AI chat framework.
|
||||
- **Peppermint**: API development platform.
|
||||
- **Windmill**: Workflow and internal apps platform.
|
||||
- **Activepieces**: No-code automation tool.
|
||||
- **InvoiceShelf**: Self-hosted invoicing system.
|
||||
- **Postiz**: Content management platform.
|
||||
- **Slash**: Bookmarking and link shortener.
|
||||
- **Discord Tickets**: Support ticket bot.
|
||||
- **Nextcloud AIO**: File storage and collaboration.
|
||||
- **Blender**: 3D creation suite.
|
||||
- **HeyForm**: Conversational form builder.
|
||||
- **Chatwoot**: Customer engagement platform.
|
||||
- **Discourse**: Modern forum software.
|
||||
- **Immich**: Photo/video backup solution.
|
||||
- **Twenty CRM**: Modern CRM alternative.
|
||||
- **YOURLS**: URL shortening service.
|
||||
- **Ryot**: Media tracking platform.
|
||||
- **PhotoPrism**: AI-powered photos app.
|
||||
- **Ontime**: Event rundown manager.
|
||||
- **Trigger.dev**: Event-driven application platform.
|
||||
- **Browserless**: Headless browser automation.
|
||||
- **draw.io**: Diagramming application.
|
||||
- **Kimai**: Time-tracking application.
|
||||
- **Logto**: Identity management platform.
|
||||
- **Penpot**: Open-source design tool.
|
||||
- **Huly**: Project management platform.
|
||||
- **Unsend**: Email service platform.
|
||||
- **Langflow**: Low-code AI application builder.
|
||||
- **Elasticsearch**: Search and analytics engine.
|
||||
- **OneDev**: Git server with CI/CD.
|
||||
- **Unifi Network**: Network management platform.
|
||||
- **GLPI**: Service management software.
|
||||
- **Checkmate**: Server monitoring tool.
|
||||
- **Gotenberg**: PDF generation API.
|
||||
- **Actual Budget**: Privacy-focused finance app.
|
||||
- **Conduit/Conduwuit**: Matrix chat servers.
|
||||
- **Cloudflared**: Cloudflare Tunnel daemon.
|
||||
- **CouchDB**: Document-oriented database.
|
||||
- **IT Tools**: Developer utilities collection.
|
||||
- **Superset**: Data visualization platform.
|
||||
- **Glance/Homarr**: Dashboard solutions.
|
||||
- **ERPNext**: Open-source ERP software.
|
||||
- **Maybe**: Finance tracking application.
|
||||
- **Spacedrive**: Cross-platform file manager.
|
||||
- **AList**: Multi-storage file manager.
|
||||
- **Answer**: Q&A platform.
|
||||
- **Shlink**: URL shortener.
|
||||
- **Frappe HR**: HR & Payroll software.
|
||||
- **Formbricks**: Survey platform.
|
||||
- **Trilium**: Note-taking application.
|
||||
- **Convex**: Reactive database platform.
|
||||
|
||||
For an up to date list of available template you can visit [Dokploy templates website](https://templates.dokploy.com/).
|
||||
|
||||
## Create your own template
|
||||
|
||||
We accept contributions to upload new templates to the dokploy repository.
|
||||
|
||||
Make sure to follow the guidelines for creating a template:
|
||||
|
||||
[Steps to create your own template](https://github.com/Dokploy/templates)
|
||||
|
||||
[^1]: Please note that if you're self-hosting a mail server you need port 25 to be open for SMTP (Mail Transmission Protocol that allows you to send and receive) to work properly. Some VPS providers like [Hetzner](https://docs.hetzner.com/cloud/servers/faq/#why-can-i-not-send-any-mails-from-my-server) block this port by default for new clients.
|
||||
@@ -1,576 +0,0 @@
|
||||
---
|
||||
title: Troubleshooting
|
||||
description: Solve the most common problems that occur when using Dokploy.
|
||||
---
|
||||
|
||||
import { Callout } from "fumadocs-ui/components/callout";
|
||||
|
||||
## Applications Domain Not Working?
|
||||
|
||||
You see the deployment succeeded, and logs are running, but the domain isn't working? Here's what to check:
|
||||
|
||||
1. **Correct Port Mapping**: Ensure the domain is using the correct port for your application. For example, if you're using Next.js, the port should be `3000`, or for Laravel, it should be `8000`. If you change the app port, update the domain to reflect that.
|
||||
2. **Avoid Using `Ports` in Advanced Settings**: Generally, there's no need to use the `Ports` feature unless you want to access your app via `IP:port`. Leaving this feature enabled may interfere with your domain.
|
||||
|
||||
3. **Let's Encrypt Certificates**: It's crucial to point the domain to your server's IP **before** adding it in Dokploy. If the domain is added first, the certificate won't be generated, and you may need to recreate the domain or restart Traefik.
|
||||
|
||||
4. **Listen on 0.0.0.0, Not 127.0.0.1**: If your app is bound to `127.0.0.1` (which is common in Vite apps), switch it to `0.0.0.0` to allow external access.
|
||||
|
||||
## Logs and Monitoring Not Working After Changing Application Placement?
|
||||
|
||||
This is expected behavior. If the application is running on a different node (worker), the UI won't have access to logs or monitoring, as they're not on the same node.
|
||||
|
||||
## Mounts Are Causing My Application Not to Run?
|
||||
|
||||
Docker Swarm won't run your application if there are invalid mounts, even if the deployment shows as successful. Double-check your mounts to ensure they are valid or check the General Swarm Section
|
||||
and find your application, and you will see the real error.
|
||||
|
||||
## Volumes in Docker Compose Not Working?
|
||||
|
||||
For Docker Compose, all file mounts defined in the `volumes` section will be stored in the `files` folder. This is the default directory structure:
|
||||
|
||||
## I added a volume to my docker compose, but is not finding the volume?
|
||||
|
||||
For docker compose all the file mounts you've created in the volumes section will be stored to files folder, this is the default structure of the docker compose.
|
||||
|
||||
```
|
||||
/application-name
|
||||
/code
|
||||
/files
|
||||
```
|
||||
|
||||
So instead of using this invalid way to mount a volume:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- "/folder:/path/in/container" ❌
|
||||
```
|
||||
|
||||
You should use this format:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- "../files/my-database:/var/lib/mysql" ✅
|
||||
- "../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:
|
||||
|
||||
1. **Slow Server:**: If the server is too slow, it may struggle to handle concurrent requests, leading to SSL handshake errors.
|
||||
2. **Insufficient Disk Space:** If the server doesn't have enough disk space, the logs may not load.
|
||||
|
||||
## Docker Compose Domain Not Working?
|
||||
|
||||
When adding a domain in your Docker Compose file, it's not necessary to expose the ports directly. Simply specify the port where your app is running. Exposing the ports can lead to conflicts with other applications or ports.
|
||||
|
||||
Example of what not to do:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
app:
|
||||
image: dokploy/dokploy:latest
|
||||
ports:
|
||||
- 3000:3000
|
||||
```
|
||||
|
||||
Recommended approach:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
app:
|
||||
image: dokploy/dokploy:latest
|
||||
ports:
|
||||
- 3000
|
||||
- 80
|
||||
```
|
||||
|
||||
This is only valid for Docker Compose not for Docker Stack.
|
||||
|
||||
When using Docker Stack, the ports are exposed automatically, so you don't need to specify them explicitly.
|
||||
|
||||
Example of what not to do:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
app:
|
||||
image: dokploy/dokploy:latest
|
||||
ports:
|
||||
- 3000
|
||||
```
|
||||
|
||||
Recommended approach:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
app:
|
||||
image: dokploy/dokploy:latest
|
||||
expose:
|
||||
- 3000
|
||||
```
|
||||
|
||||
Then, when creating the domain in Dokploy, specify the service name and port, like this:
|
||||
|
||||
```yaml
|
||||
domain: my-app.com
|
||||
serviceName: app
|
||||
port: 3000
|
||||
```
|
||||
|
||||
- Another reason of the domains are not working it may be because the healthchecks you've defined are not working, so this will cause the domains never work, so you have two options:
|
||||
|
||||
1. Remove the healthcheck from the service
|
||||
2. Make sure the healthcheck is working
|
||||
|
||||
## Templates and Compose Services Returning 404
|
||||
|
||||
If you're experiencing 404 errors when accessing services created from templates (like Docker Registry, Stalwart, Uptime Kuma, etc.) or Docker Compose services, this is usually related to how Traefik handles routing for different service types.
|
||||
|
||||
### Understanding the Difference
|
||||
|
||||
Dokploy uses two different methods for configuring Traefik routing:
|
||||
|
||||
1. **Applications** (Nixpacks, Dockerfile, Buildpacks): Use the Traefik **file system** for routing configuration
|
||||
- Domain changes are applied automatically
|
||||
- No need to redeploy after updating domains
|
||||
- Configuration files are created in Traefik's dynamic configuration directory
|
||||
|
||||
2. **Templates and Compose Services**: Use Traefik **labels** for routing configuration
|
||||
- Require redeployment after any domain changes
|
||||
- Labels are read from Docker container metadata
|
||||
- Learn more about Traefik labels in the [official documentation](https://doc.traefik.io/traefik/reference/routing-configuration/other-providers/docker/#configuration-examples)
|
||||
|
||||
### Solution
|
||||
|
||||
When working with Templates or Compose services:
|
||||
|
||||
1. **Configure your domain** in the Domains section of your service
|
||||
2. **Redeploy the service** - This is crucial! The domain changes won't take effect until you redeploy
|
||||
3. Wait for the deployment to complete
|
||||
4. Your service should now be accessible via the configured domain
|
||||
|
||||
<Callout type='info'>
|
||||
**Key Tip:** Every time you add, modify, or remove a domain from a Template or Compose service, you must redeploy for the changes to take effect.
|
||||
</Callout>
|
||||
|
||||
## Getting "Bad Gateway Error" When Accessing Your Application Domain
|
||||
|
||||
If you're encountering a Bad Gateway Error when accessing your application through its domain, this typically indicates one of several common configuration issues:
|
||||
|
||||
### Common Causes
|
||||
1. **Port Mismatch**: The configured port might be incorrect
|
||||
2. **Listen Address Configuration**: The service might be listening only on `127.0.0.1` instead of `0.0.0.0`
|
||||
|
||||
### Common Solution for Modern JavaScript Frameworks
|
||||
This issue frequently occurs with modern JavaScript frameworks like Vite, Astro, or Vue.js applications. By default, these frameworks often listen only on localhost (`127.0.0.1`).
|
||||
|
||||
To resolve this, you need to configure your application to listen on all available network interfaces (`0.0.0.0`).
|
||||
|
||||
#### Example Configuration for Vite
|
||||
Here's how to properly configure a Vite application:
|
||||
|
||||
```ts
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
preview: {
|
||||
port: 3000,
|
||||
host: true, // This enables listening on all network interfaces
|
||||
},
|
||||
server: { // Also add this for development server
|
||||
host: true, // This enables listening on all network interfaces
|
||||
port: 3000
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Framework-Specific Notes
|
||||
- **Vite Apps**: Use the configuration above
|
||||
- **Astro**: Similar configuration in `astro.config.mjs`
|
||||
- **Vue.js**: Configure in `vite.config.js` if using Vite
|
||||
- **Other Frameworks**: Check your framework's documentation for network interface configuration
|
||||
|
||||
Remember to deploy again your application after making these changes for them to take effect.
|
||||
|
||||
## Docker Compose Volume Mounts
|
||||
|
||||
When using Docker Compose, you can configure volume mounts in your `docker-compose.yml` file:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- my-database:/var/lib/mysql
|
||||
```
|
||||
|
||||
### Use of closed network when restarting Traefik
|
||||
|
||||
If you see this error in the logs of Traefik, it means that the network is being closed, this is the normal behavior when restarting Traefik.
|
||||
|
||||
```bash
|
||||
05/23/25, 12:21:12 PM info 2025-05-23T09:21:12Z ERR: error="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
|
||||
05/23/25, 12:21:12 PM info 2025-05-23T09:21:12Z ERR: error="accept tcp [::]:9000: use of closed network connection" entryPointName=traefik
|
||||
05/23/25, 12:21:12 PM info 2025-05-23T09:21:12Z ERR: error="accept tcp [::]:80: use of closed network connection" entryPointName=web
|
||||
05/23/25, 12:21:12 PM info 2025-05-23T09:21:12Z ERR: error="close tcp [::]:9000: use of closed network connection" entryPointName=traefik
|
||||
05/23/25, 12:21:12 PM info 2025-05-23T09:21:12Z ERR: error="close tcp [::]:443: use of closed network connection" entryPointName=websecure
|
||||
05/23/25, 12:21:12 PM info 2025-05-23T09:21:12Z ERR: error="close tcp [::]:80: use of closed network connection" entryPointName=web
|
||||
```
|
||||
|
||||
### Creating Configuration Files
|
||||
|
||||
If you need to create configuration files before deploying your compose setup:
|
||||
|
||||
1. Go to Advanced -> Mounts
|
||||
2. Create a new File Mount
|
||||
3. Add your configuration content in the content field
|
||||
4. Specify the file path for your configuration
|
||||
|
||||
Note: All File Mounts are automatically created in the `/files` directory. For example, if you create a file named `my-config.json`, it will be available at `/files/my-config.json`.
|
||||
|
||||
You can then reference this configuration file in your `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
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
|
||||
|
||||
Error response from daemon: must specify a listening address because the address to advertise is not recognized as a system address, and a system's IP address to use could not be uniquely identified
|
||||
|
||||
This error occurs when the Docker Swarm is not properly initialized.
|
||||
|
||||
To fix this, you need to assign a the public IP address to the Docker Swarm, ideally you can use a private IP address from your network, but if you require features from docker swarm, you
|
||||
will need to use a public IP address.
|
||||
|
||||
```bash
|
||||
curl -sSL https://dokploy.com/install.sh | ADVERTISE_ADDR=your-ip sh
|
||||
```
|
||||
|
||||
|
||||
## My Dokploy UI Instance is Not Accessible
|
||||
|
||||
If you can't access your Dokploy UI instance, there could be several causes. While this issue won't occur with Dokploy Cloud (where our team manages the infrastructure), self-hosted instances might encounter configuration problems.
|
||||
|
||||
Let's go through the possible cases where your Dokploy UI instance might be inaccessible:
|
||||
|
||||
### 1. Insufficient Storage Space
|
||||
|
||||
If you've made many deployments and don't have available space on your server, the Dokploy database might enter recovery mode, preventing access to the user interface. Here's a quick solution to clear cache and free up server space:
|
||||
|
||||
```bash
|
||||
docker system prune -a
|
||||
docker builder prune -a
|
||||
docker image prune -a
|
||||
```
|
||||
|
||||
### 2. Container Race Condition During Restart
|
||||
|
||||
During a restart, a race condition might occur where Dokploy's dependent containers don't start in the correct order. To troubleshoot this:
|
||||
|
||||
First, verify the running containers:
|
||||
```bash
|
||||
docker ps
|
||||
```
|
||||
|
||||
You should see all four of these containers running:
|
||||
```bash
|
||||
2a5b955c32b6 dokploy/dokploy:latest "docker-entrypoint.s…" 4 days ago Up 4 days 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp dokploy.1.4bkuszk98muz372kw5mvwkw0h
|
||||
5a989bf52bc6 postgres:16 "docker-entrypoint.s…" 4 days ago Up 4 days 5432/tcp dokploy-postgres.1.9hvjaxrmby7ex2denjtwo0csf
|
||||
a29d56342175 redis:7 "docker-entrypoint.s…" 4 days ago Up 4 days 6379/tcp dokploy-redis.1.epl51a9bt8yr7ur0f1akeeyuk
|
||||
05be01c5612f traefik:v2.5 "/entrypoint.sh trae…" 4 days ago Up 4 days 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp dokploy-traefik.1.2oktabjmfu558x2d2dy6czt8m
|
||||
```
|
||||
|
||||
If all four containers are running but you still can't access the interface, it's time to debug:
|
||||
|
||||
### Debugging Process
|
||||
|
||||
#### 1. Check Container Logs
|
||||
Start by examining the logs of each container:
|
||||
|
||||
```bash
|
||||
docker service logs dokploy # Dokploy UI
|
||||
docker service logs dokploy-postgres # Postgres
|
||||
docker service logs dokploy-redis # Redis
|
||||
docker logs dokploy-traefik # Traefik
|
||||
```
|
||||
|
||||
#### 2. Common Database Connection Issue
|
||||
|
||||
A common case is when the Postgres container starts after the Dokploy container, preventing Dokploy from connecting to the database. You might see logs like this when running `docker service logs dokploy`:
|
||||
|
||||
```ts
|
||||
> dokploy@v0.22.3 start /app
|
||||
> node -r dotenv/config dist/server.mjs
|
||||
|
||||
Default middlewares already exists
|
||||
Network is already initilized
|
||||
Main config already exists
|
||||
Default traefik config already exists
|
||||
Migration failed [Error: getaddrinfo ENOTFOUND dokploy-postgres] {
|
||||
errno: -3008,
|
||||
code: 'ENOTFOUND',
|
||||
syscall: 'getaddrinfo',
|
||||
hostname: 'dokploy-postgres'
|
||||
}
|
||||
Setting up cron jobs....
|
||||
Main Server Error [Error: getaddrinfo ENOTFOUND dokploy-postgres] {
|
||||
errno: -3008,
|
||||
code: 'ENOTFOUND',
|
||||
syscall: 'getaddrinfo',
|
||||
hostname: 'dokploy-postgres'
|
||||
}
|
||||
```
|
||||
|
||||
To fix this, restart the Dokploy service:
|
||||
```bash
|
||||
docker service scale dokploy=0
|
||||
# Then
|
||||
docker service scale dokploy=1
|
||||
```
|
||||
|
||||
#### 3. Traefik Configuration Issues
|
||||
|
||||
If all containers are running but you still can't access the UI, and Dokploy logs show no errors, the Traefik container might have configuration issues.
|
||||
|
||||
When running `docker logs dokploy-traefik`, you might see errors like:
|
||||
|
||||
```shell
|
||||
2025-04-07T15:20:18Z ERR Error occurred during watcher callback error="/etc/dokploy/traefik/dynamic/dokploy.yml: field not found, node: passHostHeader" providerName=file
|
||||
```
|
||||
|
||||
First, try restarting Traefik:
|
||||
```bash
|
||||
docker restart dokploy-traefik
|
||||
```
|
||||
|
||||
If you still can't access it and the same error persists in the Traefik logs, you'll need to check the Traefik configuration. In this case, the error indicates that the `passHostHeader` field is missing in the configuration.
|
||||
|
||||
If you've modified any Traefik configuration for an `application` and added invalid configuration, the logs will point to the error. For example, the error above mentions `field not found, node: passHostHeader`, which means we need to manually modify the configuration files in `/etc/dokploy/traefik`.
|
||||
|
||||
Here's an example of an invalid configuration:
|
||||
|
||||
```yaml
|
||||
http:
|
||||
routers:
|
||||
dokploy-router-app:
|
||||
rule: Host(`my-domain.com`)
|
||||
service: dokploy-service-app
|
||||
entryPoints:
|
||||
- web
|
||||
middlewares:
|
||||
- redirect-to-https
|
||||
dokploy-router-app-secure:
|
||||
rule: Host(`my-domain.com`)
|
||||
service: dokploy-service-app
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
services:
|
||||
dokploy-service-app:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://dokploy:3000
|
||||
- passHostHeader: true
|
||||
```
|
||||
|
||||
The correct configuration should be:
|
||||
|
||||
```yaml
|
||||
http:
|
||||
routers:
|
||||
dokploy-router-app:
|
||||
rule: Host(`my-domain.com`)
|
||||
service: dokploy-service-app
|
||||
entryPoints:
|
||||
- web
|
||||
middlewares:
|
||||
- redirect-to-https
|
||||
dokploy-router-app-secure:
|
||||
rule: Host(`my-domain.com`)
|
||||
service: dokploy-service-app
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
services:
|
||||
dokploy-service-app:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://dokploy:3000
|
||||
passHostHeader: true
|
||||
```
|
||||
|
||||
After fixing the configuration, restart Traefik:
|
||||
```bash
|
||||
docker restart dokploy-traefik
|
||||
```
|
||||
|
||||
You should now be able to access the user interface.
|
||||
|
||||
|
||||
## Recreate dokploy containers
|
||||
|
||||
In the case you want to recreate the dokploy services, you can do the following:
|
||||
|
||||
|
||||
Remove the dokploy-redis service:
|
||||
```bash
|
||||
docker service rm dokploy-redis
|
||||
|
||||
# Create a new dokploy-redis service
|
||||
docker service create \
|
||||
--name dokploy-redis \
|
||||
--constraint 'node.role==manager' \
|
||||
--network dokploy-network \
|
||||
--mount type=volume,source=dokploy-redis,target=/data \
|
||||
redis:7
|
||||
```
|
||||
|
||||
Remove the dokploy-postgres service:
|
||||
|
||||
```bash
|
||||
docker service rm dokploy-postgres
|
||||
|
||||
# Create a new dokploy-postgres service
|
||||
docker service create \
|
||||
--name dokploy-postgres \
|
||||
--constraint 'node.role==manager' \
|
||||
--network dokploy-network \
|
||||
--env POSTGRES_USER=dokploy \
|
||||
--env POSTGRES_DB=dokploy \
|
||||
--env POSTGRES_PASSWORD=amukds4wi9001583845717ad2 \
|
||||
--mount type=volume,source=dokploy-postgres,target=/var/lib/postgresql/data \
|
||||
postgres:16
|
||||
```
|
||||
|
||||
|
||||
Remove the dokploy-traefik service:
|
||||
|
||||
```bash
|
||||
# If you are using docker standalone traefik
|
||||
docker rm -f dokploy-traefik
|
||||
|
||||
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:ro \
|
||||
-p 80:80/tcp \
|
||||
-p 443:443/tcp \
|
||||
-p 443:443/udp \
|
||||
traefik:v3.6.1
|
||||
|
||||
docker network connect dokploy-network dokploy-traefik
|
||||
|
||||
# If you are using docker service traefik
|
||||
docker service rm dokploy-traefik
|
||||
|
||||
# Create a new dokploy-traefik service
|
||||
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:
|
||||
|
||||
```bash
|
||||
docker service rm dokploy
|
||||
|
||||
# Create a new dokploy service
|
||||
|
||||
# We need the advertise address to be set which is the Private IP of your server, you can get it by running the following command:
|
||||
|
||||
# Run this command to get the private IP of your server:
|
||||
|
||||
# Copy this value and paste in the ADVERTISE_ADDR variable:
|
||||
ip addr show | grep -E "inet (192\.168\.|10\.|172\.1[6-9]\.|172\.2[0-9]\.|172\.3[0-1]\.)" | head -n1 | awk '{print $2}' | cut -d/ -f1
|
||||
|
||||
# Create the dokploy service
|
||||
docker service create \
|
||||
--name dokploy \
|
||||
--replicas 1 \
|
||||
--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,target=/root/.docker \
|
||||
--publish published=3000,target=3000,mode=host \
|
||||
--update-parallelism 1 \
|
||||
--update-order stop-first \
|
||||
--constraint 'node.role == manager' \
|
||||
-e ADVERTISE_ADDR="Eg: 192.168.1.100" \
|
||||
dokploy/dokploy:latest
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Final Notes
|
||||
|
||||
While the specific issues may vary, the general troubleshooting approach remains similar to what we've described above, and is the general way we always follow when correcting a problem related to the dokploy instance not starting.. If you still can't access the user interface:
|
||||
1. Check that all containers are running properly
|
||||
2. Review the logs of each container for specific error messages
|
||||
3. Verify all configuration files
|
||||
4. Make sure to read the Traefik documentation for detailed configuration options: https://doc.traefik.io/traefik/
|
||||
|
||||
|
||||
<Callout title="Dokploy Cloud" type="info">
|
||||
If you are using Dokploy Cloud, you don't need to worry about this, our team will handle the infrastructure for you.
|
||||
|
||||
Start using Dokploy Cloud https://app.dokploy.com/
|
||||
</Callout>
|
||||
@@ -1,64 +0,0 @@
|
||||
---
|
||||
title: Uninstall
|
||||
description: "Learn how to uninstall Dokploy on your server"
|
||||
---
|
||||
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps';
|
||||
|
||||
Follow these steps to completely remove Dokploy and its components from your server.
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
Remove the docker swarm services created by Dokploy:
|
||||
|
||||
```bash
|
||||
docker service remove dokploy dokploy-traefik dokploy-postgres dokploy-redis
|
||||
docker container remove -f dokploy-traefik
|
||||
```
|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
|
||||
Remove the docker volumes created by Dokploy:
|
||||
|
||||
```bash
|
||||
docker volume remove -f dokploy dokploy-postgres dokploy-redis
|
||||
```
|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
|
||||
Remove the docker network created by Dokploy:
|
||||
|
||||
```bash
|
||||
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>
|
||||
|
||||
<Step>
|
||||
|
||||
Remove the dokploy files and directories from your server:
|
||||
|
||||
```bash
|
||||
sudo rm -rf /etc/dokploy
|
||||
```
|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user