-
Notifications
You must be signed in to change notification settings - Fork 15
Installation
WARNING: this Daenerys edition of Legend of the Green Dragon is not ready for a production release. If you're looking for code that will support real users, you'll have to download the legacy core (v1.1.2) from DragonPrime.net.
The Daenerys edition requires PHP 7.1 or higher and Composer to manage PHP dependencies.
Note: these instructions, as written, only support UNIX-style hosts.
Note: much of this can be simplified if someone creates a DigitalOcean droplet: #105.
To use Composer, PHP's defacto package manager, you need a Github token to avoid the download limits imposed by github.com:
- If you don't have a Github account, create one at https://github.com.
- Go to https://github.com/settings/tokens and login if needed.
- Click on Personal Access Tokens in the menu on the left.
- Click Generate New Token, name your token something you'll remember and click Generate token at the bottom. No need to check any boxes, in fact it's better you don't.
- Take the resulting hex string and run
composer config -g github-oauth.github.com <authtoken>
At this point, the best version of Daenerys to install is the core+crate+graphql
version. This will provide you
composer init -n --name vendor/site-name --repository=https://code.lot.gd
What does this do?
-
composer
is PHP's defacto package manager, and LotGD uses it to manage core/crate/module installations and dependencies. -
init
tells Composer to create a new project in the current directory. This will produce acomposer.json
file with the configuration parameters provided by the rest of the command line. -
-n
tells Composer to use default settings and not ask the user for any responses. -
--name vendor/site-name
specifies the name of the project you're creating. In Composer, all projects have a name that takes this/
-delimited form. Think aboutvendor
being your company or username, andsite-name
being some name for this project, like the name of the site you're creating. If you plan to store this project on github (recommended) then use your github username as thevendor
. -
--repository=https://code.lot.gd
tells Composer to find LotGD related code at our web repository.
Now you're ready to install the core and the crate code, again using composer:
composer require lotgd/core v0.3.2-alpha
composer require lotgd/crate-graphql v0.3.1-alpha
For current development purposes, we've just been using a plan sqlite database in a file, instead of a real database service. You can change the database connection configuration in config/lotgd.yml
under the database
section.
See the section on generating and setting a Github token.