fix: tmpdir structure
This commit is contained in:
parent
6ad2abd18c
commit
371076b38e
|
@ -46,7 +46,7 @@ export default async (flecks, key, config) => {
|
|||
...Object.entries(config.ports)
|
||||
.map(([host, container]) => ['-p', `${host}:${container}`]).flat(),
|
||||
];
|
||||
const datadir = join(tmpdir(), 'flecks', id, key, 'docker');
|
||||
const datadir = join(tmpdir(), 'flecks', id, 'docker', key);
|
||||
debug("creating datadir '%s'", datadir);
|
||||
try {
|
||||
await mkdir(datadir, {recursive: true});
|
||||
|
|
|
@ -52,14 +52,14 @@ export async function createReplServer(flecks) {
|
|||
});
|
||||
});
|
||||
try {
|
||||
await mkdir(join(tmpdir(), 'flecks', 'repl'));
|
||||
await mkdir(join(tmpdir(), 'flecks', id, 'repl'));
|
||||
}
|
||||
catch (error) {
|
||||
if ('EEXIST' !== error.code) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
const socket = join(tmpdir(), 'flecks', 'repl', `${id}-${Date.now()}.sock`);
|
||||
const socket = join(tmpdir(), 'flecks', id, 'repl', `${id}-${Date.now()}.sock`);
|
||||
flecks.set('$flecks/repl.socket', socket);
|
||||
await new Promise((resolve) => netServer.listen(socket, resolve));
|
||||
debug('listening @ %s', socket);
|
||||
|
|
Loading…
Reference in New Issue
Block a user