Skip to content

Latest commit

 

History

History
98 lines (74 loc) · 2.68 KB

README.md

File metadata and controls

98 lines (74 loc) · 2.68 KB

Overview

This is a base Drupal project intended for course purposes. The different branches represents different training modules. The main branch contains a Vanilla installation of Drupal 9.2.5.

How to use

  • Clone the repository
  • Switch to the branch related to the course module you are interested in
  • Install (following the instructions below)
  • Enjoy

Requirements

To run Drupal you need a complete (L)AMP stack. You can meet this requirement in three ways:

  • installing all needed softwares natively on your host (not recommended at all, but if you really can't do without it, you can find many guides on the internet)
  • using a local server PHP environment just like MAMP or XAMPP (acceptable, follow the instructions of the chosen software)
  • using Docker (really recommended!!!)

This project is docker-ready then if you are running docker and docker-compose on your host, running a

$ docker-compose up -d

is enough.

If you aren't using docker remember to create a database instance on your database server before starting installation.

How to install

Disclaimer

If you are using Docker, remember to execute the following commands in a shell into your app container. You can open a shell into app container typing:

$ docker-compose exec app bash

Prerequisites

Make sure that your host has installed and in PATH the mysql client If you are using the docker container you can simply type:

# apt-get update && apt-get install -y mariadb-client

Commands

  1. Run composer
# composer install --prefer-dist
  1. Install Drupal from existing configurations
# vendor/bin/drush site:install \
  --db-url=mysql://[DB_USER]:[DB_PASS]@[DB_HOST]:[DB_PORT]/[DB_NAME] \
  --account-name=admin \
  [email protected] \
  [email protected] \
  --site-name="Drupal Course" \
  --existing-config minimal

Remember to substitute:

  • [DB_USER] with the database granted user
  • [DB_PASS] with the password chosen for that user
  • [DB_HOST] with the IP or FQDN of database instance
  • [DB_PORT] with the port on which your database instance is binding
  • [DB_NAME] with the database name

If you are using docker, all of these stuff are already defined in docker-compose.yml file. Here they come:

  • [DB_USER]: drupal
  • [DB_PASS]: drupal
  • [DB_HOST]: db
  • [DB_PORT]: 3306
  • [DB_NAME]: drupal
  1. Ok, it's done. At the end of the process, you'll be given the admin password with which you can login. Otherwise you can obtain a one-time-login URL typing:
# vendor/bin/drush uli

Author Information

This project was created in 2021 by Bmeme for its educational purposes.