Skip to content

shinde-rahul/dcp

 
 

Repository files navigation

My Project

DrupalCamp Pune Website.

Lando local Setup instructions for DCP 2019:

Git instructions:

  1. Clone from https://github.com/drupalpune/dcp
  2. git checkout dcp19

Drupal Settings

  1. Open drupalcamppune/docroot/sites/sites.php
  2. Comment all $sites lines at the bottom of the file and add following line. $sites['drupalcamppune.lndo.site'] = 'camp2019';
  3. In docroot/sites/camp2019/settings.local.php, Copy following $databases array.
    $databases['default']['default'] = array (
      'database' => 'database',
      'username' => 'database',
      'password' => 'database',
      'prefix' => '',
      'host' => 'database',
      'port' => '3306',
      'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
      'driver' => 'mysql',
    );
    
    

# Lando instructions:
1. [Download and install Lando](https://docs.devwithlando.io/installation/macos.html)
2. Run
    ```
    $ lando start
    ```
3. Download and move the database gzip file to drupalcamppune directory and import database with followinng command.
  ```
    $ lando db-import dev-dcp19-drupalcamdb282288-2019-07-24.sql.gz
    $ lando drush cr --uri=https://drupalcamppune.lndo.site
  ```
4. Verify if the site is working on https://drupalcamppune.lndo.site/
5. Login using Drush uli and change the admin password.
  ```
    $ lando drush uli --uri=https://drupalcamppune.lndo.site
  ```

## Using This Template

Remove this section after initial setup!

Search for and replace the following placeholders within this file:

| Placeholder | Example |
| --- | --- |
| `#ACQUIA_CLOUD_URL` | https://cloud.acquia.com/app/develop/applications/12345678-1234-1234-12345678901234567 |
| `#GIT_PRIMARY_DEV_BRANCH` | `master` or `develop` |
| `#GITHUB_ORG` | The "org" in https://github.com/org/project |
| `#GITHUB_PROJECT` | The "project" in https://github.com/org/project |
| `#JIRA_URL` | https://org.atlassian.net/projects/PROJ |
| `#LOCAL_DEV_SITE_ALIAS` | `@example.local` |
| `#LOCAL_DEV_URL` | http://local.example.com/ |
| `#TRAVIS_URL` | https://travis-ci.com/org/PROJ |

# Getting Started

This project is based on BLT, an open-source project template and tool that enables building, testing, and deploying Drupal installations following Acquia Professional Services best practices. While this is one of many methodologies, it is our recommended methodology. 

1. Review the [Required / Recommended Skills](https://docs.acquia.com/blt/developer/skills/) for working with a BLT project.
2. Ensure that your computer meets the minimum installation requirements (and then install the required applications). See the [System Requirements](https://docs.acquia.com/blt/install/).
3. Request access to organization that owns the project repo in GitHub (if needed).
4. Fork the project repository in GitHub.
5. Request access to the Acquia Cloud Environment for your project (if needed).
6. Setup a SSH key that can be used for GitHub and the Acquia Cloud (you CAN use the same key).
  1. [Setup GitHub SSH Keys](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/)
  2. [Setup Acquia Cloud SSH Keys](https://docs.acquia.com/acquia-cloud/ssh/generate)
7. Clone your forked repository. By default, Git names this "origin" on your local.
  ```
  $ git clone git@github.com:<account>/#GITHUB_PROJECT.git
  ```
8. To ensure that upstream changes to the parent repository may be tracked, add the upstream locally as well.
  ```
  $ git remote add upstream git@github.com:#GITHUB_ORG/#GITHUB_PROJECT.git
  ```

9. Update your the configuration located in the `/blt/blt.yml` file to match your site's needs. See [configuration files](#important-configuration-files) for other important configuration files.


----
# Setup Local Environment.

BLT provides an automation layer for testing, building, and launching Drupal 8 applications. For ease when updating codebase it is recommended to use  Drupal VM. If you prefer, you can use another tool such as Docker, [DDEV](https://docs.acquia.com/blt/install/alt-env/ddev/), [Docksal](https://docs.acquia.com/blt/install/alt-env/docksal/), [Lando](https://docs.acquia.com/blt/install/alt-env/lando/), (other) Vagrant, or your own custom LAMP stack, however support is very limited for these solutions.
1. Install Composer dependencies.
After you have forked, cloned the project and setup your blt.yml file install Composer Dependencies. (Warning: this can take some time based on internet speeds.)
  ```
  $ composer install
  ```
2. Setup VM.
Setup the VM with the configuration from this repositories [configuration files](#important-configuration-files).

  ```
  $ vagrant up
  ```

3. Setup a local blt alias.
If the blt alias is not available use this command outside and inside vagrant (one time only).
  ```
  $ composer run-script blt-alias
  ```

4. SSH into your VM.
SSH into your localized Drupal VM environment automated with the BLT launch and automation tools.
  ```
  $ vagrant ssh
  ```

5. Setup a local Drupal site with an empty database.
Use BLT to setup the site with configuration.  If it is a multisite you can identify a specific site.
 $ blt setup
```

or

$ blt setup --site=[sitename]
  1. Log into your site with drush. Access the site and do necessary work at #LOCAL_DEV_URL by running the following commands.
    $ cd docroot
    $ drush uli
    

Other Local Setup Steps

  1. Set up frontend build and theme. By default BLT sets up a site with the lightning profile and a cog base theme. You can choose your own profile before setup in the blt.yml file. If you do choose to use cog, see Cog's documentation for installation. See BLT's Frontend docs to see how to automate the theme requirements and frontend tests. After the initial theme setup you can configure blt/blt.yml to install and configure your frontend dependencies with blt setup.

  2. Pull Files locally. Use BLT to pull all files down from your Cloud environment.

    $ blt drupal:sync:files
    
  3. Sync the Cloud Database. If you have an existing database you can use BLT to pull down the database from your Cloud environment.

    $ blt sync
    

Resources

Additional BLT documentation may be useful. You may also access a list of BLT commands by running this:

$ blt

Note the following properties of this project:

  • Primary development branch: #GIT_PRIMARY_DEV_BRANCH
  • Local environment: #LOCAL_DEV_SITE_ALIAS
  • Local site URL: #LOCAL_DEV_URL

Working With a BLT Project

BLT projects are designed to instill software development best practices (including git workflows).

Our BLT Developer documentation includes an example workflow.

Important Configuration Files

BLT uses a number of configuration (.yml or .json) files to define and customize behaviors. Some examples of these are:

  • blt/blt.yml (formerly blt/project.yml prior to BLT 9.x)
  • blt/local.blt.yml (local only specific blt configuration)
  • box/config.yml (if using Drupal VM)
  • drush/sites (contains Drush aliases for this project)
  • composer.json (includes required components, including Drupal Modules, for this project)

Resources

About

Drupal multi-site codebase for Drupal camp pune website.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 51.4%
  • CSS 32.2%
  • HTML 14.2%
  • JavaScript 2.1%
  • Gherkin 0.1%