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 11: Zeile 11:
* Check out the development branch '''dev''':
* Check out the development branch '''dev''':
  git checkout dev
  git checkout dev
*  
* Change to sites/default directory:
  cd docroot/sites/default/
  cd docroot/sites/default/
*  
* 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 ./
*  
* Edit the file:
  nano settings.local.php
  nano settings.local.php
Change database settings.
Change database settings to the new database for the website.
*  
* Change back to the project folder:
  cd ../../../
  cd ../../../
*  
* 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/
  chmod -R g+w sites/default/
*  
* Pull the database from the main developmentsite: (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:
  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:06 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 ./
  • 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
  • Fix permissions on sites/default so Drupal can write to it:
chmod -R g+w sites/default/
  • Pull the database from the main developmentsite: (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)