Skip to content

debugDivyansh/dcd-cms

 
 

Repository files navigation

Drupal Camp delhi

Drupal camp delhi repo is build on top of drupal cms.

Tools & Prerequisites

The following tools are required for setting up the site.

Note: Please make sure you have all above tools in-place before you start with next tasks.


Setting up the project

Step 1] Git repository setup:

  1. Create a fork of the repository.
  2. Clone the project.
  3. Setup a SSH key that can be used for Github
    1. Setup Github SSH Keys
    $ git clone <your_fork>
  1. Add the upstream URL.
git remote add upstream git@github.com:guptahemant/dcd-cms.git

Step 2] Local environment (DDEV) setup:

Pre-requisites

  • Docker
  • Docker Compose
  • DDEV
  • Make sure your ssh pub keys are added to dev server for db sync.

Drush Aliases

Use drush aliases to specifically target a local site. List of all aliases can be found by running:

ddev drush sa

Lagoon aliases

ddev drush la

For finding out the URL of a site use the information in drush alias.

Current local aliases

  • ddev.local - Use to target local site.

Lagoon aliases

  • lagoon.dcd-develop - Dev env
  • lagoon.dcd-main - Prod env

2.1] Run the following command to setup project

  • ddev start
  • Require all packages ddev composer install
  • Create a .env file cp .env.example .env

2.2] Install drupal site from scratch (Needed to be done for initial setup).

  • ddev drush si --existing-config -y
  • ddev drush cim -y

2.3] Syncing local with remote database.

  • You need to have an account in lagoon, and should have added your ssh key.
  • Authorize ddev to use your keys ddev auth ssh
  • Pulling the dev db and files using ddev ddev pull lagoon

Manually pull and import the DB

  • Take the db dump from the remote site: ddev drush @alias sql-dump > db_dump.sql
  • Import db dump to a local site: ddev drush @alias sql-cli < db_dump.sql
  • To login use ddev drush @alias uli

2.4] Frontend setup.

  • To be added

Development workflow before starting work on any new task.

Active development branch is develop

Step 1] Take the latest pull from develop branch

  • git checkout develop
  • git pull upstream develop

Step 2] Update your local to reflect all the latest changes.

  • ddev composer install
  • ddev drush updb -y
  • ddev drush cim -y
  • FE updates: TBD

Step 2] Create a feature branch from develop branch.

  • git chechout -b feature/new-branch
  • Perform work on local.
  • Export any config changes.
  • Make sure while exporting the config changes to properly use the config splits.

Step 3] Create a pull request for your work.

Troubleshooting

How to pickup issues

About

Drupal camp delhi site built on top of drupal cms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 94.2%
  • Twig 2.7%
  • SCSS 2.4%
  • Other 0.7%