Start of docker support

This commit is contained in:
2022-05-14 16:38:48 +09:30
parent ee7b8565cc
commit 14c79a7ff2
4 changed files with 62 additions and 4 deletions

12
main.go
View File

@@ -3,6 +3,7 @@ package main
import (
"embed"
"encoding/json"
"flag"
"fmt"
"html/template"
"io"
@@ -43,8 +44,17 @@ type errorResponse struct {
func main() {
log.Printf("Starting gropple %s - https://github.com/tardisx/gropple", versionInfo.GetInfo().CurrentVersion)
var configPath string
flag.StringVar(&configPath, "config-path", "", "path to config file")
flag.Parse()
configService = &config.ConfigService{}
configService.DetermineConfigDir()
if configPath != "" {
configService.ConfigPath = configPath
} else {
configService.DetermineConfigDir()
}
exists, err := configService.ConfigFileExists()
if err != nil {
log.Fatal(err)