Step Two Configure Env

Once you have pulled in the most recent code changes to the stariumxcv.dev Git repo, you can now add the authentication credentials to the stariumxcv.dev/functions/.env.php file.


DO NOT, UNDER ANY CIRCUMSTANCES, COMMIT THE .env.php FILE THAT WE ARE ABOUT TO CONFIGURE TO THE GIT REPO.


One thing to note before we do this: if you do not configure the .env.php file, the game will fall back to using your local database instead. This also means that if, for whatever reason, you want to stop using the remote database, you can simply rename the .env.php to something else (such as .env.php.backup).


!!! IMPORTANT !!!

PLEASE READ:

DO NOT, UNDER ANY CIRCUMSTANCES, COMMIT .env.php, .env.php.backup, OR ANY OTHER COPY OF .env.php TO THE GIT REPO.

This does not apply to .env.php.template.


  1. To configure the .env.php file, first you will need to copy stariumxcv.dev/functions/.env.php.template and rename it to .env.php. This template file already contains most of the configuration settings needed for connecting to the remote database.
  2. To fill in the missing DB_PASSWORD and DB_HOST variables you must login to the LastPass vault and find the test database site in the Shared-Developers folder.
    • If you do not have access to LastPass, you can message dave on discord for the authentication credentials you need.
  3. Open the site and copy the password.
  4. Paste the password from LastPass into the $DB_PASSWORD = "xxxxx"; variable.
  5. Go back to LastPass and copy the hostname from the notes into the $DB_HOST = "xxxxx"; variable.
  6. Save the file as stairumxcv.dev/functions/.env.php.

After this, your .env.php should look like this:

<?php
// UNDER NO CIRCUMSTANCES SHOULD ".env.php" (OR ANY COPY OF IT) BE COMITTED TO THE GIT REPO

$DB_USER = "root";
$DB_PASSWORD = "PASSWORD YOU COPIED FROM LASTPASS GOES HERE";
$DB_HOST = "HOSTNAME YOU COPIED FROM LASTPASS GOES HERE";

$DB_NAME_ACCOUNTS = "stariumx_gwythdarian_accounts";
$DB_NAME_EMAILS = "stariumx_gwythdarian_emails";
$DB_NAME_MASTER = "stariumx_master";
$DB_NAME_GAME = "stariumx_game";

$STARIUMXCV_PRODUCTION = false;

Finally, open up localhost/stairumxcv.dev/public_html/ and verify that you are able to login and create a position.