WIP
This commit is contained in:
@@ -24,7 +24,7 @@ export const post: RequestHandler = async (event) => {
|
||||
const { id } = event.params;
|
||||
|
||||
try {
|
||||
await checkHAProxy();
|
||||
// await checkHAProxy();
|
||||
const service = await db.getService({ id, teamId });
|
||||
const {
|
||||
type,
|
||||
@@ -96,16 +96,16 @@ export const post: RequestHandler = async (event) => {
|
||||
}
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
|
||||
await checkProxyConfigurations();
|
||||
await configureSimpleServiceProxyOn({ id, domain, port: consolePort });
|
||||
// await checkProxyConfigurations();
|
||||
// await configureSimpleServiceProxyOn({ id, domain, port: consolePort });
|
||||
await db.updateMinioService({ id, publicPort });
|
||||
await startHttpProxy(destinationDocker, id, publicPort, apiPort);
|
||||
|
||||
if (isHttps) {
|
||||
await letsEncrypt({ domain, id });
|
||||
}
|
||||
await setWwwRedirection(fqdn);
|
||||
await reloadHaproxy(destinationDocker.engine);
|
||||
// if (isHttps) {
|
||||
// await letsEncrypt({ domain, id });
|
||||
// }
|
||||
// await setWwwRedirection(fqdn);
|
||||
// await reloadHaproxy(destinationDocker.engine);
|
||||
return {
|
||||
status: 200
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ export const post: RequestHandler = async (event) => {
|
||||
}
|
||||
try {
|
||||
await stopTcpHttpProxy(destinationDocker, publicPort);
|
||||
await configureSimpleServiceProxyOff(fqdn);
|
||||
// await configureSimpleServiceProxyOff(fqdn);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
@@ -56,14 +56,14 @@ export const post: RequestHandler = async (event) => {
|
||||
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
|
||||
await checkProxyConfigurations();
|
||||
await configureSimpleServiceProxyOn({ id, domain, port: 8080 });
|
||||
// await checkProxyConfigurations();
|
||||
// await configureSimpleServiceProxyOn({ id, domain, port: 8080 });
|
||||
|
||||
if (isHttps) {
|
||||
await letsEncrypt({ domain, id });
|
||||
}
|
||||
await setWwwRedirection(fqdn);
|
||||
await reloadHaproxy(destinationDocker.engine);
|
||||
// if (isHttps) {
|
||||
// await letsEncrypt({ domain, id });
|
||||
// }
|
||||
// await setWwwRedirection(fqdn);
|
||||
// await reloadHaproxy(destinationDocker.engine);
|
||||
return {
|
||||
status: 200
|
||||
};
|
||||
|
||||
@@ -187,14 +187,14 @@ COPY ./init-db.sh /docker-entrypoint-initdb.d/init-db.sh`;
|
||||
await asyncExecShell(
|
||||
`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up --build -d`
|
||||
);
|
||||
await checkProxyConfigurations();
|
||||
await configureSimpleServiceProxyOn({ id, domain, port: 8000 });
|
||||
// await checkProxyConfigurations();
|
||||
// await configureSimpleServiceProxyOn({ id, domain, port: 8000 });
|
||||
|
||||
if (isHttps) {
|
||||
await letsEncrypt({ domain, id });
|
||||
}
|
||||
await setWwwRedirection(fqdn);
|
||||
await reloadHaproxy(destinationDocker.engine);
|
||||
// if (isHttps) {
|
||||
// await letsEncrypt({ domain, id });
|
||||
// }
|
||||
// await setWwwRedirection(fqdn);
|
||||
// await reloadHaproxy(destinationDocker.engine);
|
||||
return {
|
||||
status: 200
|
||||
};
|
||||
|
||||
@@ -74,14 +74,14 @@ export const post: RequestHandler = async (event) => {
|
||||
}
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
|
||||
await checkProxyConfigurations();
|
||||
await configureSimpleServiceProxyOn({ id, domain, port: 80 });
|
||||
// await checkProxyConfigurations();
|
||||
// await configureSimpleServiceProxyOn({ id, domain, port: 80 });
|
||||
|
||||
if (isHttps) {
|
||||
await letsEncrypt({ domain, id });
|
||||
}
|
||||
await setWwwRedirection(fqdn);
|
||||
await reloadHaproxy(destinationDocker.engine);
|
||||
// if (isHttps) {
|
||||
// await letsEncrypt({ domain, id });
|
||||
// }
|
||||
// await setWwwRedirection(fqdn);
|
||||
// await reloadHaproxy(destinationDocker.engine);
|
||||
return {
|
||||
status: 200
|
||||
};
|
||||
|
||||
@@ -84,14 +84,14 @@ export const post: RequestHandler = async (event) => {
|
||||
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
|
||||
await checkProxyConfigurations();
|
||||
await configureSimpleServiceProxyOn({ id, domain, port: 8080 });
|
||||
// await checkProxyConfigurations();
|
||||
// await configureSimpleServiceProxyOn({ id, domain, port: 8080 });
|
||||
|
||||
if (isHttps) {
|
||||
await letsEncrypt({ domain, id });
|
||||
}
|
||||
await setWwwRedirection(fqdn);
|
||||
await reloadHaproxy(destinationDocker.engine);
|
||||
// if (isHttps) {
|
||||
// await letsEncrypt({ domain, id });
|
||||
// }
|
||||
// await setWwwRedirection(fqdn);
|
||||
// await reloadHaproxy(destinationDocker.engine);
|
||||
return {
|
||||
status: 200
|
||||
};
|
||||
|
||||
@@ -121,14 +121,14 @@ export const post: RequestHandler = async (event) => {
|
||||
|
||||
try {
|
||||
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
|
||||
await checkProxyConfigurations();
|
||||
await configureSimpleServiceProxyOn({ id, domain, port: 80 });
|
||||
// await checkProxyConfigurations();
|
||||
// await configureSimpleServiceProxyOn({ id, domain, port: 80 });
|
||||
|
||||
if (isHttps) {
|
||||
await letsEncrypt({ domain, id });
|
||||
}
|
||||
await setWwwRedirection(fqdn);
|
||||
await reloadHaproxy(destinationDocker.engine);
|
||||
// if (isHttps) {
|
||||
// await letsEncrypt({ domain, id });
|
||||
// }
|
||||
// await setWwwRedirection(fqdn);
|
||||
// await reloadHaproxy(destinationDocker.engine);
|
||||
return {
|
||||
status: 200
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user