Skip to content

Commit

Permalink
db changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Aug 22, 2024
1 parent d3c7bfc commit 4f821c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ services:

volumes:
postgres_volume:
name: "${STACK_NAME}_postgres_volume"
# name: "${STACK_NAME}_postgres_volume"
uploads_volume:
name: "${STACK_NAME}_uploads_volume"
# name: "${STACK_NAME}_uploads_volume"

networks:
traefik-public:
Expand Down
11 changes: 4 additions & 7 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ function loadConfig() {
username: process.env.DB_USER ?? 'postgres',
password: process.env.DB_PASS ?? 'postgres',
database: process.env.DB_NAME ?? 'postgres',
enabled: true,
schema: "public",
synchronize: NODE_ENV === 'development' ? false : false, // true shouldn't be used in production - otherwise you can lose production data.
logging: true,
logLevel: 'error',
dropSchema: false,
autoLoadEntities: true,
migrationsRun: true,
migrations: [`dist/db/migrations/*.js`],
dropSchema: false, // Don't use this in production - Drops the schema each time data source is being initialized.
migrationsRun: true, // if migrations should be auto run on every application launch. As an alternative, you can use CLI and run migration:run command.
migrations: [`dist/db/migrations/*.js`], //list of migrations that need to be loaded by TypeORM
},
db2: {
name: 'flaskPostgres',
Expand All @@ -51,7 +49,6 @@ function loadConfig() {
database: process.env.DB_FLASK_NAME,
enabled: true,
synchronize: false,
logLevel: 'error',
logging: false,
dropSchema: false,
autoLoadEntities: true,
Expand Down

0 comments on commit 4f821c6

Please sign in to comment.