-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a docker-compose configuration #22
base: main
Are you sure you want to change the base?
Conversation
Already using mysql2 in smtp.js and this supports newer auth Without this, I was seeing an error: (POP3) Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
@@ -264,6 +264,20 @@ public function verifySignupRequest($id, $key) { | |||
|
|||
public function completeSignupAction($id, $key, $reonEmail, $password, $passwordConfirm) { | |||
$email = self::$instance->verifySignupRequest($id, $key); | |||
|
|||
$result = self::$instance->createUser($email, $reonEmail, $password, $passwodConfirm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the parts specific to creating a user to a function called createUser
so I can call from a script
@@ -273,14 +287,10 @@ public function completeSignupAction($id, $key, $reonEmail, $password, $password | |||
$dion_ppp_id = self::$instance->generatePPPId(); | |||
$log_in_password = self::$instance->generateLogInPassword(); | |||
$db = DBUtil::getInstance()->getDB(); | |||
$stmt = $db->prepare("insert into sys_users (email, password, dion_ppp_id, dion_email_local, log_in_password) values (?)"); | |||
$stmt = $db->prepare("insert into sys_users (email, password, dion_ppp_id, dion_email_local, log_in_password, money_spent) values (?, ?, ?, ?, ?, 0)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bug I ran into, the params were missing in the values()
. Also the money column does not have a default so it's now specified here.
@@ -1,5 +1,5 @@ | |||
const net = require("net"); | |||
const mysql = require("mysql"); | |||
const mysql = require("mysql2"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran into some errors about unsupported authentication when using mysql
. I dropped in mysql2
which was already used in smtp.js
and it worked great.
- MYSQL_ROOT_PASSWORD=password | ||
- MYSQL_USER=reon | ||
- MYSQL_PASSWORD=password | ||
- MYSQL_DATABASE=db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on something to move these out. Most docker setups use a .env
file, I'd like to look into using that and possibly creating a config.json
from the values in .env
or removing config.json
. Ideally there's just one configuration file.
I refactored my docker branch on top of yours, and ended up making a few changes
|
Oh, you'll probably notice that the Crystal Trade Corner application is not included in the cron jobs. I'm not sure why it's still in the repo, but it was replaced by the Pokemon Exchange quite a while ago, so you can remove it from your list. |
Awesome! Commenting to show I have seen this and briefly looked it over. I should have some time later today, or possibly tomorrow to play around with this. |
This is functional, but still a work in progress.
Features:
Email
The REON web service is configured to use sendmail, and it will emit emails. However getting deliverable with SPF and DKIM can be quite complicated. Even more so if this is running on Home computer. For that reason a simple script is included to create an account without using the email flow.