Download the PHP package woprrr/drupal8-composer-template without Composer
On this page you can find all versions of the php package woprrr/drupal8-composer-template. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download woprrr/drupal8-composer-template
More information about woprrr/drupal8-composer-template
Files in woprrr/drupal8-composer-template
Package drupal8-composer-template
Short Description Woprrr contributor skeleton
License GPL-2.0+
Informations about the package drupal8-composer-template
Drupal 8 Composer Skeleton
Drupal 8 skeleton dockerized in sperate containers (Nginx, PHP-FPM, MySQL and PHPMyAdmin).
Overview
-
Install prerequisites
Before installing project make sure the following prerequisites have been met.
-
Clone the project
We’ll download the code from its repository on GitHub.
-
Configure Xdebug [
Optional]We'll configure Xdebug for IDE (PHPStorm or Netbeans).
-
Run the application
By this point we’ll have all the project pieces in place.
-
Use Makefile [
Optionalbut strongly encouraged for beginner]When developing, you can use
Makefilefor doing recurrent operations. -
Use Docker Commands
When running, you can use docker commands for doing recurrent operations.
Install prerequisites
For now, this project has been mainly created for Unix (Linux/MacOS). Perhaps it could work on Windows.
All requisites should be available for your distribution. The most important are :
Check if docker-compose is already installed by entering the following command :
Check Docker Compose compatibility :
The following is optional but makes life better :
Images to use
You should be careful when installing third party web servers such as MySQL or Nginx.
This project use the following ports :
| Server | Port |
|---|---|
| MySQL | 8989 |
| PHPMyAdmin | 8080 |
| Nginx | 8000 |
| Nginx SSL | 3000 |
Clone the project
To install Git, download it and install following the instructions :
Go to the project directory :
Project tree
Configure Xdebug
If you use another IDE than PHPStorm or Netbeans, go to the remote debugging section of Xdebug documentation.
For a better integration of Docker to PHPStorm, use the documentation.
-
Get your own local IP address :
-
Edit php file
etc/php/php.iniand comment or uncomment the configuration as needed. - Set the
remote_hostparameter with your IP :
Run the application
-
Setup project environment variables :
Setup your project by editing the
.envfile and customize all environement variables. Specifically allDrupal_*variable are criticaly important to next steps and to customize your drupal instances. -
Initialize/Install project dependencies :
Please wait this might take a several minutes...
-
Install Drupal instance :
Or specify name of configuration instance
All of configuration available are defined in your
settings/settings.local.phpfile fromExample of typical workflow with configuration
-
Open your favorite browser :
- http://localhost:8000 (Web Front).
- https://localhost:3000 (Web Front HTTPS).
- http://localhost:8080 PHPMyAdmin (username: dev, password: dev)
-
Stop and clear services :
-
Stop and delete all traces of changes from skeleton :
That delete all files to reset skeleton at his initial state.
Play with Drupal Configuration workflow
-
Export your current configuration instance
Or with Docker Compose
-
After your first install of Drupal instance edit the
.envfile and change the following variableDRUPAL_INSTALL_PROFILE=standardtoDRUPAL_INSTALL_PROFILE=config_installer. That take ability to re-install / update your drupal instance with ./config/* exported configuration states. -
Re-install or update your instance from exported configuration
Re-install: With Drop of current drupal database and complete re-import of ./config
Update: With following drupal commands (up-db / ent-up ).
Every action processed by scripts switch your Drupal instance on
maintenancemode and switch Online after every action automatically. -
In more advanced usage you can also specified a drupal configuration name
Or with Docker Compose
Examples of life cycle
-
Start the Project containers :
-
Edit .env file.
-
Install drupal 8 instance :
-
Exporting Drupal configuration files :
**Or with a specific destination** -
Enable Re-install from configuration mode : Edit
.envfile by changingDRUPAL_INSTALL_PROFILE=standardtoDRUPAL_INSTALL_PROFILE=config_installer. -
Re-installation of project from exported configuration :
-
Update of current instance : Edit one of configuration yml in your
/configfolder eg: system.site.site_name. and process to updating your drupal instance from configuration by usingYour Site Name will change that you specified in system.site.site_name yml file.
- Another tips ? Call Help ;) : Show help :
Use Makefile
When developing, you can use Makefile for doing the following operations :
| Name | Description |
|---|---|
| code-sniff | Check the API with PHP Code Sniffer (Drupal Standards). |
| clean | Clean directories for reset. |
| c-install | Install PHP/Drupal dependencies with composer. |
| c-update | Update PHP/Drupal dependencies with composer. |
| clean-drupal-config | Delete exported configuration from project. |
| docker-start | Create and start containers. |
| docker-stop | Stop and clear all services. |
| gen-certs | Generate SSL certificates. |
| logs | Follow log output |
| mysql-dump | Create backup of all databases |
| mysql-restore | Restore backup of all databases |
| test | Test all application (custom and contribution modules). |
| test-contrib | Test application with phpunit |
| test-custom-modules | Test Drupal custom modules. |
| drupal-si | Install new Drupal instance and drop database. |
| drupal-update | Update your current Drupal instance and (re)import your `/config` exported configuration. |
| drupal-config-export | Export your current Drupal instance from `/config` by default. That can be in sub-folder depend your custom changes. |
Use Docker commands
Installing package with composer
Requiring package with composer
Updating PHP dependencies with composer
Testing PHP application with PHPUnit
Fixing standard code with CODER
Checking the standard code with CODER
Checking installed PHP extensions
Handling database
MySQL shell access
and
Creating a backup of all databases
Restoring a backup of all databases
Creating a backup of single database
Notice: Replace "YOUR_DB_NAME" by your custom name.
Restoring a backup of single database
Connecting MySQL from PDO
Or using Drush to check if your database configuration is OK
Help us
Any thought, feedback or (hopefully not!)
All versions of drupal8-composer-template with dependencies
composer/installers Version ^1.2
cweagans/composer-patches Version 1.6.0
drupal-composer/drupal-scaffold Version ^2.2
fxp/composer-asset-plugin Version ^1.4
incenteev/composer-parameter-handler Version ~2.0
wikimedia/composer-merge-plugin Version ^1.3