fix: volume name
This commit is contained in:
parent
acacef95cd
commit
c084b22815
@ -38,11 +38,18 @@ export const post: RequestHandler = async (event) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
volumes: {
|
volumes: {
|
||||||
[`${id}-ngrams`]: {}
|
[`${id}-ngrams`]: {
|
||||||
|
external: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const composeFileDestination = `${workdir}/docker-compose.yaml`;
|
const composeFileDestination = `${workdir}/docker-compose.yaml`;
|
||||||
await fs.writeFile(composeFileDestination, yaml.dump(composeFile));
|
await fs.writeFile(composeFileDestination, yaml.dump(composeFile));
|
||||||
|
try {
|
||||||
|
await asyncExecShell(`DOCKER_HOST=${host} docker volume create ${id}-ngrams`);
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
|
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user