@oslokommune/auth-bff 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/package.json +1 -1
- package/dist/src/OpenIdConfigManager.js +1 -1
- package/dist/src/server.js +9 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ WORKDIR /application
|
|
|
81
81
|
EXPOSE 8080
|
|
82
82
|
COPY --from=build /home/app/dist /application/dist
|
|
83
83
|
ENV NODE_ENV=production
|
|
84
|
-
RUN npm install -g @oslokommune/auth-bff
|
|
84
|
+
RUN npm install -g @oslokommune/auth-bff@<version>
|
|
85
85
|
COPY bff.config.json /application/
|
|
86
86
|
CMD ["auth-bff"]
|
|
87
87
|
```
|
package/dist/package.json
CHANGED
|
@@ -29,7 +29,7 @@ export class OpenIdConfigManager {
|
|
|
29
29
|
if (__classPrivateFieldGet(this, _OpenIdConfigManager_bffConfig, "f").okDataIdPortenKeyName) {
|
|
30
30
|
setInterval(async () => {
|
|
31
31
|
await this.updateOpenIdConfig();
|
|
32
|
-
}, 5 * 60 * 1000);
|
|
32
|
+
}, 5 * 60 * 1000).unref();
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
async updateOpenIdConfig() {
|
package/dist/src/server.js
CHANGED
|
@@ -35,9 +35,15 @@ app.use(basePath, staticRoutes(config));
|
|
|
35
35
|
const server = app.listen(port, () => {
|
|
36
36
|
console.log(`auth-bff ${packageJson.version} started on port ${port}`);
|
|
37
37
|
});
|
|
38
|
-
|
|
39
|
-
console.log(
|
|
38
|
+
const shutdown = (signal) => {
|
|
39
|
+
console.log(`${signal} received. Closing...`);
|
|
40
40
|
server.close(() => {
|
|
41
41
|
console.log('Server closed');
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
setTimeout(() => {
|
|
44
|
+
console.warn('Forced shutdown after timeout');
|
|
45
|
+
process.exit();
|
|
46
|
+
}, 10000).unref();
|
|
47
|
+
};
|
|
48
|
+
process.on('SIGTERM', () => shutdown('SIGTERM'));
|
|
49
|
+
process.on('SIGINT', () => shutdown('SIGINT'));
|