Skip to content

Commit

Permalink
Fix ssl sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Dec 8, 2023
1 parent 911ca43 commit e5c40b9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "domcloud-bridge",
"version": "0.34.1",
"version": "0.34.2",
"description": "Deployment runner for DOM Cloud",
"main": "app.js",
"engines": {
Expand Down
6 changes: 6 additions & 0 deletions src/executor/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,12 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec,
changed = true;
}
if (regenerateSsl || (!expectedSslMode && !sharedSSL && !selfSignSsl)) {
if (domaindata['SSL shared with']) {
await writeLog("$> Breaking ssl cert sharing with the global domain");
await virtExec("modify-web", {
'break-ssl-cert': true,
});
}
await writeLog("$> Generating ssl cert with let's encrypt");
await spawnSudoUtil('OPENSSL_CLEAN');
await virtExec("generate-letsencrypt-cert", {
Expand Down
9 changes: 3 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ app.use(function (err, req, res, next) {
res.json(err);
});
const port = process.env.PORT ? parseInt(process.env.PORT) : 2223;
app.listen(port);
app.listen(port, function () {
console.log(`Listening on ${port}`);
})

console.log(`Starting main node on ${port}`);

const cleanUpServer = (code) => {
console.log(`Exiting main node ${port} with code ${code}`);
};

0 comments on commit e5c40b9

Please sign in to comment.