fix: update default environment mode to local and adjust database configurations

This commit is contained in:
Ardeman 2025-04-24 11:25:36 +08:00
parent 136c4634c8
commit 211f0154be
3 changed files with 21 additions and 21 deletions

View File

@ -12,7 +12,7 @@ import (
const (
YAML_PATH = "env/%s"
ENV_MODE = "ENV_MODE"
DEFAULT_ENV_MODE = "staging"
DEFAULT_ENV_MODE = "local"
)
var (

31
env/local.yaml vendored
View File

@ -9,33 +9,34 @@ jwt:
secret: "5Lm25V3Qd7aut8dr4QUxm5PZUrSFs"
postgresql:
host: 62.72.45.250
port: 20826
host: dpg-d04bi9juibrs73augcc0-a.singapore-postgres.render.com
port: 5432
driver: postgres
db: legalgonews-dev
db: legalgonews_dev
username: legalgo_admin
password: "K4K!2Kg7c@KW6H&4A2aBy2dFCRY3Sh"
ssl-mode: disable
password: "5h7DCBR1T8pug6AlbrHXqIDAr9o2vnky"
ssl-mode: require
max-idle-connections-in-second: 600
max-open-connections-in-second: 600
connection-max-life-time-in-second: 600
debug: false
oss:
access_key_id: cf9a475e18bc7626cbdbf09709d82a64
access_key_secret: 91f3321294d3e23035427a0ecb893ada
endpoint: sin1.contabostorage.com
bucket_name: legalgonews-dev
access_key_id: GTK7i3SVy9llQeGH0Htv
access_key_secret: 2psmKXZFpevA9n5ntSDRMqFBpZuSz32dvtXjYclf
endpoint: news-cdn.legalgo.id
bucket_name: uploads-staging
log_level: Error
host_url: https://sin1.contabostorage.com
public_url: https://sin1.contabostorage.com/fda98c2228f246f29a7e466b86b3b9e7
host_url: https://news-cdn.legalgo.id
public_url: https://news-cdn.legalgo.id
redis:
host: 62.72.45.250
port: 26379
password: mDtpsyEW8W26vwLhglpO
host: singapore-keyvalue.render.com
port: 6379
username: red-d04c8k49c44c739ga8dg
password: ItPzniHv94yr8vY4HTrhCfKoibqBh61T
db: 5
ssl: false
ssl: true
max-idle-connections-in-second: 600
max-open-connections-in-second: 600
connection-max-life-time-in-second: 600

9
env/staging.yaml vendored
View File

@ -9,13 +9,13 @@ jwt:
secret: "5Lm25V3Qd7aut8dr4QUxm5PZUrSFs"
postgresql:
host: dpg-d04bi9juibrs73augcc0-a.singapore-postgres.render.com
host: dpg-d04bi9juibrs73augcc0-a
port: 5432
driver: postgres
db: legalgonews_dev
username: legalgo_admin
password: "5h7DCBR1T8pug6AlbrHXqIDAr9o2vnky"
ssl-mode: require
ssl-mode: disable
max-idle-connections-in-second: 600
max-open-connections-in-second: 600
connection-max-life-time-in-second: 600
@ -31,12 +31,11 @@ oss:
public_url: https://news-cdn.legalgo.id
redis:
host: singapore-keyvalue.render.com
host: red-d04c8k49c44c739ga8dg
port: 6379
username: red-d04c8k49c44c739ga8dg
password: ItPzniHv94yr8vY4HTrhCfKoibqBh61T
db: 5
ssl: true
ssl: false
max-idle-connections-in-second: 600
max-open-connections-in-second: 600
connection-max-life-time-in-second: 600