-
Notifications
You must be signed in to change notification settings - Fork 5
Evaluator Quick Start
The evaluation function of this project requires docker and docker-compose to be installed and available, and bash available on the command line.
The primary goal is to demonstrate the capabilities of CiviCRM to a potential adopter by easily creating local new CiviCRM installations so that the potential adopter can "kick the tires".
Total time from start to running instance varies depending on:
- Internet download speed.
- Whether some base images are already present (likely, for a machine that already had docker installed).
- CPU/memory (4 Gb should be plenty, any recent CPU). Something like 5 - 10 minutes is a reasonable upper limit for most setups, i.e. it's fast.
As secondary goals, these instructions can be used to demonstrate Drupal without CiviCRM, and to demonstrate how this project (Simuliidae) works.
For each major version of Drupal, there is a Drupal-only version in the "master" branch, and a separate one including CiviCRM, in the "civicrm-5" branch. Only those that have been tested will be documented below.
After you've followed the version-specific quickstart below, here are some important things to know.
-
Using the "up" command (which is passed to docker-compose) will generate a lot of logs to your screen. The first time you run it, notice that one of the last things it will show you is a url that you can click on to be logged in. The url is generated with "drush uli".
-
If you'd like to continue to use your login console after that "up" command, you can pass it a " -d" flag, which "detaches" it, as per as per the documentation here..
-
If you do that, you won't see the url to log yourself in, which is why I didn't tell you to do that the first time. But you can see the logs even if you run it detached, using the command:
docker logs -f evaluate_admin_1
The "-f" flag means it'll keep showing you the logs as the come in. This will also only show you the admin container, and if you Ctrl-C, it won't shut down the container.
- If you want to clean up after yourself, you can use this command:
bash compose.sh evaluate down
Which will not only shut down the containers, but also remove them. You'll want to do that if you want to rerun the experiment from scratch (e.g. after changing some of the vsite/evaluate.env parameters), or if you've run the Drupal-only experiment and then want to try the Drupal with CiviCRM one. You'll also want to remove the volumes with:
docker volume rm evaluate_vsite evaluate_vdb
Those volumes are where your database and sites/default/ file systems live.
-
The "compose.sh" is just a small convenience script wrapper around docker-compose that takes a first argument that will be used for the 'project' name as well as to find the environment file that defines the location of the compose file and various additional things as environment variables before running docker-compose. Once you're comfortable with the setup, you probably will want to use docker-compose directly.
-
Remember this is a demonstration setup. There will be other "Quick Starts" for how to use this project for setting up a copy of a production site for development, or for a production setup.
-
This configuration uses port "1978" of your machine, optimistically assuming it isn't already in use. If it is, or you want to change it for whatever reason, edit
7/apache/-compose.ymland modify the ports section, and thenvsite/evaluate.envand edit VSITE_DOMAIN. Yes, there's a reason I chose "1978", left as an exercise to the reader. -
Ready to try to change evaluate.env? Your best bet is to copy it to newproject.env and edit the COMPOSE_PROJECT_NAME to newproject (i.e. they have to match). You'll have to give it a different port to operate on if you want it running at the same time. And you'll use something like "bash compose.sh newproject up" to get it up.
The Drupal 7 version is based on the Docker Official Image of drupal.
-
Clone the repository, master branch.
-
cd to the project directory and run "bash stack-generate.sh 7/apache compose"
-
run "bash compose.sh evaluate build"
-
run "bash compose.sh evaluate up"
This will generate a working but empty Drupal site, using the configuration in the vsite/evaluate.env file.
-
Clone the repository, civicrm-5 branch. For example, you could "git checkout civicrm-5" after the initial clone.
-
cd to the project directory and run "bash stack-generate.sh 7/apache compose"
-
run "bash compose.sh evaluate build"
-
run "bash compose.sh evaluate up -d"
-
run "docker logs -f evaluate_admin_1"
This will generate a working but empty Drupal site, using the configuration in the vsite/evaluate.env file. When it's finished, you'll see something like this:
Site Installation Completed Login using the following url http://localhost:1978/user/reset/1/1583247942/Ael4RWt8HOTQtGL8R5VuVOr6KgoddEhExEunYhLDF7Y/login AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.128.4. Set the 'ServerName' directive globally to suppress this message AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.128.4. Set the 'ServerName' directive globally to suppress this message [Tue Mar 03 15:05:43.206812 2020] [mpm_prefork:notice] [pid 248] AH00163: Apache/2.4.25 (Debian) PHP/7.3.15 configured -- resuming normal operations [Tue Mar 03 15:05:43.206847 2020] [core:notice] [pid 248] AH00094: Command line: 'apache2 -D FOREGROUND'
Note the line "Login using the following url" - that will allow you to auto-login to the site. From there, you'll probably want to go to:
http://localhost:1978/civicrm/admin
To explore your CiviCRM installation.