mirror of
https://github.com/Dokploy/website
synced 2025-06-26 18:16:01 +00:00
docs: add Watch Paths documentation with comprehensive guide
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
"(examples)",
|
||||
"auto-deploy",
|
||||
"providers",
|
||||
|
||||
"watch-paths",
|
||||
"---Advanced---",
|
||||
"cluster",
|
||||
"multi-server"
|
||||
|
||||
71
apps/docs/content/docs/core/watch-paths.mdx
Normal file
71
apps/docs/content/docs/core/watch-paths.mdx
Normal file
@@ -0,0 +1,71 @@
|
||||
---
|
||||
title: Watch Paths
|
||||
description: Learn how to use watch paths in your application or docker compose.
|
||||
---
|
||||
|
||||
Watch paths are a feature that allows you to monitor specific directories or files for changes and automatically trigger actions when modifications occur.
|
||||
|
||||
## Overview
|
||||
|
||||
Watch paths functionality is available for both standalone applications and Docker Compose configurations. This feature helps automate deployments based on file changes in your repository.
|
||||
|
||||
## Supported Source Providers
|
||||
|
||||
The following source control providers are supported:
|
||||
|
||||
- GitHub
|
||||
- GitLab
|
||||
- Bitbucket
|
||||
- Git (works with Bitbucket, Github, and GitLab repositories)
|
||||
|
||||
## Basic Usage
|
||||
|
||||
Let's say you have a project with the following directory structure:
|
||||
|
||||
```
|
||||
my-app/
|
||||
├── src/
|
||||
│ ├── index.js
|
||||
├── public/
|
||||
```
|
||||
|
||||
By default, dokploy accepts an array of paths, allowing you to monitor multiple locations. For example:
|
||||
|
||||
- To trigger deployments when any file in the `src/` directory changes, use the pattern: `src/*`
|
||||
- To monitor a specific file, simply specify its path: `src/index.js`
|
||||
|
||||
## Configuration
|
||||
|
||||
Watch Paths works out of the box with zero configuration when using GitHub as your provider. For other providers, you'll need to first set up auto-deploys as explained in:
|
||||
|
||||
- [Auto Deploy](/docs/core/auto-deploy)
|
||||
- [Bitbucket Integration](/docs/core/bitbucket)
|
||||
- [GitLab Integration](/docs/core/gitlab)
|
||||
- [GitHub Integration](/docs/core/github)
|
||||
|
||||
Note: When using the Git provider, the functionality will only work with GitHub, GitLab, or Bitbucket repositories.
|
||||
|
||||
## Pattern Matching Features
|
||||
|
||||
We support a wide range of pattern matching features:
|
||||
|
||||
- Multiple glob patterns
|
||||
- Wildcards:
|
||||
- `**` (matches any number of directories)
|
||||
- `*.js` (matches all JavaScript files)
|
||||
- Negation patterns:
|
||||
- `!a/*.js` (excludes JavaScript files in directory 'a')
|
||||
- `*!(b).js` (matches all JavaScript files except those ending with 'b')
|
||||
- Extended glob patterns:
|
||||
- `+(x|y)` (matches 'x' or 'y' one or more times)
|
||||
- `!(a|b)` (matches anything except 'a' or 'b')
|
||||
- POSIX character classes:
|
||||
- `[[:alpha:][:digit:]]` (matches any letter or number)
|
||||
- Brace expansion:
|
||||
- `foo/{1..5}.md` (matches foo/1.md through foo/5.md)
|
||||
- `bar/{a,b,c}.js` (matches bar/a.js, bar/b.js, bar/c.js)
|
||||
- Regex character classes:
|
||||
- `foo-[1-5].js` (matches foo-1.js through foo-5.js)
|
||||
- Regex logical "or":
|
||||
- `foo/(abc|xyz).js` (matches foo/abc.js or foo/xyz.js)
|
||||
|
||||
Reference in New Issue
Block a user