Commit 0e5d6fa0 by chalermpong

fix api

parent 453f6c65
...@@ -58,14 +58,20 @@ app.post('/api/docker/start-compose', (req, res) => { ...@@ -58,14 +58,20 @@ app.post('/api/docker/start-compose', (req, res) => {
const options = { const options = {
Image: image, Image: image,
name: name, name: name,
Env: envVariables,
ExposedPorts: { [`${port}/tcp`]: {} }, ExposedPorts: { [`${port}/tcp`]: {} },
Hostconfig: { Hostconfig: {
PortBindings: { [`${port}/tcp`]: [{ 'HostPort': hostPort }] }, PortBindings: { [`${port}/tcp`]: [{ 'HostPort': hostPort }] },
Binds: binds, Binds: binds,
Env: envVariables,
NetworkMode: network || 'bridge', NetworkMode: network || 'bridge',
LoggingConfig: logging || { 'Driver': 'json-file' } LogConfig: logging || { 'Driver': 'json-file' },
// LogConfig: {
// Config: {
// "max-file": logging.options.max-file,
// "max-size": logging.options.max-size
// },
// Type: logging.driver
// },
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment