retopais Drupal Distribution
- Docker
- [Ahoy] (https://github.com/ahoy-cli/ahoy/releases)
ahoy upWhen you want to stop containers, you can run:
ahoy stopOnce created your containers; you should prepare your local site.
Generate local settings file:
ahoy site local-settingsPrepare the local site:
composer install
npm installInstall the local site
ahoy site installSite uuid can be found in the installation script. You should create a variable named SITE_UUID in CircleCI and set it to that value so that CircleCI builds work as expected.
In order to run behat tests; you should execute:
ahoy site behatThe site has a form for users to send their proposals, but this form will be available for a certain time. To activate or deactivate this form, you must enter the permissions configuration page: Users -> Permissions
admin/people/permissionsAdd or delete the permission: "Proposal: Create new content" to the role you want, according to your needs.
To build this environment you need recent docker compose and docker versions.
After placing Drupal in the right folder, you should run docker-compose up -d or ahoy up and voilá! You can access your Drupal installation at the url provided by ahoy docker url
Nginx is running in port 80. Use ahoy docker url to get the url.
PHP is running in a separate container using fpm in port 9000 (not accessible from host).
Credentials are in environment variables in docker-compose.yml.
Please be patient because it takes around 3-5 minutes to start when you create the containers.
Core is created as "collection1". Solr address is "solr". Path is "/solr".
This container have some cli utilities to manage your drupal site. See https://hub.docker.com/r/kporras07/docker-drupal-cli/ for more info.
In order to access the cli, you should run ahoy bash. Now, you can run commands like drush, ahoy, composer, node, grunt, python, etc inside the container.
Set wd_host to 'http://browser:4444/wd/hub' in behat config. If you need vnc, you can connect to url given by ahoy docker vnc-url using 'secret' as password.
This is used to share your local environment over the internet. In order to do this, you should run ahoy docker share-url. This command will give you an url that you can access in your browser and get the share urls for http and https.
It's a reverse proxy usually used in production. It's bundled here for situations where you need to test with the varnish cache. In order to access the site through varnish, run ahoy docker varnish-url and open that url in your browser.
To see the the mailhog UI, run ahoy docker mailhog-url and access that url from the browser. Your new messages will appear there.
In order to send your emails from Drupal to mailhog you have two choices: using default sendmail configuration or using SMTP. If you decide for SMTP, you should set the mailhog host and port (mailhog:1025).
This tool also contains the Blackfire profiling tool, to configure it please put your server id and server token into the .env file, for more documentation about Blackfire go to this web page: https://blackfire.io/
You can run lighthouse against your site to get a report about performance, a11y, pwa, best practices and SEO. To do it, run ahoy site lighthouse <internal_url>, then open the generated file.
Some helpful commands are included using useful ahoy cli utility. In order to use them, you must install ahoy (https://github.com/ahoy-cli/ahoy) and then ahoy help