Installation ============= .. note:: `DKAN DDEV Add-on `_ is a project containing commands and tools that `CivicActions `_ uses for our own implementations and deployments. For either working on a project locally or working on the core DKAN software and libraries, using a standardized, `docker `_-based local environment is recommended. - `Installing Composer `_ - `Installing Docker `_ - `Installing DDEV `_ Using `DDEV `_ with the `DKAN DDEV Add-on `_ command-line utility will work on Mac, Linux, or Windows to create containers for the various services needed by DKAN. This will ensure you have the same setup as DKAN's core developers, and that your environment is very close to that of our continuous integration tools. Requirements ------------ DKAN is based on `Drupal software `_ and -- generally -- runs anywhere Drupal is supported. For the most common setup, we recommend: - Drupal 10+ - MySQL: minimum version 5.7.8+ with PDO - PHP: minimum version 8.1 - Apache: minimum version 2.4.7 - Drush: minimum version 11.x. - Node: minimum version 18 (if using the decoupled frontend) Starting a new DKAN project --------------------------- Follow the instructions from the **DKAN DDEV Add-on** documentation: `Starting a new project `_ to generate a new Drupal site with DKAN installed on your system. DKAN DDEV Add-on bases new projects off of a `composer project `_ that you can also use to start a project using your own toolset: .. prompt:: bash $ composer create-project getdkan/recommended-project my-project Or simply create a project however you prefer and add a requirement for `getdkan/dkan`. .. warning:: Do note that a bug in Drupal core cron may cause problems with data imports, and applying `this patch `_ is highly recommended. The patch will be applied automatically if you use the `recommended project `_. Adding DKAN into an existing project ---------------------------------------- If you already have an existing Drupal site, install DKAN with `composer `_. You can find the `latest DKAN release here `_. Composer will download the module and all of the dependencies it requires for the backend. .. prompt:: bash $ composer require 'getdkan/dkan' drush en dkan To start with some example datasets: .. prompt:: bash $ drush en sample_content -y drush dkan:sample-content:create drush cron If you have trouble with generating the sample content, check the :doc:`Troubleshooting <../user-guide/guide_dataset>` section in the user guide. .. note:: Current DKAN development is utilizing a :ref:`decoupled frontend `. To use Drupal's theme system, there is a dataset twig template available in the metastore module. However, views integration is a roadmap epic with no target date as of yet.