Files
website/apps/docs/content/docs/core/watch-paths.mdx
Mauricio Siu 1388b1266d 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.
2025-12-07 06:26:03 -06:00

73 lines
2.5 KiB
Plaintext

---
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)
- [Gitea Integration](/docs/core/gitea)
Note: When using the Git provider, the functionality will only work with GitHub, GitLab, Bitbucket, or Gitea 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)
<userStyle>Normal</userStyle>