Template or copy configuration
- Create ormconfig.json
- Change to using a dictionary for environmental variables
Change-Id: Ic02e813040f5a2b3d1f9d411970365a8f7e9955e
diff --git a/templates/ormconfig.json.j2 b/templates/ormconfig.json.j2
new file mode 100644
index 0000000..0f0cbc4
--- /dev/null
+++ b/templates/ormconfig.json.j2
@@ -0,0 +1,19 @@
+{#
+SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
+SPDX-License-Identifier: Apache-2.0
+#}
+[
+ {
+ "type": "postgres",
+ "host": "localhost",
+ "port": {{ timesheets_pg_db_port }},
+ "username": "{{ timesheets_pg_db_username }}",
+ "password": "{{ timesheets_pg_db_password }}",
+ "database": "{{ timesheets_pg_db }}",
+ "entities": ["dist/**/*.entity{ .ts,.js}"],
+ "synchronize": false,
+ "migrations": ["dist/migrations/*{.ts,.js}"],
+ "migrationsTableName": "migrations_typeorm",
+ "migrationsRun": true
+ }
+]