Fixex the deployment issues, read more

The deployment issues were caused by sequelize running out-of-order.
I fixed this by placing sequelize.sync() in correct locations.

I've also updated news-server with these changes.

I've also removed mariadb stuff from the game server's Dockerfile.

Resolved #1
This commit is contained in:
2021-03-03 23:32:27 +00:00
parent b0ac371a43
commit 488f975e98
4 changed files with 14 additions and 7 deletions
+4 -1
View File
@@ -1,9 +1,12 @@
//DOCS: this whole file is just a big bugfix
//DOCS: ensure that there is at least one administration account
const bcrypt = require('bcryptjs');
const sequelize = require('../database');
const { accounts } = require('../database/models');
const defaultAdminAccount = async () => {
await sequelize.sync(); //this whole file is just one big BUGFIX
const admin = await accounts.findOne({
where: {
privilege: 'administrator'
@@ -22,4 +25,4 @@ const defaultAdminAccount = async () => {
}
};
module.exports = defaultAdminAccount;
module.exports = defaultAdminAccount;