Skip to content

Commit

Permalink
Update mikro-orm.config.ts (#15)
Browse files Browse the repository at this point in the history
support for custom destination DB
  • Loading branch information
anabel29 authored Oct 17, 2024
1 parent 439740f commit 29a501e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions worker/mikro-orm.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { Options, PostgreSqlDriver } from "@mikro-orm/postgresql";
import { Migrator } from '@mikro-orm/migrations';
import { SqlHighlighter } from "@mikro-orm/sql-highlighter";

const DB_HOST = process.env.DB_HOST
const DB_PORT = parseInt(process.env.DB_PORT as string, 10)
const DB_NAME = process.env.DB_NAME
const DB_USER = process.env.DB_USER
const DB_PASSWORD = process.env.DB_PASSWORD
const DB_HOST = process.env.DESTINATION_DB_HOST || process.env.DB_HOST
const DB_PORT = parseInt(process.env.DESTINATION_DB_PORT as string, 10) || parseInt(process.env.DB_PORT as string, 10)
const DB_NAME = process.env.DESTINATION_DB_NAME || process.env.DB_NAME
const DB_USER = process.env.DESTINATION_DB_USER || process.env.DB_USER
const DB_PASSWORD = process.env.DESTINATION_DB_PASSWORD || process.env.DB_PASSWORD

const mikroOrmConfig: Options = {
driver: PostgreSqlDriver,
Expand Down

0 comments on commit 29a501e

Please sign in to comment.