updated yaml script

This commit is contained in:
Mishalabdullah
2024-05-05 23:11:53 +05:30
parent f73eadacbb
commit 2222aade5d
2 changed files with 15 additions and 3 deletions

View File

@@ -28,7 +28,19 @@ export async function POST(req) {
try { try {
await executeShellCommand( await executeShellCommand(
`docker exec ${containerName} wget -P /usr/src/app/schemas/ ${fileURL}` `docker exec ${
containerName + "-client"
} wget -P /usr/src/app/schemas/ ${fileURL}`
);
} catch (error) {
console.error(`exec error: ${error}`);
}
try {
await executeShellCommand(
`docker exec ${
containerName + "-network"
} wget -P /usr/src/app/schemas/ ${fileURL}`
); );
return NextResponse.json({ status: 200 }); return NextResponse.json({ status: 200 });
} catch (error) { } catch (error) {

View File

@@ -18,7 +18,7 @@ export default function InstallYaml() {
const [yamlUrl, setYamlUrl] = useState(""); const [yamlUrl, setYamlUrl] = useState("");
const [checked, setChecked] = useState(false); const [checked, setChecked] = useState(false);
const container = checked ? "bpp-network" : "bap-network"; const container = checked ? "bpp" : "bap";
const handleRegistryUrlChange = (event) => { const handleRegistryUrlChange = (event) => {
setYamlUrl(event.target.value); setYamlUrl(event.target.value);