Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
RunOnFluxBot committed Jan 29, 2025
1 parent a2f541c commit eaa14eb
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions services/dockerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,25 @@ async function appDockerCreate(appSpecifications, appName, isComponent, fullAppS
adjustedCommands.push(command);
}
});

const isRemoteLog = envParams?.some((env) => env.startsWith('LOG=SYSLOG'));
const logConfig = isRemoteLog
? {
Type: 'syslog',
Config: {
'syslog-address': `udp://${appSpecifications.name}:514`,
'syslog-facility': 'local0',
tag: identifier,
},
}
: {
Type: 'json-file',
Config: {
'max-file': '1',
'max-size': '20m',
},
};

const options = {
Image: appSpecifications.repotag,
name: getAppIdentifier(identifier),
Expand Down Expand Up @@ -676,13 +695,7 @@ async function appDockerCreate(appSpecifications, appName, isComponent, fullAppS
Name: restartPolicy,
},
NetworkMode: `fluxDockerNetwork_${appName}`,
LogConfig: {
Type: 'json-file',
Config: {
'max-file': '1',
'max-size': '20m',
},
},
LogConfig: logConfig,
ExtraHosts: [`fluxnode.service:${config.server.fluxNodeServiceAddress}`],
},
};
Expand Down

0 comments on commit eaa14eb

Please sign in to comment.