[Project description]
These instructions will get you a Drupal 8 project up and running on your local machine for development and testing purposes.
All you need is Composer and Vagrant installed on your laptop or pc. Every other service will be downloaded inside the virtual machine.
$ composer install
Default settings regarding the VM can be found in ./config
. The following files are present:
config.yml
: configuration independent of the project (eg. synced folders, ports, composer etc.)default.local.config.yml
: configuration about the project (eg. name, credentials etc.)
$ cp ./config/default.local.config.yml ./config/local.config.yml
Adjust the lines in ./config/local.config.yml
which are not commented to match your project.
Uncomment the lines below # Installing from scratch
in ./config/local.config.yml
.
Uncomment the lines below # Installing from existing configuration
in ./config/local.config.yml
.
All there is left to do, is start Vagrant and let it do its thing.
$ DRUPALVM_ANSIBLE_ARGS='--extra-vars "drupal_install_site=true"' vagrant up
This will download a Vagrant machine (Debian9) and provision it using Ansible. Inside, a Resilient-distribution will be installed. If everything is finished, go to the url you set up in ./config/local.config.yml
under vagrant_hostname
.
- MySQL Host:
127.0.0.1
- Username:
drupal
(unless overridden bydrupal_db_user
) - Password:
drupal
(unless overridden bydrupal_db_password
) - SSH Host:
192.168.88.88
(unless overridden byvagrant_ip
) - SSH User:
vagrant
(unless overridden byvagrant_user
) - SSH Key: (browse to your
~/.vagrant.d/
folder and chooseinsecure_private_key
)
- Username:
admin
(unless overridden bydrupal_account_name
) - Password: the default is
admin
but please change this when going to production (unless overridden bydrupal_account_pass
)
Hence the fact that we're using Config Split to break apart certain config (eg. only enable Devel in development) we must use the drush commands provided by that module. Use $ drush csex -y
to export and $ drush csim -y
to import configuration files.
You can enable development config by adding $config['config_split.config_split.dev']['status'] = TRUE;
in ./htdocs/web/sites/default/settings.local.php
.
We use Gitflow for versioning.
- Jasper Lammens - Initial work - lammensj
This project is licensed under the MIT License - see the LICENSE file for details.