Merge pull request 'Fix configuration par variables d'environnement' (#172) from fix/agecemorg-env-vars into main
Reviewed-on: #172
This commit is contained in:
commit
b3a190c9b3
2 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,7 @@ package cmd
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
@ -51,6 +52,8 @@ func initConfig() {
|
||||||
viper.SetConfigName(".agecem-org")
|
viper.SetConfigName(".agecem-org")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
viper.SetEnvPrefix("AGECEM_ORG")
|
||||||
|
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||||
viper.AutomaticEnv() // read in environment variables that match
|
viper.AutomaticEnv() // read in environment variables that match
|
||||||
|
|
||||||
// If a config file is found, read it in.
|
// If a config file is found, read it in.
|
||||||
|
|
|
@ -14,6 +14,9 @@ services:
|
||||||
restart: 'unless-stopped'
|
restart: 'unless-stopped'
|
||||||
build: .
|
build: .
|
||||||
image: 'git.agecem.com/agecem/agecem-org:latest'
|
image: 'git.agecem.com/agecem/agecem-org:latest'
|
||||||
|
environment:
|
||||||
|
AGECEM_ORG_SERVER_DOCUMENTS_ACCESS_KEY_ID: "${MINIO_ROOT_USER}"
|
||||||
|
AGECEM_ORG_SERVER_DOCUMENTS_SECRET_ACCESS_KEY: "${MINIO_ROOT_PASSWORD}"
|
||||||
ports:
|
ports:
|
||||||
- '8080:8080'
|
- '8080:8080'
|
||||||
volumes:
|
volumes:
|
||||||
|
|
Loading…
Reference in a new issue