Update launch_progress.js
This commit is contained in:
@@ -653,13 +653,13 @@ async function createProxyHost(domains, port, sslCertificateId) {
|
|||||||
forward_scheme: 'http',
|
forward_scheme: 'http',
|
||||||
forward_host: '192.168.68.124',
|
forward_host: '192.168.68.124',
|
||||||
forward_port: parseInt(port),
|
forward_port: parseInt(port),
|
||||||
ssl_forced: true,
|
ssl_forced: false,
|
||||||
caching_enabled: true,
|
caching_enabled: true,
|
||||||
block_exploits: true,
|
block_exploits: true,
|
||||||
allow_websocket_upgrade: true,
|
allow_websocket_upgrade: true,
|
||||||
http2_support: true,
|
http2_support: false,
|
||||||
hsts_enabled: true,
|
hsts_enabled: false,
|
||||||
hsts_subdomains: true,
|
hsts_subdomains: false,
|
||||||
certificate_id: sslCertificateId,
|
certificate_id: sslCertificateId,
|
||||||
meta: {
|
meta: {
|
||||||
letsencrypt_agree: true,
|
letsencrypt_agree: true,
|
||||||
@@ -1061,6 +1061,9 @@ async function downloadDockerCompose(repo, branch) {
|
|||||||
// Add new function to deploy stack
|
// Add new function to deploy stack
|
||||||
async function deployStack(dockerComposeContent, stackName, port) {
|
async function deployStack(dockerComposeContent, stackName, port) {
|
||||||
try {
|
try {
|
||||||
|
const controller = new AbortController();
|
||||||
|
const timeoutId = setTimeout(() => controller.abort(), 10 * 60 * 1000); // 10 minutes timeout
|
||||||
|
|
||||||
const response = await fetch('/api/admin/deploy-stack', {
|
const response = await fetch('/api/admin/deploy-stack', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@@ -1080,9 +1083,12 @@ async function deployStack(dockerComposeContent, stackName, port) {
|
|||||||
value: 'false'
|
value: 'false'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
}),
|
||||||
|
signal: controller.signal
|
||||||
});
|
});
|
||||||
|
|
||||||
|
clearTimeout(timeoutId); // Clear the timeout if the request completes
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
const error = await response.json();
|
const error = await response.json();
|
||||||
throw new Error(error.error || 'Failed to deploy stack');
|
throw new Error(error.error || 'Failed to deploy stack');
|
||||||
|
|||||||
Reference in New Issue
Block a user