Dockerfile, CONF_NS and fix sqlite3 under alpine

This commit is contained in:
2022-11-20 03:41:38 +01:00
parent 0d3526221d
commit 516809cd02
3 changed files with 34 additions and 8 deletions

View File

@@ -18,8 +18,8 @@ type Config struct {
var Conf Config
var configLoc = Config{
Namespace: "local",
var configLocHost = Config{
Namespace: "local-host",
GinDebug: true,
ServerIP: "0.0.0.0",
ServerPort: "8080",
@@ -28,6 +28,16 @@ var configLoc = Config{
ReturnRawErrors: true,
}
var configLocDocker = Config{
Namespace: "local-docker",
GinDebug: true,
ServerIP: "0.0.0.0",
ServerPort: "80",
DBFile: "/data/scn_docker.sqlite3",
RequestTimeout: 16 * time.Second,
ReturnRawErrors: true,
}
var configDev = Config{
Namespace: "develop",
GinDebug: true,
@@ -59,7 +69,8 @@ var configProd = Config{
}
var allConfig = []Config{
configLoc,
configLocHost,
configLocDocker,
configDev,
configStag,
configProd,
@@ -67,7 +78,7 @@ var allConfig = []Config{
func getConfig(ns string) (Config, bool) {
if ns == "" {
return configLoc, true
return configLocHost, true
}
for _, c := range allConfig {
if c.Namespace == ns {