-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
infra: make clickhouse work with env URL
Signed-off-by: Arnav Gupta <[email protected]>
- Loading branch information
1 parent
a5f63c3
commit f80e13d
Showing
7 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ DB_DIALECT=postgres | |
DATABASE_URL="host=postgres user=postgres password=postgres dbname=onepixel port=5432 sslmode=disable TimeZone=UTC" | ||
ADMIN_API_KEY="8DC4FCD4-DD71-4C18-B9C0-C38EF6790815" | ||
JWT_SIGNING_KEY="ECkLlR74HWIZTG4GAFsmBFoqO7Nr30Bc" | ||
JWT_DURATION_DAYS=90 | ||
JWT_DURATION_DAYS=90 | ||
EVENTDB_URL="clickhouse://clickhouse:[email protected]:9000/onepixel?dial_timeout=10s&read_timeout=20s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,9 +60,8 @@ func GetAppDB() (*gorm.DB, error) { | |
func GetEventsDB() (*gorm.DB, error) { | ||
createEventsDbOnce.Do(func() { | ||
|
||
dsn := "clickhouse://clickhouse:[email protected]:9000/onepixel?dial_timeout=10s&read_timeout=20s" | ||
applogger.Warn("Events: Using clickhouse db") | ||
eventsDb = lo.Must(gorm.Open(clickhouse.Open(dsn), getGormConfig())) | ||
eventsDb = lo.Must(gorm.Open(clickhouse.Open(config.EventDBUrl), getGormConfig())) | ||
|
||
lo.Must0(eventsDb.AutoMigrate(&models.EventRedirect{})) | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters