Fully tested the remote database
Added default host for the admin account
This commit is contained in:
@@ -7,7 +7,7 @@ The primary technology involved is:
|
||||
* React
|
||||
* Nodejs
|
||||
* MariaDB (with Sequelize)
|
||||
* Docker (with docker-compose)
|
||||
* Docker (with docker compose)
|
||||
|
||||
This template is designed to support the development of persistent browser based games (PBBGs), but it, and it's component microservices, can be used elsewhere.
|
||||
|
||||
@@ -31,7 +31,7 @@ A clean install is this easy:
|
||||
git clone https://github.com/krgamestudios/MERN-template.git
|
||||
cd MERN-template
|
||||
node configure-script.js
|
||||
docker-compose up --build
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
# Setup Development
|
||||
|
||||
@@ -170,11 +170,14 @@ See https://github.com/krgamestudios/MERN-template/wiki for help.
|
||||
|
||||
//MUST be at least 8 chars
|
||||
let tmpPass = '';
|
||||
let tmpHost = '';
|
||||
while (defaultUser && tmpPass.length < 8) {
|
||||
console.log('--All passwords must be at least 8 characters long--');
|
||||
tmpPass = await question('Default Admin Pass', '');
|
||||
tmpHost = await question('Default Admin Host', '');
|
||||
}
|
||||
const defaultPass = tmpPass;
|
||||
const defaultHost = tmpHost;
|
||||
|
||||
if (defaultUser) {
|
||||
console.log(`Default user email will be: ${defaultUser}@${authWebAddress}`);
|
||||
@@ -281,6 +284,7 @@ services:
|
||||
- MAIL_PASSWORD=${emailPass}
|
||||
- MAIL_PHYSICAL=${emailPhysical}
|
||||
- ADMIN_DEFAULT_USERNAME=${defaultUser}
|
||||
- ADMIN_DEFAULT_HOSTNAME=${defaultHost}
|
||||
- ADMIN_DEFAULT_PASSWORD=${defaultPass}
|
||||
- SECRET_ACCESS=${accessToken}
|
||||
- SECRET_REFRESH=${refreshToken}
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
#This file only needs to be run once, during initial development setup
|
||||
#This file isnt needed for actual deployment
|
||||
|
||||
#Create the development database
|
||||
CREATE DATABASE IF NOT EXISTS template;
|
||||
USE template;
|
||||
|
||||
#Create the database user
|
||||
CREATE USER IF NOT EXISTS 'template'@'%' IDENTIFIED BY 'pikachu';
|
||||
#use this while debugging
|
||||
CREATE DATABASE template;
|
||||
CREATE USER 'template'@'%' IDENTIFIED BY 'pikachu';
|
||||
GRANT ALL PRIVILEGES ON template.* TO 'template'@'%';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user