mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-24 21:39:36 +02:00
Pushed version 1.6.9
This commit is contained in:
parent
65a33f16fd
commit
63346f7e38
5 changed files with 16 additions and 23 deletions
|
@ -66,18 +66,22 @@ exports.getApps = asyncWrapper(async (req, res, next) => {
|
|||
let containers = null;
|
||||
|
||||
const host = await Config.findOne({
|
||||
where: { key: 'dockerHost' }
|
||||
where: { key: 'dockerHost' },
|
||||
});
|
||||
|
||||
try {
|
||||
if(host.value.includes('localhost')) {
|
||||
let { data } = await axios.get(`http://${host.value}/containers/json?{"status":["running"]}`,
|
||||
{
|
||||
socketPath: '/var/run/docker.sock'
|
||||
});
|
||||
if (host.value.includes('localhost')) {
|
||||
let { data } = await axios.get(
|
||||
`http://${host.value}/containers/json?{"status":["running"]}`,
|
||||
{
|
||||
socketPath: '/var/run/docker.sock',
|
||||
}
|
||||
);
|
||||
containers = data;
|
||||
} else {
|
||||
let { data } = await axios.get(`http://${host.value}/containers/json?{"status":["running"]}`);
|
||||
let { data } = await axios.get(
|
||||
`http://${host.value}/containers/json?{"status":["running"]}`
|
||||
);
|
||||
containers = data;
|
||||
}
|
||||
} catch {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue