Fix problems and adding functionnalities

Many fixes and enhancements:

- Add icon option
- Add env file managment
- Ordering compose parsing options
- Fix path with underscores
- Fix image and tag discovery
- Better documentation for labels
This commit is contained in:
2024-10-17 17:08:42 +02:00
parent 78dfb15cf5
commit 918f1b845b
22 changed files with 991 additions and 893 deletions

View File

@@ -20,6 +20,11 @@ func TplName(serviceName, appname string, suffix ...string) string {
if len(suffix) > 0 {
suffix[0] = "-" + suffix[0]
}
for i, s := range suffix {
// replae all "_" with "-"
suffix[i] = strings.ReplaceAll(s, "_", "-")
}
serviceName = strings.ReplaceAll(serviceName, "_", "-")
return `{{ include "` + appname + `.fullname" . }}-` + serviceName + strings.Join(suffix, "-")
}
@@ -109,8 +114,9 @@ func PathToName(path string) string {
if path[0] == '/' || path[0] == '.' {
path = path[1:]
}
path = strings.ReplaceAll(path, "/", "_")
path = strings.ReplaceAll(path, ".", "_")
path = strings.ReplaceAll(path, "_", "-")
path = strings.ReplaceAll(path, "/", "-")
path = strings.ReplaceAll(path, ".", "-")
return path
}