Add prefix for environment variables
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
func parseEnv() (*config, error) {
|
||||
c := new(config)
|
||||
if err := envconfig.Process("", c); err != nil {
|
||||
if err := envconfig.Process(appID, c); err != nil {
|
||||
return nil, errors.Wrap(err, "failed to parse env")
|
||||
}
|
||||
return c, nil
|
||||
|
||||
@@ -11,6 +11,8 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
const appID = "anon3anon"
|
||||
|
||||
func main() {
|
||||
logger := initLogger()
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
services:
|
||||
anon3anon:
|
||||
environment:
|
||||
TELEGRAM_BOT_TOKEN: 123:ABC
|
||||
OWNER_CHAT_ID: 123
|
||||
ANON3ANON_TELEGRAM_BOT_TOKEN: 123:ABC
|
||||
ANON3ANON_OWNER_CHAT_ID: 123
|
||||
|
||||
Reference in New Issue
Block a user