WKV_SITE_ENV
- environment nameDB_PASS_DRUPAL
- database passwordDB_USER_DRUPAL
- database usernameDB_HOST_DRUPAL
- database hostDB_NAME_DRUPAL
- database nameWARDEN_TOKEN
- shared security token between the site and Warden serverSAML_ADMINPASS
- SimpleSAML administration passwordSAML_SECRETSALT
- SimpleSAML salt hashXDEBUG_MODE
- Xdebug modePHP_IDE_CONFIG
- Xdebug setting for PhpStorm
- Login path: https://pori.fi/login_ad
- Admin path: https://pori.fi/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.
- Install the latest Lando and read the documentation.
- Check out the repo and go to the project root:
git clone git@github.com:City-of-Pori/pori-kada.git pori && cd pori
- Run
lando start
. - Compile the themes with
lando compile
. - Import data with
lando syncdb
(staging environment) orlando syncdb prod
(production). Register your public key and connect to the required VPN first. - Run
lando update
to update database, revert the features and enable development modules.
- http://pori-adminer.lndo.site - Adminer for database management, log in without entering the credentials.
- http://pori-mail.lndo.site - MailHog for mail management.
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
.
- Use Drupal & DrupalPractice standard for selected extensions:
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).
Themes can be compiled by using lando compile
. See also drupal/.lando/node.sh
& drupal/web/sites/all/themes/custom/kada/README.md.
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.
- Restart Docker Desktop when facing constant
COMPOSE_HTTP_TIMEOUT
errors duringlando rebuild
. - Show all user's crontabs (run as
root
):cd /var/spool/cron/ && grep . *
.
Perform the following tasks to set up the Lando-based provisioning tool:
- create the
ansible.vault
file and save it with the Ansible vault password (Pori ansible-vault key
in LastPass), - 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
.