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