v1.0.10 (#39)
Fixes: - Default Nuxt port changed to 3000 (thanks to @yurgeman). - Cleanup old images effectively. - More attempts on container startups (3->6). - Always clean up server logs on restart/redeploy.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
const Deployment = require('../../../../models/Deployment')
|
||||
const ApplicationLog = require('../../../../models/Logs/Application')
|
||||
const { verifyUserId, cleanupTmp } = require('../../../../libs/common')
|
||||
const { purgeImagesContainers } = require('../../../../libs/applications/cleanup')
|
||||
const { queueAndBuild } = require('../../../../libs/applications')
|
||||
const { setDefaultConfiguration, precheckDeployment } = require('../../../../libs/applications/configuration')
|
||||
const { docker } = require('../../../../libs/docker')
|
||||
@@ -55,12 +56,14 @@ module.exports = async function (fastify) {
|
||||
await Deployment.findOneAndUpdate(
|
||||
{ repoId: id, branch, deployId, organization, name, domain },
|
||||
{ repoId: id, branch, deployId, organization, name, domain, progress: 'failed' })
|
||||
cleanupTmp(configuration.general.workdir)
|
||||
if (error.name) {
|
||||
if (error.message && error.stack) await saveServerLog(error)
|
||||
if (reply.sent) await new ApplicationLog({ repoId: id, branch, deployId, event: `[ERROR 😖]: ${error.stack}` }).save()
|
||||
}
|
||||
throw new Error(error)
|
||||
} finally {
|
||||
cleanupTmp(configuration.general.workdir)
|
||||
await purgeImagesContainers(configuration)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user