Zum Inhalt springen

Drupal 8 Website Developer Environments: Unterschied zwischen den Versionen

Aus Computech CMS Wiki
Frederick (Diskussion | Beiträge)
Frederick (Diskussion | Beiträge)
Zeile 15: Zeile 15:
* Copy as settings.local.php from another development site:
* Copy as settings.local.php from another development site:
  cp  /var/www/meos/docroot/sites/default/settings.local.php ./
  cp  /var/www/meos/docroot/sites/default/settings.local.php ./
* Fix permissions on sites/default so Drupal can write to it:
chmod -R g+w sites/default/
* Edit the file:
* Edit the file:
  nano settings.local.php
  nano settings.local.php
Zeile 22: Zeile 24:
* Run Composer to install dependencies:
* Run Composer to install dependencies:
  composer install
  composer install
* Fix permissions on sites/default so Drupal can write to it:
chmod -R g+w sites/default/
* Pull the database from the main development site: (Drush shell alias needs to be created  in the aliases file in /etc/drush/ for the pull-live.db command to work.)
* Pull the database from the main development site: (Drush shell alias needs to be created  in the aliases file in /etc/drush/ for the pull-live.db command to work.)
  drush @meos.fh pull-live-db
  drush @meos.fh pull-live-db
* Import the configuration from the config/sync directory with Drush:
* Import the configuration from the config/sync directory with Drush:
  drush @meos.fh cim  #(cim is short for config-import)
  drush @meos.fh cim  #(cim is short for config-import)

Version vom 20. Dezember 2016, 15:20 Uhr

Copy Drupal 8 Website to developer environments

  • cd in to the new developer environment:
cd /var/www/meos-fh
  • Initialize the folder for git:
git init
  • Add the Git Repository as a remote called origin:
git remote add origin <repository_URL>
  • Pull the repository to the directory:
git pull
  • Check out the development branch dev:
git checkout dev
  • Change to sites/default directory:
cd docroot/sites/default/
  • Copy as settings.local.php from another development site:
cp  /var/www/meos/docroot/sites/default/settings.local.php ./
  • Fix permissions on sites/default so Drupal can write to it:
chmod -R g+w sites/default/
  • Edit the file:
nano settings.local.php

Change database settings to the new database for the website.

  • Change back to the project folder:
cd ../../../
  • Run Composer to install dependencies:
composer install
  • Pull the database from the main development site: (Drush shell alias needs to be created in the aliases file in /etc/drush/ for the pull-live.db command to work.)
drush @meos.fh pull-live-db
  • Import the configuration from the config/sync directory with Drush:
drush @meos.fh cim  #(cim is short for config-import)