From 6ba60a54a6f7f6f1b003f1b6ef171f7345ff9d4f Mon Sep 17 00:00:00 2001 From: lyx0 <66651385+lyx0@users.noreply.github.com> Date: Sun, 3 Dec 2023 23:56:25 +0100 Subject: [PATCH] rename database dsn --- cmd/nourybot/main.go | 4 ++-- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/nourybot/main.go b/cmd/nourybot/main.go index 2d657d1..45ac3a3 100644 --- a/cmd/nourybot/main.go +++ b/cmd/nourybot/main.go @@ -80,9 +80,9 @@ func main() { switch envFlag { case "dev": - cfg.db.dsn = os.Getenv("REMOTE_DSN") + cfg.db.dsn = os.Getenv("DEV_DSN") case "prod": - cfg.db.dsn = os.Getenv("REMOTE_DSN") + cfg.db.dsn = os.Getenv("PROD_DSN") } // Database config variables cfg.db.maxOpenConns = 25 diff --git a/docker-compose.yml b/docker-compose.yml index 1905912..8f0515c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: ports: - "127.0.0.1:55432:5432" volumes: - - "./data:/var/lib/postgresql/data" + - data:/var/lib/postgresql/data nourybot: build: context: .