LotGD Dragonprime 1.1.2 Docker Edition

Versions of LotGD will be put here for download
Post Reply
User avatar
Kizaing
Site Admin
Posts: 30
Joined: November 22nd, 2018, 12:40 am
Location: Canada
Contact:

LotGD Dragonprime 1.1.2 Docker Edition

Post by Kizaing »

Hey guys I've been working on this for a while. It can be tricky to get the game running these days, especially if you don't have a ton of web hosting knowledge. So I made this preconfigured Docker image!

There is a readme included in the archive, but some instructions:

1. Install docker and docker compose (I won't go into how to do that, but there are lots of resources online)
2. Unzip the archive
3. Make any edits to the docker-compose.yaml file that you may want to do, but it's set up for quick default settings
4. run docker-compose up -d
5. go to http://localhost:4040 (or whatever port you specified) in your browser
6. Go through the LotGD installation and use the following MySQL connection info:

Code: Select all

Address: lotgd-db
Username: root
Password: lotgd
Database: lotgd
7. You'll get a message informing you the database does not exist, simply click the button to create it
8. Create your admin account
9. Login and enjoy!
10. (Optional) Use the included files to fix the Riddle and Drinks modules since they will not install correctly

And that's it! Quick and easy GD server

I haven't tested this extensively, but if there are any ways you think I could improve or any bugs let me know!

Github with Dockerfiles here: https://github.com/Kizaing/LotGDocker

LotGDocker.zip
(989.09 KiB) Downloaded 35 times

TreadNot
Posts: 4
Joined: September 7th, 2020, 10:55 pm
Location: Cincinnati, Ohio, USA

Re: LotGD Dragonprime 1.1.2 Docker Edition

Post by TreadNot »

I'm not sure if this is a bug with the docker setup or the source code, but after deploying, the "Create a character" option does not work. (No row is created in the account table) I wasn't able to get any error message, but when I pull the code from the create.php page and build out the insert SQL statement, there are quite a few fields that "do not have default values". If I manually run the insert statement with all of the fields that the db complained about, it works and I can see the user in the editor. Once the password is reset and encoded, I can login and continue the user setup.

Here is the SQL statement as I filled it out. I added all of the fields after "regdate"

INSERT INTO accounts
(name, superuser, title, password, sex, login, laston, uniqueid, lastip, gold, emailaddress, emailvalidation, referer, regdate, specialty, badguy, companions, allowednavs, specialinc,specialmisc, bufflist, dragonpoints, prefs, hauntedby, donationconfig, bio,ctitle)
VALUES
('MyUser', '1', 'MyTitle', 'MyPassword', 1, 'MyUser', NOW(), ' ', '192.168.0.1', 50, 'MyEmail@me.com', ' ', 0, NOW(), ' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ');

TreadNot
Posts: 4
Joined: September 7th, 2020, 10:55 pm
Location: Cincinnati, Ohio, USA

Re: LotGD Dragonprime 1.1.2 Docker Edition

Post by TreadNot »

I'm assuming it's just the DB configuration in the template. I updated the create.php page and it seems to be working just fine now.

$sql = "INSERT INTO " . db_prefix("accounts") . "
(name, superuser, title, password, sex, login, laston, uniqueid, lastip, gold, emailaddress, emailvalidation, referer, regdate, specialty, badguy, companions, allowednavs, specialinc, specialmisc, bufflist, dragonpoints, prefs, hauntedby, donationconfig, bio, ctitle)
VALUES
('$title $shortname', '".getsetting("defaultsuperuser",0)."', '$title', '$dbpass', '$sex', '$shortname', '".date("Y-m-d H:i:s",strtotime("-1 day"))."', '".$_COOKIE['lgi']."', '".$_SERVER['REMOTE_ADDR']."', ".getsetting("newplayerstartgold",50).", '$email', '$emailverification', '$referer', NOW(), ' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ')";

User avatar
Kizaing
Site Admin
Posts: 30
Joined: November 22nd, 2018, 12:40 am
Location: Canada
Contact:

Re: LotGD Dragonprime 1.1.2 Docker Edition

Post by Kizaing »

Ah yeah you're right, there are some database issues, thanks for catching that. I'm gonna try redoing the database container, see if I can get it working right

User avatar
Kizaing
Site Admin
Posts: 30
Joined: November 22nd, 2018, 12:40 am
Location: Canada
Contact:

Re: LotGD Dragonprime 1.1.2 Docker Edition

Post by Kizaing »

Alright I fixed up the database container, I changed it from mariadb to mysql 5.6 and I did test some stuff and character creation works fine now :)

TreadNot
Posts: 4
Joined: September 7th, 2020, 10:55 pm
Location: Cincinnati, Ohio, USA

Re: LotGD Dragonprime 1.1.2 Docker Edition

Post by TreadNot »

Thanks! I'll revert my code and give it a try!

Post Reply