coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
34.83k stars 1.91k forks source link

[Bug]: Watch paths do not work #2755

Open ari-party opened 4 months ago

ari-party commented 4 months ago

Description

I set watch paths to /packages/mtc-artillery/**, I create a file in that folder. A new deployment is not queued when I push it.

I tried !/packages/mtc-artillery/** !/packages/mtc-artillery and /packages/mtc-artillery

Minimal Reproduction (if possible, example repository)

image Repository: mtc-artillery

Exception or Error

No response

Version

v4.0.0-beta.306

aelmiger commented 4 months ago

Try removing the / infront of the watch paths: packages/mtc-artillery/**

ari-party commented 4 months ago

Try removing the / infront of the watch paths: packages/mtc-artillery/**

ahh thank you that fixes it.

but this issue should in my opinion remain open as that slash should work as project root...

mohdmusthafa commented 4 months ago

Try removing the / infront of the watch paths: packages/mtc-artillery/**

ahh thank you that fixes it.

but this issue should in my opinion remain open as that slash should work as project root...

I believe the way the watch paths work it does a string pattern match on the committed files list received from the webhook (source control) https://github.com/coollabsio/coolify/blob/e9158b7305bb9253fe75a0e76ef34af62f75199b/app/Models/Application.php#L1077-L1090

Also, the watch paths are gitignore styled matched from the root of the repository

hk86 commented 4 months ago

A note: You need to escape special characters if you use them within the folder name, i.e. [blog] needs to be escaped\[blog\]