From 4b008a01d2d1fd5e89ddc138d2a6e99260498f5b Mon Sep 17 00:00:00 2001 From: Namekuji Date: Sat, 10 Dec 2022 12:44:18 -0500 Subject: [PATCH] fix .env --- .env.production.example | 12 ------------ .env.production.sample | 12 ++++++++++++ .gitignore | 3 +-- config/{livekit-example.yaml => livekit.sample.yaml} | 0 config/{redis-example.conf => redis.sample.conf} | 0 server.go | 4 ++-- 6 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 .env.production.example create mode 100644 .env.production.sample rename config/{livekit-example.yaml => livekit.sample.yaml} (100%) rename config/{redis-example.conf => redis.sample.conf} (100%) diff --git a/.env.production.example b/.env.production.example deleted file mode 100644 index e0aadc3..0000000 --- a/.env.production.example +++ /dev/null @@ -1,12 +0,0 @@ -LOCAL_DOMAIN="audon.example.com" -DB_HOST="db:27017" -DB_NAME="audon" -DB_USER="mongo" -DB_PASS="mongo" -REDIS_HOST="redis:6379" -REDIS_USER="" -REDIS_PASS="" -LIVEKIT_API_KEY="devkey" -LIVEKIT_API_SECRET="secret" -LIVEKIT_HOST="livekit.example.com" -LIVEKIT_LOCAL_DOMAIN="livekit.example.com" diff --git a/.env.production.sample b/.env.production.sample new file mode 100644 index 0000000..2fad112 --- /dev/null +++ b/.env.production.sample @@ -0,0 +1,12 @@ +LOCAL_DOMAIN=audon.example.com +DB_HOST=db:27017 +DB_NAME=audon +DB_USER=mongo +DB_PASS=mongo +REDIS_HOST=redis:6379 +REDIS_USER= +REDIS_PASS= +LIVEKIT_API_KEY=devkey +LIVEKIT_API_SECRET=secret +LIVEKIT_HOST=livekit.example.com +LIVEKIT_LOCAL_DOMAIN=livekit.example.com diff --git a/.gitignore b/.gitignore index 2d1cf44..7ec7858 100644 --- a/.gitignore +++ b/.gitignore @@ -103,7 +103,6 @@ web_modules/ .env.production.local .env.local .env.production -!.env.*.example # parcel-bundler cache (https://parceljs.org/) .cache @@ -185,4 +184,4 @@ dist ### Audon ### # Ignore all config files config/* -!config/*-example.* +!config/*.sample.* diff --git a/config/livekit-example.yaml b/config/livekit.sample.yaml similarity index 100% rename from config/livekit-example.yaml rename to config/livekit.sample.yaml diff --git a/config/redis-example.conf b/config/redis.sample.conf similarity index 100% rename from config/redis-example.conf rename to config/redis.sample.conf diff --git a/server.go b/server.go index 69fb3ba..390f539 100644 --- a/server.go +++ b/server.go @@ -58,10 +58,10 @@ func main() { log.Println("Audon server started.") // Load config from environment variables and .env - log.Println("Reading .env files") + log.Println("Loading Audon config values") mainConfig, err = loadConfig(os.Getenv("AUDON_ENV")) if err != nil { - log.Fatalf("Failed reading .env files: %s\n", err.Error()) + log.Fatalf("Failed loading config values: %s\n", err.Error()) } // Setup Livekit RoomService Client