If you'd like a relatively simple way to set up your own development environment so you can contribute to this project, here are some instructions using docker containers.
We have two ways of doing it: via docker-compose or via docker run.
- clone this repo or fork it and clone your fork, install docker (and docker-compose)
- inside the cloned repo directory, run
docker-compose up -d
(this will take a while as it needs to download database and images) - In the Server directory copy
.sample
files to ones without it. And then inconfig.php
, change the following and save:
a - servername:mhct-db
b - username:admin
c - password:admin
(unless you change these, which is more secure)
d - dbname:mhhunthelper
- You should now be able to access server on http://127.0.0.1 or http://localhost on your browser, and connect to database via port 3306 on your localhost or 127.0.0.1, and modify the code on your host machine.
To add other databases uncomment them in docker-compose.yml and run docker-compose up -d
again
docker pull tsitu/mhct-db-docker:latest
(orbavovanachte/mousehunt-jacksdb
)docker run -p 3306:3306 --name mhct-db -d tsitu/mhct-db-docker
(-p 3306:3306
is optional but maps the docker port to your localhost for easy access). This command takes a while, it loads the MHCT dbdocker pull richarvey/nginx-php-fpm:1.8.2
docker run -d -e 'GIT_EMAIL=' -e 'GIT_NAME=Your Name' -e 'GIT_USERNAME=' -e 'GIT_REPO=github.com/mh-community-tools/mh-hunt-helper' -e 'GIT_PERSONAL_TOKEN=Long String' -e 'WEBROOT=/var/www/html/Server' --name mhct richarvey/nginx-php-fpm:1.8.
-- the GIT stuff is part of your account; you may want to make a new personal tokendocker exec -it mhct bash
. This gets you a shell inside. You'll need to edit config.php (which may be in the Server directory).
a - servername is an IP address (docker inspect mhct-db
)
b - username isadmin
c - password isadmin
(unless you change these, which is more secure)
d - dbname ismhhunthelper
- You can access this at
http://IP/
-- IP is found withdocker inspect mhct
.index.php
is attraction rates,loot.php
is drop rates (use the files, 'MHCT Tools' points to agiletravels) NOTE: Only the mhhunthelper stuff is there by default - attractions, drops, some of stats. If you want the other pieces you will have to import the database then supply the credentials.
To add the other databases:
docker run -d --name mhct-converter tsitu/mhct-db-docker:converter
docker run -d --name mhct-maphelper tsitu/mhct-db-docker:maphelper
docker run -d --name mhct-mapspotter tsitu/mhct-db-docker:mapspotter
This will start each database in its own container with its own IP address (use docker inspect
to find it). You will use that IP address in config.php
. Alternatively you can restore each database from its backups into your mhct-db container.