mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-29 20:52:10 +00:00
feat: docker compose
This commit is contained in:
@@ -14,8 +14,9 @@
|
||||
export let foundConfig: any;
|
||||
export let scanning: any;
|
||||
export let packageManager: any;
|
||||
export let dockerComposeFile: any = null;
|
||||
export let dockerComposeFile: string | null = null;
|
||||
export let dockerComposeFileLocation: string | null = null;
|
||||
export let dockerComposeConfiguration: any = null;
|
||||
|
||||
async function handleSubmit(name: string) {
|
||||
try {
|
||||
@@ -27,11 +28,19 @@
|
||||
delete tempBuildPack.fancyName;
|
||||
delete tempBuildPack.color;
|
||||
delete tempBuildPack.hoverColor;
|
||||
let composeConfiguration: any = {}
|
||||
if (!dockerComposeConfiguration && dockerComposeFile) {
|
||||
for (const [name, _] of Object.entries(JSON.parse(dockerComposeFile).services)) {
|
||||
composeConfiguration[name] = {};
|
||||
}
|
||||
|
||||
}
|
||||
await post(`/applications/${id}`, {
|
||||
...tempBuildPack,
|
||||
buildPack: name,
|
||||
dockerComposeFile,
|
||||
dockerComposeFileLocation
|
||||
dockerComposeFileLocation,
|
||||
dockerComposeConfiguration: JSON.stringify(composeConfiguration) || JSON.stringify({})
|
||||
});
|
||||
await post(`/applications/${id}/configuration/buildpack`, { buildPack: name });
|
||||
return await goto(from || `/applications/${id}`);
|
||||
|
||||
Reference in New Issue
Block a user