Browse Source

fix: don't always synchronize, use TYPEORM_SYNCHRONIZE env

update-deps
Alex Mikhalev 6 years ago
parent
commit
cbf1285d5d
  1. 1
      docker-compose.dev.yml
  2. 1
      docker-compose.yml
  3. 1
      server/Database.ts

1
docker-compose.dev.yml

@ -24,6 +24,7 @@ services: @@ -24,6 +24,7 @@ services:
- TYPEORM_DATABASE=postgres
- TYPEORM_USERNAME=postgres
- TYPEORM_PASSWORD=8JN4w0UsN5dbjMjNvPe452P2yYOqg5PV
- TYPEORM_SYNCHRONIZE=true
- MQTT_URL=tcp://mosquitto:1883
# Must specify JWT_SECRET and MQTT_URL

1
docker-compose.yml

@ -16,6 +16,7 @@ services: @@ -16,6 +16,7 @@ services:
- TYPEORM_DATABASE=postgres
- TYPEORM_USERNAME=postgres
- TYPEORM_PASSWORD=8JN4w0UsN5dbjMjNvPe452P2yYOqg5PV
- TYPEORM_SYNCHRONIZE=true
# Must specify JWT_SECRET and MQTT_URL
database:

1
server/Database.ts

@ -38,7 +38,6 @@ export class Database { @@ -38,7 +38,6 @@ export class Database {
}
async createAll() {
await this.conn.synchronize();
if (process.env.INSERT_TEST_DATA) {
await this.insertData();
}

Loading…
Cancel
Save