+1
-1
@@ -1,3 +1,3 @@
|
||||
id_rsa
|
||||
data/id_rsa
|
||||
repos/
|
||||
skipped.yaml
|
||||
|
||||
+2
-2
@@ -12,9 +12,9 @@ WORKDIR /app
|
||||
|
||||
# Copy the binary and config file from the builder stage
|
||||
COPY --from=builder /app/controlla /app/
|
||||
COPY config.yaml /app/
|
||||
COPY data/config.yaml /app/data/config.yaml
|
||||
|
||||
# Install bash for potential scripting needs
|
||||
RUN apk add --no-cache bash
|
||||
|
||||
CMD ["./controlla"]
|
||||
CMD ["./controlla --config-file /app/data/config.yaml"]
|
||||
@@ -1,8 +1,8 @@
|
||||
git:
|
||||
repo_url: "git@example.git"
|
||||
local_repo_path: ./repos/myrepo
|
||||
local_repo_path: ./data/repos/myrepo
|
||||
branch: "main"
|
||||
ssh_key_path: "id_rsa"
|
||||
ssh_key_path: "./data/id_rsa"
|
||||
|
||||
checker:
|
||||
watch_folder: services
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"crypto/sha1"
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
@@ -153,12 +154,15 @@ func handleCallbackQuery(bot *tgbotapi.BotAPI, callback *tgbotapi.CallbackQuery,
|
||||
// Main entry point for the controlla application.
|
||||
// This service checks container images for updates and notifies via Telegram.
|
||||
func main() {
|
||||
// Parse command-line flags
|
||||
configPath := flag.String("config-file", "./data/config.yaml", "Path to config file")
|
||||
flag.Parse()
|
||||
// Set up logging format and level
|
||||
logrus.SetFormatter(&logrus.TextFormatter{FullTimestamp: true})
|
||||
logrus.SetLevel(logrus.InfoLevel)
|
||||
|
||||
// Load application configuration from YAML file
|
||||
appConfig, err := config.LoadConfig("config.yaml")
|
||||
appConfig, err := config.LoadConfig(*configPath)
|
||||
if err != nil {
|
||||
log.Fatalf("Error loading application configuration: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user