Files
coolify/api/routes/v1/upgrade/index.js
Andras Bacsai b91bfa21b3 v1.0.2 (#8)
- Fix restart_policy in Service config.
- Tweaked the upgrade process a bit.
- Refactor and cosmetic surgery here and there.
- Track Service config changes and allow redeploy if it changes.
2021-03-30 21:49:46 +02:00

13 lines
548 B
JavaScript

const { execShellAsync } = require('../../../libs/common')
const { saveServerLog } = require('../../../libs/logging')
module.exports = async function (fastify) {
fastify.get('/', async (request, reply) => {
const upgradeP1 = await execShellAsync('bash ./upgrade.sh upgrade-p1')
await saveServerLog({ event: upgradeP1, type: 'UPGRADE-P-1' })
reply.code(200).send('I\'m trying, okay?')
const upgradeP2 = await execShellAsync('bash ./upgrade.sh upgrade-p2')
await saveServerLog({ event: upgradeP2, type: 'UPGRADE-P-2' })
})
}