The software in this repository is one of the main deliverables of the DACEM (Digitizing Academic Catalogues for Enhanced Mobility) project. For more information refer to the official project website. There is a prototype DACEM portal you can check to see the working software.
For information about the technical architecture and use cases, refer to the corresponding project report: (DACEM technical architecture for CCs)[https://drive.google.com/drive/folders/19FfG3cMaiXnyzxSkxoJgHIqxz8UqCBb4]
The DACEM software is capable of exposing curricular data (Institution, Organizational Unit, Programme, Course) in OCCAPI v2 format. Refer to the (API documentation)[https://occapi.uni-foundation.eu/specification/v2] for information on available endpoints and a detailed description of the API specification.
The recommended preconfigured local development setup is using DDEV for containerization.
- Install DDEV following the official documentation.
- Clone the repository and enter the created directory.
git clone https://github.com/EuropeanUniversityFoundation/dacem.git - Create DDEV configuration by running
ddev config. - Copy the
.env.examplefile to.env. - The default values in
.envalready match what DDEV expects, so most of them can be left as-is. - Modify / add administrator user information in the
.envfile on the lines starting withACCOUNT_. You might want to use double quotes when setting theACCOUNT_PASSvariable. - Go to the
web/sites/defaultfolder. Copyexample.settings.local.phptosettings.local.phpand review it. - Uncomment the following code block at the end of your
settings.php
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
include $app_root . '/' . $site_path . '/settings.local.php';
}
- Start the DDEV project with
ddev startand take note of the URL where your project will be available. - Run
ddev composer install. - Run
ddev scripts/config_install.sh. This will create the database, install and configure the Drupal site. - Visit the URL output by the command in step 9 to test if the site works as expected. Default URL is
https://dacem.ddev.site
This section covers deploying DACEM to a traditional LAMP stack (Linux, Apache, MySQL/MariaDB, PHP) rather than DDEV. It assumes a dedicated server or VM where you have root/sudo access.
- PHP 8.3 (or the version currently required by
web/core/composer.json— check therequire.phpconstraint after cloning) with the extensions Drupal needs:php-cli,php-common,php-curl,php-gd,php-mbstring,php-mysql,php-xml,php-zip,php-bcmath,php-intl,php-opcache,php-soap. - Apache 2.4 with
mod_rewriteandmod_headersenabled, andAllowOverride Allfor the DACEM vhost (Drupal ships its own.htaccessinweb/.htaccesswhich relies on this). - MySQL 8.0+ or MariaDB 10.6+, with a database and dedicated user created for DACEM.
- Composer 2.x, installed globally (
composer --versionto confirm). - Git, to clone/pull the repository.
- Optionally, Drush is already pulled in as a project dependency (
drush/drushincomposer.json), so no separate global install is needed; it will be available atvendor/bin/drushaftercomposer install.
-
Clone the repository into a location outside the public webroot's document root ancestry, e.g.
/var/www/dacem:git clone https://github.com/EuropeanUniversityFoundation/dacem.git /var/www/dacem cd /var/www/dacemOnly the
web/subdirectory should ever be exposed by Apache — never point the vhost at the repository root. -
Install PHP dependencies for production (no dev dependencies, optimized autoloader). This also provides the local Drush binary the install script relies on:
composer install --no-dev --optimize-autoloader -
Create the database and a dedicated MySQL user:
CREATE DATABASE dacem CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE USER 'dacem'@'localhost' IDENTIFIED BY 'a-strong-password'; GRANT ALL PRIVILEGES ON dacem.* TO 'dacem'@'localhost'; FLUSH PRIVILEGES;
-
Set up
.envon the server, the same way as in local development:- Copy
.env.exampleto.env. - Set
DB_NAME,DB_USER,DB_PASSWORDto match the database created in step 3. - Set
DB_HOSTtolocalhost(or127.0.0.1) — the example value ofdbis DDEV's internal container hostname and will fail to connect on a plain LAMP server. - Set
ACCOUNT_NAME,ACCOUNT_MAIL, andACCOUNT_PASSfor the admin account (leaveACCOUNT_PASSblank to have Drush generate one). - Set
SITE_NAMEandSITE_MAILas appropriate. - Set
ENV_NAME=Production(and comment outENV_NAME=Local), matching the convention already used insettings.local.php.
- Copy
-
Set up
settings.local.php, as in local development: copyweb/sites/default/example.settings.local.phptosettings.local.php, review it for this environment, and confirm the include block at the end ofsettings.php(which is tracked in the repo) is uncommented. -
Make
web/sites/defaultwritable so Drush can generatesettings.phpduring install, then run the install script:chmod 775 web/sites/default ./scripts/config_install.shThe script reads
.env, sourcesvendor/bin/drush, shows you the database and site settings it's about to use, and asks for confirmation before runningdrush site-install --existing-config. This installs Drupal using the configuration already tracked inconfig/sync, then resetsweb/sites/default,settings.php, andsettings.local.phpto sane permissions (0755/0644) automatically — no need to set those manually.For subsequent deployments to an already-installed site, don't re-run this script; use the standard update sequence instead (see "Notes on updates" below).
-
Make sure the public files directory is writable by the web server user (
www-dataon Debian/Ubuntu,apacheon RHEL/CentOS):chown -R www-data:www-data web/sites/default/files -
Configure the Apache virtual host, pointing the document root at
web/:<VirtualHost *:80> ServerName dacem.example.org DocumentRoot /var/www/dacem/web <Directory /var/www/dacem/web> AllowOverride All Require all granted </Directory> </VirtualHost>
Enable the site and reload Apache:
a2ensite dacem.conf systemctl reload apache2 -
Enable HTTPS. Use Certbot (or your certificate provider of choice) to obtain a TLS certificate for the domain and configure Apache to redirect HTTP to HTTPS.
-
Set up a cron job for Drupal's scheduled tasks, running as the web server user or a dedicated deploy user:
*/15 * * * * cd /var/www/dacem && vendor/bin/drush cron > /dev/null 2>&1 -
Set up backups. The repository includes a
backup/folder and ascripts/generate_backup.shscript, with retention controlled by theKEEP_PREVIOUS_*variables in.env. Schedule this via cron as well, and make sure backups are copied off-server. -
Verify the deployment by visiting the configured domain, confirming the site loads over HTTPS, and checking
/admin/reports/status(Drupal's status report) for any outstanding warnings — file system permissions and cron are the two most common issues to double-check after a first LAMP deployment.
This repository will be continouosly maintained installing the latest updates of Drupal core and contributed modules. You can update your own installation by using the commands below. It is recommended to back up your site before any updates.
For subsequent deployments to an already-installed site, don't re-run scripts/config_install.sh — it performs a fresh site-install and will overwrite the site. Instead use the standard update sequence:
git pull
composer install --no-dev --optimize-autoloader
vendor/bin/drush updatedb
vendor/bin/drush config-import
vendor/bin/drush cache-rebuild
Consider putting the site in maintenance mode (drush state:set system.maintenance_mode 1) before running updates on a live site, and taking it out afterward.
Check /admin/reports/status to see a brief site status overview and test your site.