diff --git a/src/app.ts b/src/app.ts index 0b5f44c..b921180 100644 --- a/src/app.ts +++ b/src/app.ts @@ -137,6 +137,8 @@ export async function getApp (connOptions: ConnectionOptions) { await cargoBikeAPI.populateCopyConfig(); } catch (err) { console.error(err); + // exit so docker can restart the container and reattempt + process.exit(1); } const server = new ApolloServer({ diff --git a/src/index.ts b/src/index.ts index 7e183f0..2ee549c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,6 +23,10 @@ import { getApp, getConnectionOptions, userAPI } from './app'; app.listen(4000, async () => { await userAPI.createDefinedPermissions().catch( - err => console.log(err)); + err => { + console.log(err); + // exit so docker can restart the container and reattempt + process.exit(1); + }); }); })(); diff --git a/src/schema/type-defs.ts b/src/schema/type-defs.ts index a4e005c..02f6f0d 100644 --- a/src/schema/type-defs.ts +++ b/src/schema/type-defs.ts @@ -983,18 +983,21 @@ export default gql` street: String! number: String! zip: String! + city: String } input AddressCreateInput { street: String! number: String! zip: String! + city: String } input AddressUpdateInput { street: String number: String zip: String + city: String } type ActionLog {