A base project for DSJP project.
This is a Composer-based installer for the DSJP profile distribution.
This will create a DSJP sample site and install all the project's dependencies.
Table of contents generated with markdown-toc
You need to have the following software installed on your local development environment: Git, Docker and Docker Compose
The project ships with default configuration in the runner.yml.dist
file. This
file is configured to run the website on the provided docker containers. If you
are happy using those, you can skip directly to the installing the project
section. You can customize the default configuration by copying runner.yml.dist
to runner.yml
and changing for example the connection details for your
database server and selenium server.
By default, docker-compose reads two files, a docker-compose.yml
and an
optional docker-compose.override.yml
file. By convention, the docker-compose.yml
contains your base configuration and it is committed to the repository. This
file contains a webserver, a mysql server and a selenium server. It very closely
matches the environment the website is deployed on.
The override file, as its name implies, can contain configuration overrides for existing services, or it can add entirely new services. This file is never committed to the repository.
You can shorten the commands listed below by setting an alias in your .bashrc
file:
alias dcup="dc up -d"
alias dcweb="dc exec web "
You can shorten the commands listed below by using ahoy cli. Install it an check available commands by running
ahoy
Request access to GitHub - iuliadanaila-tremend/dsjp-project
Add SSH key to your Github account.
Steps
Clone repository
git clone [email protected]:iuliadanaila-tremend/dsjp-project.git
Run the installation
docker-compose up -d
docker-compose exec web composer install
Make sure the profile is installed:
docker-compose exec web composer require digit/dsjp --update-with-dependencies
docker-compose exec web ./vendor/bin/run toolkit:build-dev
docker-compose exec web ./vendor/bin/drush site-install dsjp_profile
Start docker
# Using default docker-compose.yml
docker-compose up -d
# (optional) Using a custom docker-compose.override.yml
docker-compose -f docker-compose.override.yml up -d
Done! Visit http://test:8080/web
Using default configuration your Drupal site will be available locally at:
- http://127.0.0.1:8080
- does not support EU Login
- no http auth by default
NOTE: If Cloud9 is used for the project development, when setting up a project there it will be available at either:
- https://|your-c9-username|.c9.fpfis.tech.ec.europa.eu/web
- supports EU Login
- http auth by default (request credentials with a teammember)
- https://|aws-machine-id|.vfs.cloud9.eu-west-1.amazonaws.com/web
- does not support EU Login
- protected by C9 session
# Run coding standard checks
docker-compose exec web ./vendor/bin/run toolkit:test-phpcs
# Run behat tests on a clean installation.
docker-compose exec web ./vendor/bin/run toolkit:test-behat
# Run behat tests on a clone installation.
docker-compose exec web ./vendor/bin/run toolkit:test-behat -D "behat.tags=@clone"
When having a conflict on the composer.lock file it is best to solve the conflict manually and then update the lock file.
docker-compose exec web composer update --lock
Add the following line into settings.override.php
$config['config_split.config_split.dev']['status'] = TRUE;
There is a docker container, Mailhog for viewing and debugging emails on local environment. In your browser visit http://web:8025/. You can change the port in docker-compose.override.yml
Run the following command to create solr core
docker-compose exec solr /bin/bash
make create core=dsjp -f /usr/local/bin/actions.mk
Go into admin and reindex content.