mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-19 08:02:55 +00:00
feat: support docker swarm deployments
This commit is contained in:
@@ -30,6 +30,7 @@ process.on('unhandledRejection', async error => {
|
||||
|
||||
let containerHashCache = '';
|
||||
let configHashCache = '';
|
||||
const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
|
||||
|
||||
/**
|
||||
* Reads the container information from the docker socket and updates the nginx config if necessary
|
||||
@@ -51,6 +52,8 @@ async function updateNginxConfig() {
|
||||
// if containers changed -> write config file, reload nginx
|
||||
if (containerHash !== containerHashCache || configHash !== configHashCache) {
|
||||
Logger.log('Generating new NGINX configuration');
|
||||
Logger.log('Waiting for Docker network to settle...');
|
||||
await delay(10_000);
|
||||
|
||||
// render nginx config file
|
||||
const nginxConfig = render(
|
||||
|
||||
Reference in New Issue
Block a user