Skip to content

EIC-EA/EIC-community-D8

Repository files navigation

EIC-community-D8

The EIC community Drupal 8 Platform is based on OpenEuropa Drupal codebase using OpenEuropa components. It comes with installation of two components:

In order to build the functionality of the website you are free to use any of the OpenEuropa components.

Prerequisites

You need to have the following software installed on your local development environment:

Running locally

This application doesn't use Open Europa's default docker-compose configuration. To run to project please follow these steps:

  • (macOS users) Please read Using Docker on macOS before
  • Copy and rename .env.docker to .env
  • (First time only) Setup the dev environment wih the following command:
make setup
# If you want to run frontend install and builds
make build-front

Update your existing local environment

  • Run make update

Using Docker on macOS

In order to maximise the performance of using Docker on macOS, we strongly advise using at least version 18.03.1 of Docker which supports native NFS integration. You can find a very comprehensive article about this topic under following link Set Up Docker For Mac with Native NFS.

Before running the make setup command, be sure that NFS is configured correctly. If not, run the bash script in order to configure Docker native NFS support. You can find the source of a script in the article or by using this link setup_native_nfs_docker_osx.sh.

Please note that this script will use /Users by default, in some cases this might not fit. You can change it (Line 53) to use a sub-directory where applications using docker are or this project's path ($PWD).

Running the tests

To run the coding standards and other static checks:

docker-compose exec php ./vendor/bin/grumphp run

To run Behat tests:

docker-compose exec php ./vendor/bin/behat

Troubleshooting

If you run composer install for the first time from within the Docker container GrumPHP will set its Git hook paths to the container's ones.

If you get such error messages reinitialize GrumPHP paths on your host machine (meaning, outside the container) by running:

./vendor/bin/grumphp git:deinit
./vendor/bin/grumphp git:init