feat: base volume path setting

Add global base_volume_path to settings. Relative volume source
paths are automatically prepended with the base path at deploy
time. Absolute paths are used as-is. Configurable in Settings >
General.
This commit is contained in:
2026-03-28 15:21:37 +03:00
parent 62a9249abf
commit 1cfd23c431
6 changed files with 23 additions and 5 deletions
+10
View File
@@ -707,9 +707,19 @@ func (d *Deployer) computeVolumeMounts(projectID, stageName, imageTag string) []
return nil
}
// Get base volume path from settings.
basePath := ""
if settings, err := d.store.GetSettings(); err == nil {
basePath = settings.BaseVolumePath
}
mounts := make([]mount.Mount, 0, len(vols))
for _, vol := range vols {
source := vol.Source
// Prepend base path if source is relative (doesn't start with /).
if basePath != "" && !filepath.IsAbs(source) {
source = filepath.Join(basePath, source)
}
if vol.Mode == "isolated" {
source = filepath.Join(source, fmt.Sprintf("%s-%s", stageName, imageTag))
}