The MOT is built on Drupal. You need to have PHP and composer installed. PHP 8.4 is not supported, make sure to install stable PHP 8.3.
git clone <repo-url> mot
cd motcomposer installIf you encounter installation errors, please be sure the following PHP extensions are enabled in your php.ini file: gd, zip, pdo_sqlite.
The production environment uses an external database which requires special settings but for development purposes you can simply use the built-in default Drupal sql.lite setup which is enough to test code changes locally.
Here are some simple steps to get you started:
Create an empty .env file:
touch .envStart MOT:
php web/core/scripts/drupal quick-startA browser window should open with the MOT website, you can find the login credentials in the output for the above command. The database is empty though.
IMPORTANT NOTE: When submitting PRs from this setup be careful not to include the web/sites/default/settings.php file.
Once MOT is up & running, run this command to populate the database with models.
vendor/bin/drush scr scripts/sync_models.phpDefine these environment variables in the .env file:
DB_HOST=
DB_USER=
DB_PASS=
DB_NAME=
DB_PORT=
HASH_SALT=
TRUSTED_HOST=
DB_HOST: The hostname or IP address of your database server.DB_USER: The username for your database.DB_PASS: The password for your database user.DB_NAME: The name of your database.DB_PORT: The port number your database server is listening on (default is usually3306for MySQL).HASH_SALT: A unique, random string used for securing passwords and other sensitive data in Drupal. This should be a long and complex string.TRUSTED_HOST: The host used to access the MOT; e.g.mot\.isitopen\.ai
Copy the default settings file:
cp ./web/sites/default/mot.settings.php ./web/sites/default/settings.php
Update settings.php to reflect your environment if needed.
Ensure the document root is pointed to the mot/web directory.
Below is an example of what an Apache virtual host configuration may look like:
<VirtualHost *:80>
ServerName mot.local
DocumentRoot /path/to/your/repo/mot/web
<Directory /path/to/your/repo/mot/web>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/mot-error.log
CustomLog ${APACHE_LOG_DIR}/mot-access.log combined
</VirtualHost>
Visit the site in your browser (e.g., http://mot.local) to complete the MOT installation process.
Follow the on-screen instructions.