mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
run cohort migration on starter / test db
This commit is contained in:
parent
de80b7001c
commit
6c76e7ba65
2 changed files with 5 additions and 4 deletions
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
module.exports = function () {
|
module.exports = function () {
|
||||||
const config = require('../server/config')
|
const config = require('../server/config')
|
||||||
config.load()
|
|
||||||
const log = require('../server/log')
|
const log = require('../server/log')
|
||||||
const settingsController = require('./api/controller/settings')
|
const settingsController = require('./api/controller/settings')
|
||||||
const db = require('./api/models/index')
|
const db = require('./api/models/index')
|
||||||
|
@ -10,7 +9,7 @@ module.exports = function () {
|
||||||
dayjs.extend(timezone)
|
dayjs.extend(timezone)
|
||||||
|
|
||||||
async function start (nuxt) {
|
async function start (nuxt) {
|
||||||
|
config.load()
|
||||||
if (config.status == 'READY') {
|
if (config.status == 'READY') {
|
||||||
await db.initialize()
|
await db.initialize()
|
||||||
} else {
|
} else {
|
||||||
|
@ -20,6 +19,7 @@ module.exports = function () {
|
||||||
dialect: process.env.GANCIO_DB_DIALECT,
|
dialect: process.env.GANCIO_DB_DIALECT,
|
||||||
storage: process.env.GANCIO_DB_STORAGE,
|
storage: process.env.GANCIO_DB_STORAGE,
|
||||||
host: process.env.GANCIO_DB_HOST,
|
host: process.env.GANCIO_DB_HOST,
|
||||||
|
port: process.env.GANCIO_DB_PORT,
|
||||||
database: process.env.GANCIO_DB_DATABASE,
|
database: process.env.GANCIO_DB_DATABASE,
|
||||||
username: process.env.GANCIO_DB_USERNAME,
|
username: process.env.GANCIO_DB_USERNAME,
|
||||||
password: process.env.GANCIO_DB_PASSWORD,
|
password: process.env.GANCIO_DB_PASSWORD,
|
||||||
|
@ -48,12 +48,13 @@ module.exports = function () {
|
||||||
await sequelize.close()
|
await sequelize.close()
|
||||||
process.off('SIGTERM', shutdown)
|
process.off('SIGTERM', shutdown)
|
||||||
process.off('SIGINT', shutdown)
|
process.off('SIGINT', shutdown)
|
||||||
nuxt.close()
|
if (nuxt) {
|
||||||
|
nuxt.close()
|
||||||
|
}
|
||||||
process.exit()
|
process.exit()
|
||||||
}
|
}
|
||||||
process.on('SIGTERM', shutdown)
|
process.on('SIGTERM', shutdown)
|
||||||
process.on('SIGINT', shutdown)
|
process.on('SIGINT', shutdown)
|
||||||
}
|
}
|
||||||
|
|
||||||
return start(this.nuxt)
|
return start(this.nuxt)
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue