City-of-Pori / pori-kada

Pori KADAn pohjalla – Kuntien avoin digialusta

Home Page:http://pori-kada-testing.druid.fi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pori project

Environment variables

  • WKV_SITE_ENV - environment name
  • DB_PASS_DRUPAL - database password
  • DB_USER_DRUPAL - database username
  • DB_HOST_DRUPAL - database host
  • DB_NAME_DRUPAL - database name
  • WARDEN_TOKEN - shared security token between the site and Warden server
  • SAML_ADMINPASS - SimpleSAML administration password
  • SAML_SECRETSALT - SimpleSAML salt hash
  • XDEBUG_MODE - Xdebug mode
  • PHP_IDE_CONFIG - Xdebug setting for PhpStorm

SimpleSAML

SimpleSAML config files are copied from drupal/conf/simplesaml to the drupal/vendor/simplesamlphp/simplesamlphp folder by drupal/scripts/composer/ScriptHandler.php > copyConfig function during composer install task.

Local environment

  1. Install the latest Lando and read the documentation.
  2. Check out the repo and go to the project root: git clone git@github.com:City-of-Pori/pori-kada.git pori && cd pori
  3. Run lando start.
  4. Compile the themes with lando compile.
  5. Import data with lando syncdb (staging environment) or lando syncdb prod (production). Register your public key and connect to the required VPN first.
  6. Run lando update to update database, revert the features and enable development modules.

Local sites

Archived production sites

Full commands/tools overview is available by running lando. Custom tools:

  • lando build - build the local site.
  • lando compile - compile the themes.
  • lando npm, lando bower, lando gulp - run frontend commands.
  • lando phpcs, lando phpcbf- use PHP_CodeSniffer:
    • Use Drupal & DrupalPractice standard for selected extensions: lando phpcs --standard=Drupal,DrupalPractice web/sites/all/modules/contrib --extensions=php,inc,module,install
    • Check web/sites/all/modules/custom folder for PHP 8.0 compatibility using PHPCompatibility standard: lando phpcs --standard=PHPCompatibility --extensions=php,inc,module,install --report-full=report_80.txt --runtime-set testVersion 8.0 -ps web/sites/all/modules/custom.
  • lando provision - run provisioning tasks. See the Provisioning section below for the details.
  • lando syncdb <remote> - synchronize local database with selected remote environment. Options: stage (default), prod.
  • lando update - apply required (database) updates.
  • lando xdebug <mode> - load Xdebug in the selected mode(s).

Theming

Themes can be compiled by using lando compile. See also drupal/.lando/node.sh & drupal/web/sites/all/themes/custom/kada/README.md.

Workflow

Note: We use Wunderflow as our git workflow.

All new features must be based on the master branch. All hotfixes must be based on the production branch. The develop branch is used only for testing and must never be merged back to master.

Developer notes

  • Restart Docker Desktop when facing constant COMPOSE_HTTP_TIMEOUT errors during lando rebuild.
  • Show all user's crontabs (run as root): cd /var/spool/cron/ && grep . *.

Provisioning

Perform the following tasks to set up the Lando-based provisioning tool:

  1. create the ansible.vault file and save it with the Ansible vault password (Pori ansible-vault key in LastPass),
  2. run lando rebuild.

Usage: lando provision [-t|s ANSIBLE_TAGS] [ENVIRONMENT].

 -t ANSIBLE_TAGS       Ansible tags to be provisioned.
 -s ANSIBLE_TAGS       Ansible tags to be skipped when provisioning.
    ENVIRONMENT        Environment to be provisioned.

Example of provisioning nginx Ansible tag in a develop environment: lando provision -t nginx develop.

About

Pori KADAn pohjalla – Kuntien avoin digialusta

http://pori-kada-testing.druid.fi

License:Other


Languages

Language:PHP 86.6%Language:SCSS 8.3%Language:JavaScript 3.4%Language:Makefile 0.5%Language:Shell 0.4%Language:Python 0.4%Language:CSS 0.1%Language:Less 0.1%Language:HTML 0.1%Language:Ruby 0.0%